Beispiel #1
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[]> >("DataYyHuanJing");
                if (dic == null)
                {
                    LuaEnv.SharedLuaEnv.DoString("DataYyHuanJing = require 'Lua/Config/DataYyHuanJing'");
                    dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataYyHuanJing");
                }

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareYyHuanJing>(8);
                    foreach (var item in dic)
                    {
                        DeclareYyHuanJing tmp = new DeclareYyHuanJing();
                        tmp.BossLevel   = item.Value[0];
                        tmp.CanShow     = item.Value[1];
                        tmp.CloneID     = item.Value[2];
                        tmp.Coordinates = CfgStringLua.Get(item.Value[3]);
                        tmp.Describe    = CfgStringLua.Get(item.Value[4]);
                        tmp.Drop        = CfgStringLua.Get(item.Value[5]);
                        tmp.EnterLevel  = item.Value[6];
                        tmp.HeadIcon    = item.Value[7];
                        tmp.ID          = item.Value[8];
                        tmp.Layer       = item.Value[9];
                        tmp.Mapsid      = item.Value[10];
                        tmp.Monsterid   = item.Value[11];
                        tmp.Pos         = CfgStringLua.Get(item.Value[12]);
                        tmp.Power       = item.Value[13];
                        tmp.ReviveTime  = item.Value[14];
                        tmp.Size        = item.Value[15];

                        _dataCaches.Add(item.Key, tmp);
                    }
                }
                Record(startTime, DateTime.Now.Ticks, "YyHuanJing");
            }
            if (_dataCaches == null && _fillDataCallBack != null)
            {
                if (_dataCaches == null)
                {
                    long startTime = DateTime.Now.Ticks;
                    _dataCaches = new Dictionary <int, DeclareYyHuanJing>(8);
                    _fillDataCallBack(_dataCaches);
                    Record(startTime, DateTime.Now.Ticks, "YyHuanJing");
                }
            }
        }
Beispiel #2
0
 public static void Convert(Dictionary <int, DeclareYyHuanJing> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(30001, DeclareYyHuanJing.Create(260, 1, 5150, StringDefines.Key_20038, StringDefines.Key_20039, StringDefines.Key_20040, 260, 18, 30001, 1, 5150, 65001, StringDefines.Key_18276, 670000, 600000, 400));
     data.Add(30002, DeclareYyHuanJing.Create(280, 1, 5150, StringDefines.Key_20041, StringDefines.Key_20039, StringDefines.Key_20040, 260, 15, 30002, 1, 5150, 65002, StringDefines.Key_18278, 930000, 600000, 320));
     data.Add(30003, DeclareYyHuanJing.Create(300, 1, 5150, StringDefines.Key_20042, StringDefines.Key_20043, StringDefines.Key_20044, 260, 17, 30003, 1, 5150, 65003, StringDefines.Key_15250, 1230000, 1200000, 400));
     data.Add(30004, DeclareYyHuanJing.Create(320, 1, 5150, StringDefines.Key_20045, StringDefines.Key_20043, StringDefines.Key_20044, 260, 31, 30004, 1, 5150, 65004, StringDefines.Key_15252, 1690000, 1200000, 450));
     data.Add(30005, DeclareYyHuanJing.Create(340, 1, 5150, StringDefines.Key_20046, StringDefines.Key_20047, StringDefines.Key_20048, 260, 26, 30005, 1, 5150, 65005, StringDefines.Key_15254, 2120000, 1800000, 400));
     data.Add(30006, DeclareYyHuanJing.Create(360, 1, 5150, StringDefines.Key_20049, StringDefines.Key_20047, StringDefines.Key_20048, 260, 20, 30006, 1, 5150, 65006, StringDefines.Key_15256, 2740000, 1800000, 1200));
     data.Add(30007, DeclareYyHuanJing.Create(380, 1, 5150, StringDefines.Key_20050, StringDefines.Key_20051, StringDefines.Key_20052, 260, 19, 30007, 1, 5150, 65007, StringDefines.Key_15258, 3320000, 2400000, 1200));
     data.Add(30008, DeclareYyHuanJing.Create(400, 1, 5150, StringDefines.Key_20053, StringDefines.Key_20051, StringDefines.Key_20052, 260, 34, 30008, 1, 5150, 65008, StringDefines.Key_15260, 3970000, 3000000, 500));
 }
Beispiel #3
0
        public static DeclareYyHuanJing Create(int in_bossLevel, int in_canShow, int in_cloneID, string in_coordinates, string in_describe, string in_drop, int in_enterLevel, int in_head_icon, int in_iD, int in_layer, int in_mapsid, int in_monsterid, string in_pos, int in_power, int in_revive_time, int in_size)
        {
            DeclareYyHuanJing tmp = new DeclareYyHuanJing();

            tmp._bossLevel   = in_bossLevel;
            tmp._canShow     = in_canShow;
            tmp._cloneID     = in_cloneID;
            tmp._coordinates = in_coordinates;
            tmp._describe    = in_describe;
            tmp._drop        = in_drop;
            tmp._enterLevel  = in_enterLevel;
            tmp._head_icon   = in_head_icon;
            tmp._iD          = in_iD;
            tmp._layer       = in_layer;
            tmp._mapsid      = in_mapsid;
            tmp._monsterid   = in_monsterid;
            tmp._pos         = in_pos;
            tmp._power       = in_power;
            tmp._revive_time = in_revive_time;
            tmp._size        = in_size;

            return(tmp);
        }