public override void OnSuccess(WWWResult www) { if (Network.IsError) { if (Network.ErrCode != Network.EErrCode.ChatMaintenance) { return; } this.ChatMaintenance(); } else { WebAPI.JSON_BodyResponse <JSON_ChatBlackList> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <JSON_ChatBlackList> >(www.text); DebugUtility.Assert(jsonObject != null, "res == null"); Network.RemoveAPI(); ChatBlackList chatBlackList = new ChatBlackList(); chatBlackList.Deserialize(jsonObject.body); if (chatBlackList == null) { return; } BlackList componentInChildren = (BlackList)((Component)this).GetComponentInChildren <BlackList>(); if (Object.op_Inequality((Object)componentInChildren, (Object)null)) { componentInChildren.BList = chatBlackList; } this.Success(); } }
public override void OnSuccess(WWWResult www) { if (Network.IsError) { if (Network.ErrCode != Network.EErrCode.ChatMaintenance) { return; } this.ChatMaintenance(); } else { WebAPI.JSON_BodyResponse <JSON_ChatBlackList> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <JSON_ChatBlackList> >(www.text); DebugUtility.Assert(jsonObject != null, "res == null"); Network.RemoveAPI(); ChatBlackList chatBlackList = new ChatBlackList(); chatBlackList.Deserialize(jsonObject.body); if (chatBlackList == null) { return; } GlobalVars.BlockList.Clear(); if (this.IsGetOnly) { foreach (ChatBlackListParam list in chatBlackList.lists) { GlobalVars.BlockList.Add(list.uid); } } else { BlackList component = (BlackList)((Component)this).get_gameObject().GetComponent <BlackList>(); if (Object.op_Inequality((Object)component, (Object)null)) { component.BList = chatBlackList; } } this.Success(); } }