Ejemplo n.º 1
0
 public static void Convert(Dictionary <int, DeclareKaifuGuildlStarcraft> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(1, DeclareKaifuGuildlStarcraft.Create(1, StringDefines.Key_56730, 1, StringDefines.Key_56731));
     data.Add(2, DeclareKaifuGuildlStarcraft.Create(2, StringDefines.Key_56732, 2, StringDefines.Key_56733));
     data.Add(3, DeclareKaifuGuildlStarcraft.Create(3, StringDefines.Key_56734, 3, StringDefines.Key_56735));
 }
Ejemplo n.º 2
0
        public static DeclareKaifuGuildlStarcraft Create(int in_iD, string in_name, int in_position, string in_reward)
        {
            DeclareKaifuGuildlStarcraft tmp = new DeclareKaifuGuildlStarcraft();

            tmp._iD       = in_iD;
            tmp._name     = in_name;
            tmp._position = in_position;
            tmp._reward   = in_reward;

            return(tmp);
        }
Ejemplo n.º 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[]> >("DataKaifuGuildlStarcraft");
                if (dic == null)
                {
                    LuaEnv.SharedLuaEnv.DoString("DataKaifuGuildlStarcraft = require 'Lua/Config/DataKaifuGuildlStarcraft'");
                    dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataKaifuGuildlStarcraft");
                }

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareKaifuGuildlStarcraft>(3);
                    foreach (var item in dic)
                    {
                        DeclareKaifuGuildlStarcraft tmp = new DeclareKaifuGuildlStarcraft();
                        tmp.ID       = item.Value[0];
                        tmp.Name     = CfgStringLua.Get(item.Value[1]);
                        tmp.Position = item.Value[2];
                        tmp.Reward   = CfgStringLua.Get(item.Value[3]);

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