Exemple #1
0
 public static void Convert(Dictionary <int, DeclareDreamlandMonster> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(50000350, DeclareDreamlandMonster.Create(1500, StringDefines.Key_0, 3, 50000350, 350, 162, 16, 50000, StringDefines.Key_1, 0, 500));
     data.Add(50001350, DeclareDreamlandMonster.Create(1500, StringDefines.Key_2, 4, 50001350, 350, 162, 22, 50001, StringDefines.Key_3, 0, 400));
     data.Add(50002350, DeclareDreamlandMonster.Create(1500, StringDefines.Key_2, 4, 50002350, 350, 162, 25, 50002, StringDefines.Key_4, 0, 400));
     data.Add(50003350, DeclareDreamlandMonster.Create(1500, StringDefines.Key_2, 4, 50003350, 350, 162, 3, 50003, StringDefines.Key_5, 0, 350));
     data.Add(50004350, DeclareDreamlandMonster.Create(1500, StringDefines.Key_6, 5, 50004350, 350, 162, 24, 50004, StringDefines.Key_7, 0, 400));
     data.Add(50005350, DeclareDreamlandMonster.Create(1500, StringDefines.Key_6, 5, 50005350, 350, 162, 21, 50005, StringDefines.Key_8, 0, 600));
     data.Add(50006350, DeclareDreamlandMonster.Create(1500, StringDefines.Key_6, 5, 50006350, 350, 162, 19, 50006, StringDefines.Key_9, 0, 1300));
     data.Add(50008350, DeclareDreamlandMonster.Create(1500, StringDefines.Key_10, 6, 50008350, 350, 162, 12, 50008, StringDefines.Key_11, 0, 310));
     data.Add(50007351, DeclareDreamlandMonster.Create(1501, StringDefines.Key_10, 6, 50007351, 351, 162, 9, 50007, StringDefines.Key_1, 0, 460));
     data.Add(50009351, DeclareDreamlandMonster.Create(1501, StringDefines.Key_10, 6, 50009351, 351, 162, 11, 50009, StringDefines.Key_3, 0, 380));
     data.Add(50010351, DeclareDreamlandMonster.Create(1501, StringDefines.Key_10, 6, 50010351, 351, 162, 27, 50010, StringDefines.Key_4, 0, 270));
     data.Add(50013351, DeclareDreamlandMonster.Create(1501, StringDefines.Key_12, 7, 50013351, 351, 162, 23, 50013, StringDefines.Key_5, 0, 220));
     data.Add(50014351, DeclareDreamlandMonster.Create(1501, StringDefines.Key_12, 7, 50014351, 351, 162, 6, 50014, StringDefines.Key_7, 0, 420));
     data.Add(50015351, DeclareDreamlandMonster.Create(1501, StringDefines.Key_12, 7, 50015351, 351, 162, 1, 50015, StringDefines.Key_8, 0, 360));
     data.Add(50018351, DeclareDreamlandMonster.Create(1501, StringDefines.Key_13, 8, 50018351, 351, 162, 4, 50018, StringDefines.Key_9, 0, 380));
     data.Add(50021351, DeclareDreamlandMonster.Create(1501, StringDefines.Key_14, 9, 50021351, 351, 162, 33, 50021, StringDefines.Key_11, 0, 300));
     data.Add(50011352, DeclareDreamlandMonster.Create(1502, StringDefines.Key_10, 6, 50011352, 352, 162, 32, 50011, StringDefines.Key_1, 0, 800));
     data.Add(50012352, DeclareDreamlandMonster.Create(1502, StringDefines.Key_10, 6, 50012352, 352, 162, 35, 50012, StringDefines.Key_3, 0, 410));
     data.Add(50016352, DeclareDreamlandMonster.Create(1502, StringDefines.Key_12, 7, 50016352, 352, 162, 10, 50016, StringDefines.Key_4, 0, 680));
     data.Add(50017352, DeclareDreamlandMonster.Create(1502, StringDefines.Key_12, 7, 50017352, 352, 162, 2, 50017, StringDefines.Key_5, 0, 380));
     data.Add(50019352, DeclareDreamlandMonster.Create(1502, StringDefines.Key_13, 8, 50019352, 352, 162, 29, 50019, StringDefines.Key_7, 0, 450));
     data.Add(50020352, DeclareDreamlandMonster.Create(1502, StringDefines.Key_13, 8, 50020352, 352, 162, 14, 50020, StringDefines.Key_8, 0, 280));
     data.Add(50022352, DeclareDreamlandMonster.Create(1502, StringDefines.Key_14, 9, 50022352, 352, 162, 30, 50022, StringDefines.Key_9, 0, 440));
     data.Add(50023352, DeclareDreamlandMonster.Create(1502, StringDefines.Key_14, 9, 50023352, 352, 162, 5, 50023, StringDefines.Key_11, 0, 550));
     data.Add(50024352, DeclareDreamlandMonster.Create(1502, StringDefines.Key_14, 9, 50024352, 352, 162, 28, 50024, StringDefines.Key_15, 0, 340));
     data.Add(50025353, DeclareDreamlandMonster.Create(1503, StringDefines.Key_16, 10, 50025353, 353, 162, 18, 50025, StringDefines.Key_3, 0, 450));
     data.Add(50026353, DeclareDreamlandMonster.Create(1503, StringDefines.Key_16, 10, 50026353, 353, 162, 15, 50026, StringDefines.Key_4, 0, 280));
     data.Add(50027353, DeclareDreamlandMonster.Create(1503, StringDefines.Key_16, 10, 50027353, 353, 162, 17, 50027, StringDefines.Key_5, 0, 440));
     data.Add(50028353, DeclareDreamlandMonster.Create(1503, StringDefines.Key_16, 10, 50028353, 353, 162, 31, 50028, StringDefines.Key_7, 0, 550));
     data.Add(50029353, DeclareDreamlandMonster.Create(1503, StringDefines.Key_17, 11, 50029353, 353, 162, 26, 50029, StringDefines.Key_8, 0, 340));
     data.Add(50030353, DeclareDreamlandMonster.Create(1503, StringDefines.Key_17, 11, 50030353, 353, 162, 19, 50030, StringDefines.Key_9, 0, 1300));
     data.Add(50031353, DeclareDreamlandMonster.Create(1503, StringDefines.Key_17, 11, 50031353, 353, 162, 30, 50031, StringDefines.Key_11, 0, 440));
     data.Add(50032353, DeclareDreamlandMonster.Create(1503, StringDefines.Key_17, 11, 50032353, 353, 162, 33, 50032, StringDefines.Key_15, 0, 300));
     data.Add(50033354, DeclareDreamlandMonster.Create(1504, StringDefines.Key_18, 12, 50033354, 354, 162, 17, 50033, StringDefines.Key_1, 0, 440));
     data.Add(50034354, DeclareDreamlandMonster.Create(1504, StringDefines.Key_18, 12, 50034354, 354, 162, 31, 50034, StringDefines.Key_3, 0, 550));
     data.Add(50035354, DeclareDreamlandMonster.Create(1504, StringDefines.Key_18, 12, 50035354, 354, 162, 26, 50035, StringDefines.Key_4, 0, 340));
     data.Add(50036354, DeclareDreamlandMonster.Create(1504, StringDefines.Key_18, 12, 50036354, 354, 162, 19, 50036, StringDefines.Key_5, 0, 1300));
     data.Add(50037354, DeclareDreamlandMonster.Create(1504, StringDefines.Key_18, 13, 50037354, 354, 162, 19, 50037, StringDefines.Key_7, 1, 1300));
     data.Add(50038354, DeclareDreamlandMonster.Create(1504, StringDefines.Key_18, 13, 50038354, 354, 162, 19, 50038, StringDefines.Key_8, 1, 1300));
     data.Add(50039354, DeclareDreamlandMonster.Create(1504, StringDefines.Key_18, 13, 50039354, 354, 162, 9, 50039, StringDefines.Key_9, 1, 460));
     data.Add(50040354, DeclareDreamlandMonster.Create(1504, StringDefines.Key_18, 13, 50040354, 354, 162, 12, 50040, StringDefines.Key_11, 1, 310));
 }
        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[]> >("DataDreamlandMonster");
                if (dic == null)
                {
                    LuaEnv.SharedLuaEnv.DoString("DataDreamlandMonster = require 'Lua/Config/DataDreamlandMonster'");
                    dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataDreamlandMonster");
                }

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareDreamlandMonster>(41);
                    foreach (var item in dic)
                    {
                        DeclareDreamlandMonster tmp = new DeclareDreamlandMonster();
                        tmp.CloneMap       = item.Value[0];
                        tmp.Drop           = CfgStringLua.Get(item.Value[1]);
                        tmp.DropEquipShow  = item.Value[2];
                        tmp.ID             = item.Value[3];
                        tmp.Mapsid         = item.Value[4];
                        tmp.ModelRotat     = item.Value[5];
                        tmp.MonsterPicture = item.Value[6];
                        tmp.Monsterid      = item.Value[7];
                        tmp.Pos            = CfgStringLua.Get(item.Value[8]);
                        tmp.Shielding      = item.Value[9];
                        tmp.Size           = item.Value[10];

                        _dataCaches.Add(item.Key, tmp);
                    }
                }
                Record(startTime, DateTime.Now.Ticks, "DreamlandMonster");
            }
            if (_dataCaches == null && _fillDataCallBack != null)
            {
                if (_dataCaches == null)
                {
                    long startTime = DateTime.Now.Ticks;
                    _dataCaches = new Dictionary <int, DeclareDreamlandMonster>(41);
                    _fillDataCallBack(_dataCaches);
                    Record(startTime, DateTime.Now.Ticks, "DreamlandMonster");
                }
            }
        }
        public static DeclareDreamlandMonster Create(int in_clone_map, string in_drop, int in_dropEquipShow, int in_iD, int in_mapsid, int in_model_rotat, int in_monster_picture, int in_monsterid, string in_pos, int in_shielding, int in_size)
        {
            DeclareDreamlandMonster tmp = new DeclareDreamlandMonster();

            tmp._clone_map       = in_clone_map;
            tmp._drop            = in_drop;
            tmp._dropEquipShow   = in_dropEquipShow;
            tmp._iD              = in_iD;
            tmp._mapsid          = in_mapsid;
            tmp._model_rotat     = in_model_rotat;
            tmp._monster_picture = in_monster_picture;
            tmp._monsterid       = in_monsterid;
            tmp._pos             = in_pos;
            tmp._shielding       = in_shielding;
            tmp._size            = in_size;

            return(tmp);
        }