Пример #1
0
        public static DeclareGuildOfficial Create(int in_canAgree, int in_canAlter, int in_canCall, int in_canDestory, int in_canHan, int in_canInvite, int in_canKick, int in_canSetOfficial, int in_canUp, int in_city_match, int in_distribution_itme, int in_guild_fighting, int in_kuafu_match, int in_level, int in_modify_office_according, int in_num, int in_research_skill, int in_voice)
        {
            DeclareGuildOfficial tmp = new DeclareGuildOfficial();

            tmp._canAgree                = in_canAgree;
            tmp._canAlter                = in_canAlter;
            tmp._canCall                 = in_canCall;
            tmp._canDestory              = in_canDestory;
            tmp._canHan                  = in_canHan;
            tmp._canInvite               = in_canInvite;
            tmp._canKick                 = in_canKick;
            tmp._canSetOfficial          = in_canSetOfficial;
            tmp._canUp                   = in_canUp;
            tmp._city_match              = in_city_match;
            tmp._distribution_itme       = in_distribution_itme;
            tmp._guild_fighting          = in_guild_fighting;
            tmp._kuafu_match             = in_kuafu_match;
            tmp._level                   = in_level;
            tmp._modify_office_according = in_modify_office_according;
            tmp._num            = in_num;
            tmp._research_skill = in_research_skill;
            tmp._voice          = in_voice;

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

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareGuildOfficial>(5);
                    foreach (var item in dic)
                    {
                        DeclareGuildOfficial tmp = new DeclareGuildOfficial();
                        tmp.CanAgree              = item.Value[0];
                        tmp.CanAlter              = item.Value[1];
                        tmp.CanCall               = item.Value[2];
                        tmp.CanDestory            = item.Value[3];
                        tmp.CanHan                = item.Value[4];
                        tmp.CanInvite             = item.Value[5];
                        tmp.CanKick               = item.Value[6];
                        tmp.CanSetOfficial        = item.Value[7];
                        tmp.CanUp                 = item.Value[8];
                        tmp.CityMatch             = item.Value[9];
                        tmp.DistributionItme      = item.Value[10];
                        tmp.GuildFighting         = item.Value[11];
                        tmp.KuafuMatch            = item.Value[12];
                        tmp.Level                 = item.Value[13];
                        tmp.ModifyOfficeAccording = item.Value[14];
                        tmp.Num           = item.Value[15];
                        tmp.ResearchSkill = item.Value[16];
                        tmp.Voice         = item.Value[17];

                        _dataCaches.Add(item.Key, tmp);
                    }
                }
                Record(startTime, DateTime.Now.Ticks, "GuildOfficial");
            }
            if (_dataCaches == null && _fillDataCallBack != null)
            {
                if (_dataCaches == null)
                {
                    long startTime = DateTime.Now.Ticks;
                    _dataCaches = new Dictionary <int, DeclareGuildOfficial>(5);
                    _fillDataCallBack(_dataCaches);
                    Record(startTime, DateTime.Now.Ticks, "GuildOfficial");
                }
            }
        }
Пример #3
0
 public static void Convert(Dictionary <int, DeclareGuildOfficial> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(0, DeclareGuildOfficial.Create(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1000, 0, 0));
     data.Add(1, DeclareGuildOfficial.Create(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1000, 0, 0));
     data.Add(2, DeclareGuildOfficial.Create(1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 2, 1, 3, 0, 0));
     data.Add(3, DeclareGuildOfficial.Create(1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 3, 1, 3, 1, 0));
     data.Add(4, DeclareGuildOfficial.Create(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 0));
 }