コード例 #1
0
        public static DeclareGuildBonfire Create(int in_level, string in_reward)
        {
            DeclareGuildBonfire tmp = new DeclareGuildBonfire();

            tmp._level  = in_level;
            tmp._reward = in_reward;

            return(tmp);
        }
コード例 #2
0
ファイル: DataGuildBonfire.cs プロジェクト: chenxihan/record
 public static void Convert(Dictionary <int, DeclareGuildBonfire> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(1, DeclareGuildBonfire.Create(1, StringDefines.Key_31392));
     data.Add(50, DeclareGuildBonfire.Create(50, StringDefines.Key_31393));
     data.Add(100, DeclareGuildBonfire.Create(100, StringDefines.Key_31394));
     data.Add(150, DeclareGuildBonfire.Create(150, StringDefines.Key_31395));
     data.Add(200, DeclareGuildBonfire.Create(200, StringDefines.Key_31396));
     data.Add(250, DeclareGuildBonfire.Create(250, StringDefines.Key_31397));
     data.Add(300, DeclareGuildBonfire.Create(300, StringDefines.Key_31398));
     data.Add(350, DeclareGuildBonfire.Create(350, StringDefines.Key_31399));
     data.Add(400, DeclareGuildBonfire.Create(400, StringDefines.Key_31400));
     data.Add(450, DeclareGuildBonfire.Create(450, StringDefines.Key_31401));
     data.Add(500, DeclareGuildBonfire.Create(500, StringDefines.Key_31402));
 }
コード例 #3
0
        public static void SetData()
        {
            if (_dataCaches == null && LuaEnv.isLoadLuaCfg)
            {
                long startTime = DateTime.Now.Ticks;
                Dictionary <int, int[]> dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataGuildBonfire");
                if (dic == null)
                {
                    LuaEnv.SharedLuaEnv.DoString("DataGuildBonfire = require 'Lua/Config/DataGuildBonfire'");
                    dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataGuildBonfire");
                }

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareGuildBonfire>(11);
                    foreach (var item in dic)
                    {
                        DeclareGuildBonfire tmp = new DeclareGuildBonfire();
                        tmp.Level  = item.Value[0];
                        tmp.Reward = CfgStringLua.Get(item.Value[1]);

                        _dataCaches.Add(item.Key, tmp);
                    }
                }
                Record(startTime, DateTime.Now.Ticks, "GuildBonfire");
            }
            if (_dataCaches == null && _fillDataCallBack != null)
            {
                if (_dataCaches == null)
                {
                    long startTime = DateTime.Now.Ticks;
                    _dataCaches = new Dictionary <int, DeclareGuildBonfire>(11);
                    _fillDataCallBack(_dataCaches);
                    Record(startTime, DateTime.Now.Ticks, "GuildBonfire");
                }
            }
        }