Exemple #1
0
 public static void Convert(Dictionary <int, DeclareGuildUp> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(10001, DeclareGuildUp.Create(30, 1, StringDefines.Key_41883, 10001, 1, 7200, StringDefines.Key_41884, 50, StringDefines.Key_41885, 1));
     data.Add(10002, DeclareGuildUp.Create(32, 1, StringDefines.Key_41886, 10002, 2, 14400, StringDefines.Key_41887, 55, StringDefines.Key_41885, 1));
     data.Add(10003, DeclareGuildUp.Create(34, 2, StringDefines.Key_41888, 10003, 3, 21600, StringDefines.Key_41889, 60, StringDefines.Key_41885, 1));
     data.Add(10004, DeclareGuildUp.Create(36, 2, StringDefines.Key_41890, 10004, 4, 28800, StringDefines.Key_41891, 65, StringDefines.Key_41885, 1));
     data.Add(10005, DeclareGuildUp.Create(38, 3, StringDefines.Key_41892, 10005, 5, 57600, StringDefines.Key_41893, 70, StringDefines.Key_41885, 1));
     data.Add(10006, DeclareGuildUp.Create(40, 3, StringDefines.Key_41894, 10006, 6, 115200, StringDefines.Key_41895, 75, StringDefines.Key_41885, 1));
     data.Add(10007, DeclareGuildUp.Create(42, 4, StringDefines.Key_41896, 10007, 7, 230400, StringDefines.Key_41897, 80, StringDefines.Key_41885, 1));
     data.Add(10008, DeclareGuildUp.Create(44, 4, StringDefines.Key_41898, 10008, 8, 460800, StringDefines.Key_41899, 85, StringDefines.Key_41885, 1));
     data.Add(10009, DeclareGuildUp.Create(46, 5, StringDefines.Key_41900, 10009, 9, 921600, StringDefines.Key_41901, 90, StringDefines.Key_41885, 1));
     data.Add(10010, DeclareGuildUp.Create(50, 5, StringDefines.Key_41902, 10010, 10, 0, StringDefines.Key_20, 100, StringDefines.Key_41885, 1));
     data.Add(20001, DeclareGuildUp.Create(0, 0, StringDefines.Key_41903, 20001, 1, 2400, StringDefines.Key_13392, 0, StringDefines.Key_41904, 2));
     data.Add(20002, DeclareGuildUp.Create(0, 0, StringDefines.Key_41903, 20002, 2, 4800, StringDefines.Key_13395, 0, StringDefines.Key_41904, 2));
     data.Add(20003, DeclareGuildUp.Create(0, 0, StringDefines.Key_41903, 20003, 3, 7200, StringDefines.Key_33448, 0, StringDefines.Key_41904, 2));
     data.Add(20004, DeclareGuildUp.Create(0, 0, StringDefines.Key_41903, 20004, 4, 9600, StringDefines.Key_33459, 0, StringDefines.Key_41904, 2));
     data.Add(20005, DeclareGuildUp.Create(0, 0, StringDefines.Key_41903, 20005, 5, 19200, StringDefines.Key_33470, 0, StringDefines.Key_41904, 2));
     data.Add(20006, DeclareGuildUp.Create(0, 0, StringDefines.Key_41903, 20006, 6, 38400, StringDefines.Key_33481, 0, StringDefines.Key_41904, 2));
     data.Add(20007, DeclareGuildUp.Create(0, 0, StringDefines.Key_41903, 20007, 7, 76800, StringDefines.Key_33492, 0, StringDefines.Key_41904, 2));
     data.Add(20008, DeclareGuildUp.Create(0, 0, StringDefines.Key_41903, 20008, 8, 153600, StringDefines.Key_33503, 0, StringDefines.Key_41904, 2));
     data.Add(20009, DeclareGuildUp.Create(0, 0, StringDefines.Key_41903, 20009, 9, 307200, StringDefines.Key_41905, 0, StringDefines.Key_41904, 2));
     data.Add(20010, DeclareGuildUp.Create(0, 0, StringDefines.Key_41903, 20010, 10, 0, StringDefines.Key_20, 0, StringDefines.Key_41904, 2));
     data.Add(30001, DeclareGuildUp.Create(0, 0, StringDefines.Key_41903, 30001, 1, 2400, StringDefines.Key_13392, 0, StringDefines.Key_41906, 3));
     data.Add(30002, DeclareGuildUp.Create(0, 0, StringDefines.Key_41903, 30002, 2, 4800, StringDefines.Key_13395, 0, StringDefines.Key_41906, 3));
     data.Add(30003, DeclareGuildUp.Create(0, 0, StringDefines.Key_41903, 30003, 3, 7200, StringDefines.Key_33448, 0, StringDefines.Key_41906, 3));
     data.Add(30004, DeclareGuildUp.Create(0, 0, StringDefines.Key_41903, 30004, 4, 9600, StringDefines.Key_33459, 0, StringDefines.Key_41906, 3));
     data.Add(30005, DeclareGuildUp.Create(0, 0, StringDefines.Key_41903, 30005, 5, 19200, StringDefines.Key_33470, 0, StringDefines.Key_41906, 3));
     data.Add(30006, DeclareGuildUp.Create(0, 0, StringDefines.Key_41903, 30006, 6, 38400, StringDefines.Key_33481, 0, StringDefines.Key_41906, 3));
     data.Add(30007, DeclareGuildUp.Create(0, 0, StringDefines.Key_41903, 30007, 7, 76800, StringDefines.Key_33492, 0, StringDefines.Key_41906, 3));
     data.Add(30008, DeclareGuildUp.Create(0, 0, StringDefines.Key_41903, 30008, 8, 153600, StringDefines.Key_33503, 0, StringDefines.Key_41906, 3));
     data.Add(30009, DeclareGuildUp.Create(0, 0, StringDefines.Key_41903, 30009, 9, 307200, StringDefines.Key_41905, 0, StringDefines.Key_41906, 3));
     data.Add(30010, DeclareGuildUp.Create(0, 0, StringDefines.Key_41903, 30010, 10, 0, StringDefines.Key_20, 0, StringDefines.Key_41906, 3));
     data.Add(40001, DeclareGuildUp.Create(0, 0, StringDefines.Key_41903, 40001, 1, 2400, StringDefines.Key_13392, 0, StringDefines.Key_41907, 4));
     data.Add(40002, DeclareGuildUp.Create(0, 0, StringDefines.Key_41903, 40002, 2, 4800, StringDefines.Key_13395, 0, StringDefines.Key_41907, 4));
     data.Add(40003, DeclareGuildUp.Create(0, 0, StringDefines.Key_41903, 40003, 3, 7200, StringDefines.Key_33448, 0, StringDefines.Key_41907, 4));
     data.Add(40004, DeclareGuildUp.Create(0, 0, StringDefines.Key_41903, 40004, 4, 9600, StringDefines.Key_33459, 0, StringDefines.Key_41907, 4));
     data.Add(40005, DeclareGuildUp.Create(0, 0, StringDefines.Key_41903, 40005, 5, 19200, StringDefines.Key_33470, 0, StringDefines.Key_41907, 4));
     data.Add(40006, DeclareGuildUp.Create(0, 0, StringDefines.Key_41903, 40006, 6, 38400, StringDefines.Key_33481, 0, StringDefines.Key_41907, 4));
     data.Add(40007, DeclareGuildUp.Create(0, 0, StringDefines.Key_41903, 40007, 7, 76800, StringDefines.Key_33492, 0, StringDefines.Key_41907, 4));
     data.Add(40008, DeclareGuildUp.Create(0, 0, StringDefines.Key_41903, 40008, 8, 153600, StringDefines.Key_33503, 0, StringDefines.Key_41907, 4));
     data.Add(40009, DeclareGuildUp.Create(0, 0, StringDefines.Key_41903, 40009, 9, 307200, StringDefines.Key_41905, 0, StringDefines.Key_41907, 4));
     data.Add(40010, DeclareGuildUp.Create(0, 0, StringDefines.Key_41903, 40010, 10, 0, StringDefines.Key_20, 0, StringDefines.Key_41907, 4));
 }
Exemple #2
0
        public static DeclareGuildUp Create(int in_base_num, int in_command_num, string in_functional_describe, int in_id, int in_level, int in_needNum, string in_other, int in_question_reward, string in_resources, int in_type)
        {
            DeclareGuildUp tmp = new DeclareGuildUp();

            tmp._base_num            = in_base_num;
            tmp._command_num         = in_command_num;
            tmp._functional_describe = in_functional_describe;
            tmp._id              = in_id;
            tmp._level           = in_level;
            tmp._needNum         = in_needNum;
            tmp._other           = in_other;
            tmp._question_reward = in_question_reward;
            tmp._resources       = in_resources;
            tmp._type            = in_type;

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

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareGuildUp>(40);
                    foreach (var item in dic)
                    {
                        DeclareGuildUp tmp = new DeclareGuildUp();
                        tmp.BaseNum            = item.Value[0];
                        tmp.CommandNum         = item.Value[1];
                        tmp.FunctionalDescribe = CfgStringLua.Get(item.Value[2]);
                        tmp.Id             = item.Value[3];
                        tmp.Level          = item.Value[4];
                        tmp.NeedNum        = item.Value[5];
                        tmp.Other          = CfgStringLua.Get(item.Value[6]);
                        tmp.QuestionReward = item.Value[7];
                        tmp.Resources      = CfgStringLua.Get(item.Value[8]);
                        tmp.Type           = item.Value[9];

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