Files
lol_coder/lck_cl_data_solution/LolDataRequestLib/Define.cs
2026-04-01 20:20:09 +09:00

185 lines
5.8 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace LolDataRequestLib
{
/// <summary>
/// DB와 MAnager간의 데이터의 정의에 관련된 클래스.
/// </summary
public static class DBDefine
{
//public static string MONGODB주소 = "mongodb://root:veryhardpassword123@211.42.188.8:50003";
//public static string MONGODB주소 = "mongodb://root:veryhardpassword123@211.53.30.8:50003";
//public static string MONGODB주소 = "mongodb://root:veryhardpassword123@localhost:50003"; //public static string MONGODB주소 = "mongodb://root:veryhardpassword123@203.251.148.27:50002";
//public static string MONGODB주소 = "mongodb://root:veryhardpassword123@121.131.226.38:50003";
//public static string MONGODB주소 = "mongodb://root:veryhardpassword123@14.39.226.156:50003";
public static string MONGODB주소 = "mongodb://root:veryhardpassword123@121.131.226.37:50003";
//public static string MONGODB주소 = "mongodb://root:veryhardpassword123@192.168.200.178:50003";
//public static string MONGODB주소 = "mongodb://root:veryhardpassword123@211.171.119.9:50003";
//public static string MONGODB주소 = "mongodb://root:veryhardpassword123@10.100.9.186:50003"
//;
//public static string MONGODB주소 = "mongodb://root:veryhardpassword123@211.171.119.9:50003";
//public static string MONGODB주소 = "mongodb://root:veryhardpassword123@localhost:50003";
//public static string MONGODB주소 = "mongodb://root:veryhardpassword123@14.39.226.145:50003";
//public static string MONGODB주소 = "mongodb://root:veryhardpassword123@192.168.0.92:50003";
//public static string MONGODB주소 = "mongodb://root:veryhardpassword123@218.152.33.43:50003"; //사무실
internal static string = "data/ko_KR/champion.json";
internal static string = "data/en_US/runesReforged.json";
public static void (string recvDBAddress)
{
MONGODB주소 = "mongodb://root:veryhardpassword123@"+recvDBAddress+":50003";
}
public enum
{
,
,
,
,
}
public enum
{
[StringValue("밴데이터")]
,
[StringValue("픽데이터")]
,
[StringValue("현재골드량선수")]
,
[StringValue("현재데미지량선수")]
,
[StringValue("경험치레벨")]
,
[StringValue("오브젝트킬")]
,
[StringValue("룬데이터")]
,
[StringValue("골드차이팀")]
,
[StringValue("타워철거전체")]
,
[StringValue("타워골드데이터")]
,
[StringValue("경기종료정보")]
,
[StringValue("팟지")]
,
[StringValue("킬뎃어시")]
,
[StringValue("용리스폰")]
,
//[StringValue("아타칸리스폰")]
//아타칸리스폰,
[StringValue("한타딜량범위")]
,
[StringValue("퀘스트완료여부")]
}
public enum RequestDataType
{
BAN_AND_PICK,
GAME_STATUS,
OBJECT_EVENT,
DRAGON_RESPAWN,
ATAKHAN_RESPAWN,
STRUCT_EVENT,
STRUCT_GOLD_EVENT
}
public enum
{
= 100,
= 200
}
public enum
{
= 1,
= 2,
= 3,
= 4,
= 5
}
public enum
{
= 0,
= 1,
= 2
}
public static string GetStringValue(this Enum value)
{
// Get the type
Type type = value.GetType();
// Get fieldinfo for this type
FieldInfo fieldInfo = type.GetField(value.ToString());
// Get the stringvalue attributes
StringValueAttribute[] attribs = fieldInfo.GetCustomAttributes(
typeof(StringValueAttribute), false) as StringValueAttribute[];
// Return the first if there was a match.
return attribs.Length > 0 ? attribs[0].StringValue : null;
}
public class StringValueAttribute : Attribute
{
#region Properties
/// <summary>
/// Holds the stringvalue for a value in an enum.
/// </summary>
public string StringValue { get; protected set; }
#endregion
#region Constructor
/// <summary>
/// Constructor used to init a StringValue Attribute
/// </summary>
/// <param name="value"></param>
public StringValueAttribute(string value)
{
this.StringValue = value;
}
#endregion
}
}
}