예제 #1
0
        protected override void Success(ChatLog log)
        {
            ChatWindow component = (ChatWindow)((Component)this).get_gameObject().GetComponent <ChatWindow>();

            if (Object.op_Inequality((Object)component, (Object)null))
            {
                if (this.mIsSystemMessageMerge)
                {
                    component.SetChatLogAndSystemMessageMerge(log, this.mExcludeID);
                }
                else
                {
                    component.SetChatLog(log, ChatWindow.eChatType.Room);
                }
            }
            base.Success(log);
        }
 public override void OnSuccess(WWWResult www)
 {
     if (Network.IsError)
     {
         Network.EErrCode errCode = Network.ErrCode;
         Network.RemoveAPI();
         Network.IsIndicator = true;
         ((Behaviour)this).set_enabled(false);
         this.mSetup = false;
         this.ActivateOutputLinks(100);
     }
     else
     {
         WebAPI.JSON_BodyResponse <JSON_ChatLog> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <JSON_ChatLog> >(www.text);
         DebugUtility.Assert(jsonObject != null, "res == null");
         Network.RemoveAPI();
         Network.IsIndicator = true;
         ChatLog chatLog = new ChatLog();
         chatLog.Deserialize(jsonObject.body);
         if (chatLog == null || !Object.op_Inequality((Object)this, (Object)null))
         {
             return;
         }
         ChatWindow component = (ChatWindow)((Component)this).get_gameObject().GetComponent <ChatWindow>();
         if (Object.op_Inequality((Object)component, (Object)null))
         {
             if (this.mPinID == 0)
             {
                 component.ChatLog = chatLog;
             }
             else if (this.mPinID == 1)
             {
                 component.ChatLogOffical = chatLog;
             }
         }
         this.Success();
     }
 }
 public override void OnSuccess(WWWResult www)
 {
     if (Object.op_Equality((Object)this, (Object)null))
     {
         Network.RemoveAPI();
         Network.IsIndicator = true;
     }
     else if (Network.IsError)
     {
         Network.EErrCode errCode = Network.ErrCode;
         Network.RemoveAPI();
         Network.IsIndicator = true;
         ((Behaviour)this).set_enabled(false);
         this.mSetup = false;
         this.ActivateOutputLinks(100);
     }
     else
     {
         DebugMenu.Log("API", "chat:message:{" + www.text + "}");
         WebAPI.JSON_BodyResponse <JSON_ChatLog> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <JSON_ChatLog> >(www.text);
         DebugUtility.Assert(jsonObject != null, "res == null");
         Network.RemoveAPI();
         Network.IsIndicator = true;
         ChatLog log = new ChatLog();
         if (jsonObject.body != null)
         {
             log.Deserialize(jsonObject.body);
             MultiInvitationReceiveWindow.SetBadge(jsonObject.body.player != null && jsonObject.body.player.multi_inv != 0);
         }
         else
         {
             MultiInvitationReceiveWindow.SetBadge(false);
         }
         this.Success(log);
     }
 }
 protected virtual void Success(ChatLog log)
 {
     ((Behaviour)this).set_enabled(false);
     this.mSetup = false;
     this.ActivateOutputLinks(10);
 }