Пример #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[]> >("DataBossHome");
                if (dic == null)
                {
                    LuaEnv.SharedLuaEnv.DoString("DataBossHome = require 'Lua/Config/DataBossHome'");
                    dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataBossHome");
                }

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareBossHome>(31);
                    foreach (var item in dic)
                    {
                        DeclareBossHome tmp = new DeclareBossHome();
                        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.DropEquipShow = item.Value[6];
                        tmp.EnterLevel    = item.Value[7];
                        tmp.HeadIcon      = item.Value[8];
                        tmp.ID            = item.Value[9];
                        tmp.Layer         = item.Value[10];
                        tmp.Mapsid        = item.Value[11];
                        tmp.Monsterid     = item.Value[12];
                        tmp.Pos           = CfgStringLua.Get(item.Value[13]);
                        tmp.Power         = item.Value[14];
                        tmp.ReviveTime    = item.Value[15];
                        tmp.Size          = item.Value[16];

                        _dataCaches.Add(item.Key, tmp);
                    }
                }
                Record(startTime, DateTime.Now.Ticks, "BossHome");
            }
            if (_dataCaches == null && _fillDataCallBack != null)
            {
                if (_dataCaches == null)
                {
                    long startTime = DateTime.Now.Ticks;
                    _dataCaches = new Dictionary <int, DeclareBossHome>(31);
                    _fillDataCallBack(_dataCaches);
                    Record(startTime, DateTime.Now.Ticks, "BossHome");
                }
            }
        }
Пример #2
0
 public static void Convert(Dictionary <int, DeclareBossHome> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(10001, DeclareBossHome.Create(200, 1, 5100, StringDefines.Key_15194, StringDefines.Key_15195, StringDefines.Key_15196, 5, 200, 16, 10001, 1, 5100, 64005, StringDefines.Key_15197, 150000, 900000, 500));
     data.Add(10002, DeclareBossHome.Create(205, 1, 5100, StringDefines.Key_15198, StringDefines.Key_15195, StringDefines.Key_15196, 5, 200, 22, 10002, 1, 5100, 64006, StringDefines.Key_15199, 200000, 900000, 400));
     data.Add(10003, DeclareBossHome.Create(250, 1, 5100, StringDefines.Key_15200, StringDefines.Key_15195, StringDefines.Key_15201, 6, 200, 25, 10003, 1, 5100, 64007, StringDefines.Key_14544, 300000, 1200000, 400));
     data.Add(10004, DeclareBossHome.Create(260, 1, 5100, StringDefines.Key_15202, StringDefines.Key_15195, StringDefines.Key_15201, 6, 200, 3, 10004, 1, 5100, 64008, StringDefines.Key_14542, 380000, 1200000, 350));
     data.Add(10005, DeclareBossHome.Create(290, 1, 5100, StringDefines.Key_15203, StringDefines.Key_15195, StringDefines.Key_15204, 7, 200, 24, 10005, 1, 5100, 64009, StringDefines.Key_15205, 830000, 1500000, 400));
     data.Add(10006, DeclareBossHome.Create(300, 1, 5100, StringDefines.Key_15206, StringDefines.Key_15195, StringDefines.Key_15204, 7, 200, 21, 10006, 1, 5100, 64010, StringDefines.Key_14561, 970000, 1500000, 600));
     data.Add(10007, DeclareBossHome.Create(350, 1, 5100, StringDefines.Key_15207, StringDefines.Key_15195, StringDefines.Key_15208, 8, 200, 19, 10007, 1, 5100, 64011, StringDefines.Key_15209, 2010000, 2100000, 1300));
     data.Add(10008, DeclareBossHome.Create(250, 1, 5101, StringDefines.Key_15210, StringDefines.Key_15195, StringDefines.Key_15201, 6, 250, 34, 10008, 2, 5101, 64016, StringDefines.Key_15211, 300000, 1200000, 470));
     data.Add(10009, DeclareBossHome.Create(260, 1, 5101, StringDefines.Key_15212, StringDefines.Key_15195, StringDefines.Key_15201, 6, 250, 9, 10009, 2, 5101, 64017, StringDefines.Key_15213, 380000, 1200000, 460));
     data.Add(10010, DeclareBossHome.Create(300, 1, 5101, StringDefines.Key_15214, StringDefines.Key_15195, StringDefines.Key_15204, 7, 250, 12, 10010, 2, 5101, 64018, StringDefines.Key_15215, 970000, 1500000, 310));
     data.Add(10011, DeclareBossHome.Create(350, 1, 5101, StringDefines.Key_15216, StringDefines.Key_15195, StringDefines.Key_15208, 8, 250, 11, 10011, 2, 5101, 64019, StringDefines.Key_15217, 2010000, 2100000, 380));
     data.Add(10012, DeclareBossHome.Create(400, 1, 5101, StringDefines.Key_15218, StringDefines.Key_15195, StringDefines.Key_15219, 9, 250, 27, 10012, 2, 5101, 64020, StringDefines.Key_15220, 3970000, 3000000, 270));
     data.Add(10013, DeclareBossHome.Create(410, 1, 5101, StringDefines.Key_15221, StringDefines.Key_15195, StringDefines.Key_15219, 9, 250, 32, 10013, 2, 5101, 64021, StringDefines.Key_15222, 4450000, 3000000, 800));
     data.Add(10014, DeclareBossHome.Create(350, 1, 5102, StringDefines.Key_15223, StringDefines.Key_15195, StringDefines.Key_15208, 8, 350, 7, 10014, 3, 5102, 64027, StringDefines.Key_15224, 2010000, 2100000, 370));
     data.Add(10015, DeclareBossHome.Create(390, 1, 5102, StringDefines.Key_15225, StringDefines.Key_15195, StringDefines.Key_15219, 9, 350, 35, 10015, 3, 5102, 64028, StringDefines.Key_15226, 3640000, 3000000, 410));
     data.Add(10016, DeclareBossHome.Create(400, 1, 5102, StringDefines.Key_15227, StringDefines.Key_15195, StringDefines.Key_15219, 9, 350, 23, 10016, 3, 5102, 64029, StringDefines.Key_15228, 3970000, 3000000, 220));
     data.Add(10017, DeclareBossHome.Create(410, 1, 5102, StringDefines.Key_15229, StringDefines.Key_15195, StringDefines.Key_15219, 9, 350, 6, 10017, 3, 5102, 64030, StringDefines.Key_15230, 4450000, 3000000, 420));
     data.Add(10018, DeclareBossHome.Create(440, 1, 5102, StringDefines.Key_15231, StringDefines.Key_15195, StringDefines.Key_15232, 10, 350, 1, 10018, 3, 5102, 64031, StringDefines.Key_15233, 7850000, 3600000, 360));
     data.Add(10019, DeclareBossHome.Create(490, 1, 5102, StringDefines.Key_15234, StringDefines.Key_15195, StringDefines.Key_15235, 11, 350, 10, 10019, 3, 5102, 64032, StringDefines.Key_15236, 14760000, 4200000, 680));
     data.Add(10020, DeclareBossHome.Create(440, 1, 5103, StringDefines.Key_15237, StringDefines.Key_15195, StringDefines.Key_15232, 10, 440, 4, 10020, 4, 5103, 64038, StringDefines.Key_15238, 7850000, 3600000, 370));
     data.Add(10021, DeclareBossHome.Create(450, 1, 5103, StringDefines.Key_15239, StringDefines.Key_15195, StringDefines.Key_15232, 10, 440, 29, 10021, 4, 5103, 64039, StringDefines.Key_15240, 9190000, 3600000, 480));
     data.Add(10022, DeclareBossHome.Create(490, 1, 5103, StringDefines.Key_15241, StringDefines.Key_15195, StringDefines.Key_15235, 11, 440, 14, 10022, 4, 5103, 64040, StringDefines.Key_15242, 14760000, 4200000, 300));
     data.Add(10023, DeclareBossHome.Create(500, 1, 5103, StringDefines.Key_15243, StringDefines.Key_15195, StringDefines.Key_15235, 11, 440, 33, 10023, 4, 5103, 64041, StringDefines.Key_4, 16590000, 4200000, 300));
     data.Add(10024, DeclareBossHome.Create(510, 1, 5103, StringDefines.Key_15244, StringDefines.Key_15195, StringDefines.Key_15235, 11, 440, 30, 10024, 4, 5103, 64042, StringDefines.Key_15245, 25190000, 4200000, 480));
     data.Add(10025, DeclareBossHome.Create(550, 1, 5103, StringDefines.Key_15246, StringDefines.Key_15195, StringDefines.Key_15247, 12, 440, 5, 10025, 4, 5103, 64043, StringDefines.Key_15248, 27670000, 4800000, 680));
     data.Add(10026, DeclareBossHome.Create(540, 1, 5104, StringDefines.Key_15249, StringDefines.Key_15195, StringDefines.Key_15247, 12, 540, 18, 10026, 5, 5104, 64049, StringDefines.Key_15250, 27670000, 4800000, 380));
     data.Add(10027, DeclareBossHome.Create(550, 1, 5104, StringDefines.Key_15251, StringDefines.Key_15195, StringDefines.Key_15247, 12, 540, 15, 10027, 5, 5104, 64050, StringDefines.Key_15252, 39060000, 4800000, 320));
     data.Add(10028, DeclareBossHome.Create(590, 1, 5104, StringDefines.Key_15253, StringDefines.Key_15195, StringDefines.Key_15247, 12, 540, 17, 10028, 5, 5104, 64051, StringDefines.Key_15254, 42290000, 4800000, 350));
     data.Add(10029, DeclareBossHome.Create(600, 0, 5104, StringDefines.Key_15255, StringDefines.Key_15195, StringDefines.Key_15235, 13, 540, 31, 10029, 5, 5104, 64052, StringDefines.Key_15256, 60880000, 5400000, 400));
     data.Add(10030, DeclareBossHome.Create(650, 0, 5104, StringDefines.Key_15257, StringDefines.Key_15195, StringDefines.Key_15235, 13, 540, 26, 10030, 5, 5104, 64053, StringDefines.Key_15258, 63620000, 5400000, 350));
     data.Add(10031, DeclareBossHome.Create(690, 0, 5104, StringDefines.Key_15259, StringDefines.Key_15195, StringDefines.Key_15235, 14, 540, 20, 10031, 5, 5104, 64054, StringDefines.Key_15260, 42290000, 6000000, 1300));
 }
Пример #3
0
        public static DeclareBossHome Create(int in_bossLevel, int in_canShow, int in_cloneID, string in_coordinates, string in_describe, string in_drop, int in_dropEquipShow, 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)
        {
            DeclareBossHome tmp = new DeclareBossHome();

            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._dropEquipShow = in_dropEquipShow;
            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);
        }