示例#1
0
        public static DeclarePlayerGodHead Create(string in_color, int in_id, string in_name, int in_need_fight_power, string in_need_item, int in_notice, int in_power, string in_propetry)
        {
            DeclarePlayerGodHead tmp = new DeclarePlayerGodHead();

            tmp._color            = in_color;
            tmp._id               = in_id;
            tmp._name             = in_name;
            tmp._need_fight_power = in_need_fight_power;
            tmp._need_item        = in_need_item;
            tmp._notice           = in_notice;
            tmp._power            = in_power;
            tmp._propetry         = in_propetry;

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

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclarePlayerGodHead>(15);
                    foreach (var item in dic)
                    {
                        DeclarePlayerGodHead tmp = new DeclarePlayerGodHead();
                        tmp.Color          = CfgStringLua.Get(item.Value[0]);
                        tmp.Id             = item.Value[1];
                        tmp.Name           = CfgStringLua.Get(item.Value[2]);
                        tmp.NeedFightPower = item.Value[3];
                        tmp.NeedItem       = CfgStringLua.Get(item.Value[4]);
                        tmp.Notice         = item.Value[5];
                        tmp.Power          = item.Value[6];
                        tmp.Propetry       = CfgStringLua.Get(item.Value[7]);

                        _dataCaches.Add(item.Key, tmp);
                    }
                }
                Record(startTime, DateTime.Now.Ticks, "PlayerGodHead");
            }
            if (_dataCaches == null && _fillDataCallBack != null)
            {
                if (_dataCaches == null)
                {
                    long startTime = DateTime.Now.Ticks;
                    _dataCaches = new Dictionary <int, DeclarePlayerGodHead>(15);
                    _fillDataCallBack(_dataCaches);
                    Record(startTime, DateTime.Now.Ticks, "PlayerGodHead");
                }
            }
        }
示例#3
0
 public static void Convert(Dictionary <int, DeclarePlayerGodHead> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(901, DeclarePlayerGodHead.Create(StringDefines.Key_58130, 901, StringDefines.Key_18002, 1000000, StringDefines.Key_58131, 1, 39600, StringDefines.Key_58132));
     data.Add(902, DeclarePlayerGodHead.Create(StringDefines.Key_58130, 902, StringDefines.Key_58133, 1200000, StringDefines.Key_58134, 1, 52799, StringDefines.Key_58135));
     data.Add(903, DeclarePlayerGodHead.Create(StringDefines.Key_58130, 903, StringDefines.Key_58136, 1600000, StringDefines.Key_58137, 1, 69966, StringDefines.Key_58138));
     data.Add(904, DeclarePlayerGodHead.Create(StringDefines.Key_58130, 904, StringDefines.Key_58139, 2100000, StringDefines.Key_58140, 1, 91081, StringDefines.Key_58141));
     data.Add(905, DeclarePlayerGodHead.Create(StringDefines.Key_58130, 905, StringDefines.Key_58142, 2700000, StringDefines.Key_58143, 1, 116164, StringDefines.Key_58144));
     data.Add(906, DeclarePlayerGodHead.Create(StringDefines.Key_58130, 906, StringDefines.Key_58145, 3400000, StringDefines.Key_58146, 1, 145203, StringDefines.Key_58147));
     data.Add(907, DeclarePlayerGodHead.Create(StringDefines.Key_58148, 907, StringDefines.Key_58149, 4200000, StringDefines.Key_58150, 1, 178207, StringDefines.Key_58151));
     data.Add(908, DeclarePlayerGodHead.Create(StringDefines.Key_58148, 908, StringDefines.Key_58152, 5100000, StringDefines.Key_58153, 1, 215171, StringDefines.Key_58154));
     data.Add(909, DeclarePlayerGodHead.Create(StringDefines.Key_58148, 909, StringDefines.Key_58155, 6100000, StringDefines.Key_58156, 1, 256091, StringDefines.Key_58157));
     data.Add(910, DeclarePlayerGodHead.Create(StringDefines.Key_58148, 910, StringDefines.Key_58158, 7200000, StringDefines.Key_58159, 1, 300976, StringDefines.Key_58160));
     data.Add(911, DeclarePlayerGodHead.Create(StringDefines.Key_58148, 911, StringDefines.Key_20659, 8400000, StringDefines.Key_58161, 1, 349818, StringDefines.Key_58162));
     data.Add(912, DeclarePlayerGodHead.Create(StringDefines.Key_58148, 912, StringDefines.Key_58163, 9700000, StringDefines.Key_58164, 1, 402619, StringDefines.Key_58165));
     data.Add(913, DeclarePlayerGodHead.Create(StringDefines.Key_58166, 913, StringDefines.Key_58167, 11100000, StringDefines.Key_58168, 1, 459381, StringDefines.Key_58169));
     data.Add(914, DeclarePlayerGodHead.Create(StringDefines.Key_58166, 914, StringDefines.Key_17930, 12600000, StringDefines.Key_58170, 1, 520104, StringDefines.Key_58171));
     data.Add(915, DeclarePlayerGodHead.Create(StringDefines.Key_58166, 915, StringDefines.Key_43508, 14200000, StringDefines.Key_58172, 1, 584787, StringDefines.Key_58173));
 }