Example #1
0
 private void onReqSkillSuccess(BaseWWWRequest obj)
 {
     try
     {
         this.skillResponse = new JsonReader().Read<SkillShipData>(base.UTF8String);
         base.responseData = this.skillResponse;
         if (this.skillResponse.eid != 0)
         {
             this.onReqSkillFail(obj);
         }
         else
         {
             if (this.skillResponse.shipVO != null)
             {
                 GameData.instance.UpdateUserShip(this.skillResponse.shipVO);
             }
             this.OnSkillSuccess(EventArgs.Empty);
         }
     }
     catch (Exception exception)
     {
         z.log(exception.Message);
         this.onReqSkillFail(obj);
     }
 }
 private void onReqSkillSuccess(BaseWWWRequest obj)
 {
     try
     {
         if (this.needZip)
         {
             this.skillResponse = JsonReader.Deserialize<SkillShipData>(base.UTF8String);
         }
         else
         {
             this.skillResponse = JsonReader.Deserialize<SkillShipData>(base.www.text);
         }
         base.responseData = this.skillResponse;
         if (this.skillResponse.eid != 0)
         {
             this.onReqSkillFail(obj);
         }
         else
         {
             if (this.skillResponse.shipVO != null)
             {
                 GameData.instance.UpdateUserShip(this.skillResponse.shipVO);
             }
             this.OnSkillSuccess(EventArgs.Empty);
         }
     }
     catch (Exception exception)
     {
         Debug.Log(exception);
         base.parseException = exception;
         this.onReqSkillFail(obj);
     }
 }
Example #3
0
 private void onReqSkillSuccess(BaseWWWRequest obj)
 {
     try
     {
         this.skillResponse = new JsonReader().Read <SkillShipData>(base.UTF8String);
         base.responseData  = this.skillResponse;
         if (this.skillResponse.eid != 0)
         {
             this.onReqSkillFail(obj);
         }
         else
         {
             if (this.skillResponse.shipVO != null)
             {
                 GameData.instance.UpdateUserShip(this.skillResponse.shipVO);
             }
             this.OnSkillSuccess(EventArgs.Empty);
         }
     }
     catch (Exception exception)
     {
         z.log(exception.Message);
         this.onReqSkillFail(obj);
     }
 }