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

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

                        _dataCaches.Add(item.Key, tmp);
                    }
                }
                Record(startTime, DateTime.Now.Ticks, "BossPersonal");
            }
            if (_dataCaches == null && _fillDataCallBack != null)
            {
                if (_dataCaches == null)
                {
                    long startTime = DateTime.Now.Ticks;
                    _dataCaches = new Dictionary <int, DeclareBossPersonal>(13);
                    _fillDataCallBack(_dataCaches);
                    Record(startTime, DateTime.Now.Ticks, "BossPersonal");
                }
            }
        }
예제 #2
0
        public static DeclareBossPersonal Create(int in_bossLevel, int in_canShow, int in_cloneID, string in_drop, int in_dropEquipShow, int in_enterLevel, int in_head_icon, int in_iD, int in_mapsid, int in_monsterid, string in_pos, int in_power, int in_size, string in_specialDrop)
        {
            DeclareBossPersonal tmp = new DeclareBossPersonal();

            tmp._bossLevel     = in_bossLevel;
            tmp._canShow       = in_canShow;
            tmp._cloneID       = in_cloneID;
            tmp._drop          = in_drop;
            tmp._dropEquipShow = in_dropEquipShow;
            tmp._enterLevel    = in_enterLevel;
            tmp._head_icon     = in_head_icon;
            tmp._iD            = in_iD;
            tmp._mapsid        = in_mapsid;
            tmp._monsterid     = in_monsterid;
            tmp._pos           = in_pos;
            tmp._power         = in_power;
            tmp._size          = in_size;
            tmp._specialDrop   = in_specialDrop;

            return(tmp);
        }
예제 #3
0
 public static void Convert(Dictionary <int, DeclareBossPersonal> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(20001, DeclareBossPersonal.Create(150, 1, 5170, StringDefines.Key_41868, 5, 150, 13, 20001, 5170, 66001, StringDefines.Key_41869, 110000, 430, StringDefines.Key_41870));
     data.Add(20002, DeclareBossPersonal.Create(200, 1, 5171, StringDefines.Key_41868, 6, 150, 34, 20002, 5170, 66002, StringDefines.Key_41869, 190000, 470, StringDefines.Key_41871));
     data.Add(20003, DeclareBossPersonal.Create(250, 1, 5172, StringDefines.Key_41872, 6, 200, 8, 20003, 5170, 66003, StringDefines.Key_41869, 380000, 300, StringDefines.Key_41873));
     data.Add(20004, DeclareBossPersonal.Create(300, 1, 5173, StringDefines.Key_41872, 7, 250, 7, 20004, 5170, 66004, StringDefines.Key_41869, 970000, 370, StringDefines.Key_41874));
     data.Add(20005, DeclareBossPersonal.Create(350, 1, 5174, StringDefines.Key_41875, 8, 300, 2, 20005, 5170, 66005, StringDefines.Key_41869, 2010000, 370, StringDefines.Key_41876));
     data.Add(20006, DeclareBossPersonal.Create(400, 1, 5175, StringDefines.Key_41877, 9, 350, 4, 20006, 5170, 66006, StringDefines.Key_41869, 3970000, 370, StringDefines.Key_41878));
     data.Add(20007, DeclareBossPersonal.Create(450, 1, 5176, StringDefines.Key_41877, 10, 400, 28, 20007, 5170, 66007, StringDefines.Key_41869, 9190000, 350, StringDefines.Key_41879));
     data.Add(20008, DeclareBossPersonal.Create(500, 1, 5177, StringDefines.Key_41877, 11, 450, 18, 20008, 5170, 66008, StringDefines.Key_41869, 16590000, 380, StringDefines.Key_41880));
     data.Add(20009, DeclareBossPersonal.Create(550, 1, 5178, StringDefines.Key_41881, 12, 500, 19, 20009, 5170, 66009, StringDefines.Key_41869, 27670000, 1300, StringDefines.Key_41882));
     data.Add(20010, DeclareBossPersonal.Create(600, 0, 5179, StringDefines.Key_41881, 13, 550, 32, 20010, 5170, 66010, StringDefines.Key_41869, 42290000, 800, StringDefines.Key_41880));
     data.Add(20011, DeclareBossPersonal.Create(650, 0, 5180, StringDefines.Key_41881, 14, 600, 10, 20011, 5170, 66011, StringDefines.Key_41869, 60880000, 680, StringDefines.Key_41880));
     data.Add(20012, DeclareBossPersonal.Create(700, 0, 5181, StringDefines.Key_41881, 15, 650, 5, 20012, 5170, 66012, StringDefines.Key_41869, 83910000, 550, StringDefines.Key_41880));
     data.Add(20013, DeclareBossPersonal.Create(750, 0, 5182, StringDefines.Key_41881, 15, 700, 20, 20013, 5170, 66013, StringDefines.Key_41869, 83910000, 1300, StringDefines.Key_41880));
 }