Beispiel #1
0
        private AllianceWarConfig ParseWarConfigInfo(GM.DataCache.AllianceWarConfig obj)
        {
            if (obj == null)
            {
                return(null);
            }
            AllianceWarConfig tp1 = new AllianceWarConfig();

            tp1.name  = obj.Name;
            tp1.value = obj.Value;
            return(tp1);
        }
Beispiel #2
0
        private bool InitAllianceWarConfig(GM.DataCache.ConditionAlliance tbl)
        {
            if (tbl == null)
            {
                EB.Debug.LogError("InitAllianceWarReward:tbl is null");
                return(false);
            }

            mWarConfigList = new List <AllianceWarConfig>();
            for (int i = 0; i < tbl.AllianceWarConfigLength; i++)
            {
                AllianceWarConfig tpl = ParseWarConfigInfo(tbl.GetAllianceWarConfig(i));
                if (tpl != null)
                {
                    mWarConfigList.Add(tpl);
                }
            }

            return(true);
        }