Пример #1
0
 public static void Convert(Dictionary <int, DeclareGuildIcon> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(1, DeclareGuildIcon.Create(479, 1));
     data.Add(2, DeclareGuildIcon.Create(480, 2));
     data.Add(3, DeclareGuildIcon.Create(481, 3));
     data.Add(4, DeclareGuildIcon.Create(482, 4));
     data.Add(5, DeclareGuildIcon.Create(483, 5));
     data.Add(6, DeclareGuildIcon.Create(484, 6));
     data.Add(7, DeclareGuildIcon.Create(485, 7));
     data.Add(8, DeclareGuildIcon.Create(486, 8));
     data.Add(9, DeclareGuildIcon.Create(487, 9));
     data.Add(10, DeclareGuildIcon.Create(488, 10));
     data.Add(11, DeclareGuildIcon.Create(489, 11));
     data.Add(12, DeclareGuildIcon.Create(490, 12));
     data.Add(13, DeclareGuildIcon.Create(491, 13));
     data.Add(14, DeclareGuildIcon.Create(492, 14));
     data.Add(15, DeclareGuildIcon.Create(493, 15));
     data.Add(16, DeclareGuildIcon.Create(494, 16));
     data.Add(17, DeclareGuildIcon.Create(495, 17));
     data.Add(18, DeclareGuildIcon.Create(496, 18));
     data.Add(19, DeclareGuildIcon.Create(497, 19));
     data.Add(20, DeclareGuildIcon.Create(498, 20));
 }
Пример #2
0
        public static DeclareGuildIcon Create(int in_icon, int in_num)
        {
            DeclareGuildIcon tmp = new DeclareGuildIcon();

            tmp._icon = in_icon;
            tmp._num  = in_num;

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

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareGuildIcon>(20);
                    foreach (var item in dic)
                    {
                        DeclareGuildIcon tmp = new DeclareGuildIcon();
                        tmp.Icon = item.Value[0];
                        tmp.Num  = item.Value[1];

                        _dataCaches.Add(item.Key, tmp);
                    }
                }
                Record(startTime, DateTime.Now.Ticks, "GuildIcon");
            }
            if (_dataCaches == null && _fillDataCallBack != null)
            {
                if (_dataCaches == null)
                {
                    long startTime = DateTime.Now.Ticks;
                    _dataCaches = new Dictionary <int, DeclareGuildIcon>(20);
                    _fillDataCallBack(_dataCaches);
                    Record(startTime, DateTime.Now.Ticks, "GuildIcon");
                }
            }
        }