Exemple #1
0
 public void UpdateWarArmy(JsonObject ObjWarArmy)
 {
     if (this.m_CityArmyList == null)
     {
         this.m_CityArmyList = new List <GArmy>();
     }
     else
     {
         this.m_CityArmyList.Clear();
     }
     ObjWarArmy = (JsonObject)ObjWarArmy["body"];
     ObjWarArmy = (JsonObject)ObjWarArmy["report"];
     if (ObjWarArmy != null)
     {
         JsonArray array = (JsonArray)ObjWarArmy["troops"];
         if (array != null)
         {
             foreach (JsonObject obj2 in array)
             {
                 GArmy item = new GArmy();
                 item.UpdateWarArmy(obj2);
                 this.m_CityArmyList.Add(item);
             }
             this.m_bScanArmy = true;
         }
     }
 }
Exemple #2
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;
        }
Exemple #3
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;
        }