示例#1
0
        public void UpdateCityHighLevelHero(JsonObject ObjHighLevelHero, string heroOwnerName)
        {
            if (this.m_CityHighLevelHeroList == null)
            {
                this.m_CityHighLevelHeroList = new List <GArmy>();
            }
            GArmy item = new GArmy();

            item.UpdateCityAmy(ObjHighLevelHero);
            item.NationID   = this.nationId;
            item.PlayerName = heroOwnerName;
            this.m_CityHighLevelHeroList.Add(item);
            this.bHasHighLevelHero = true;
        }
示例#2
0
        public void UpdateCityArmy(JsonObject ObjCityArmy)
        {
            if (this.m_CityArmyList == null)
            {
                this.m_CityArmyList = new List <GArmy>();
            }
            else
            {
                this.m_CityArmyList.Clear();
            }
            ObjCityArmy = (JsonObject)ObjCityArmy["body"];
            JsonArray array = (JsonArray)ObjCityArmy["heroes"];

            foreach (JsonObject obj2 in array)
            {
                GArmy item = new GArmy();
                item.UpdateCityAmy(obj2);
                item.NationID = this.nationId;
                this.m_CityArmyList.Add(item);
            }
            this.m_bScanArmy = true;
        }