protected override void OnGetMsg(MobaMessage msg) { base.DebugMessage = ((base.LastError != 0) ? "===>好友内容取失败" : "===>好友内容获取成功"); if (msg != null) { OperationResponse operationResponse = msg.Param as OperationResponse; if (operationResponse != null) { MobaFriendCode mobaFriendCode = MVC_MessageManager.NotifyModel_to_Friend((ClientMsg)msg.ID); base.LastMsgType = msg.ID; switch (mobaFriendCode) { case MobaFriendCode.Friend_ApplyAddFriend: this.OnGetMsg_ApplyAddFriend(operationResponse); break; case MobaFriendCode.Friend_GetFriendList: this.OnGetMsg_FriendList(operationResponse); break; case MobaFriendCode.Friend_RaderFindFriend: this.OnGetMsg_RadarFindFriend(operationResponse); break; case MobaFriendCode.Friend_ModifyFriendStatus: this.OnGetMsg_ModifyFriendStatus(operationResponse); break; } } } base.Valid = ((base.LastError == 0 || base.LastError == 20109 || base.LastError == 20105 || base.LastError == 20106 || base.LastError == 20107 || base.LastError == 20104 || base.LastError == 20101) && null != base.Data); base.TriggerListners(); }
protected override void OnGetMsg(MobaMessage msg) { base.LastError = 505; OperationResponse operationResponse = msg.Param as OperationResponse; if (operationResponse != null) { MobaFriendCode mobaFriendCode = MVC_MessageManager.NotifyModel_to_Friend((ClientMsg)msg.ID); MobaFriendCode mobaFriendCode2 = mobaFriendCode; if (mobaFriendCode2 == MobaFriendCode.Friend_GetFriendList) { this.OnGetMsg_GetFriendList(operationResponse); } } base.TriggerListners(); }
protected override void OnGetMsg(MobaMessage msg) { base.LastError = 505; OperationResponse operationResponse = msg.Param as OperationResponse; if (operationResponse != null) { switch (MVC_MessageManager.NotifyModel_to_Friend((ClientMsg)msg.ID)) { case MobaFriendCode.Friend_GetFriendList: this.OnGetMsg_GetFriendList(operationResponse); break; case MobaFriendCode.Friend_ModifyFriendStatus: this.OnGetMsg_TryModifyFriendStatus(operationResponse); break; } } base.TriggerListners(); }
public static MobaMessageType ClientMsg_to_RawCode(ClientMsg code, out int retCode) { MobaMessageType result = MobaMessageType.Client; retCode = 0; if (code >= ClientMsg.NotifyModel_master_begin && code < ClientMsg.NotifyModel_master_end) { retCode = (int)MVC_MessageManager.NotifyModel_to_Master(code); result = MobaMessageType.MasterCode; } else if (code >= ClientMsg.NotifyModel_game_begin && code < ClientMsg.NotifyModel_game_end) { retCode = (int)MVC_MessageManager.NotifyModel_to_Game(code); result = MobaMessageType.GameCode; } else if (code >= ClientMsg.NotifyModel_friend_begin && code < ClientMsg.NotifyModel_friend_end) { retCode = (int)MVC_MessageManager.NotifyModel_to_Friend(code); result = MobaMessageType.FriendCode; } else if (code >= ClientMsg.NotifyModel_chat_begin && code < ClientMsg.NotifyModel_chat_end) { retCode = (int)MVC_MessageManager.NotifyModel_to_Chat(code); result = MobaMessageType.ChatCode; } else if (code >= ClientMsg.NotifyModel_teamroom_begin && code < ClientMsg.NotifyModel_teamroom_end) { retCode = (int)MVC_MessageManager.NotifyModel_to_TeamRoom(code); result = MobaMessageType.FriendCode; } else if (code >= ClientMsg.NotifyModel_userdata_begin && code < ClientMsg.NotifyModel_userdata_end) { retCode = (int)MVC_MessageManager.NotifyModel_to_UserData(code); result = MobaMessageType.UserDataCode; } else if (code >= ClientMsg.NotifyView_master_begin && code < ClientMsg.NotifyView_game_begin) { retCode = (int)MVC_MessageManager.NotifyView_to_Master(code); result = MobaMessageType.MasterCode; } else if (code >= ClientMsg.NotifyView_game_begin && code < ClientMsg.NotifyView_game_end) { retCode = (int)MVC_MessageManager.NotifyView_to_Game(code); result = MobaMessageType.GameCode; } else if (code >= ClientMsg.NotifyView_friend_begin && code < ClientMsg.NotifyView_friend_end) { retCode = (int)MVC_MessageManager.NotifyView_to_Friend(code); result = MobaMessageType.FriendCode; } else if (code >= ClientMsg.NotifyView_chat_begin && code < ClientMsg.NotifyView_chat_end) { retCode = (int)MVC_MessageManager.NotifyView_to_Chat(code); result = MobaMessageType.ChatCode; } else if (code >= ClientMsg.NotifyView_teamroom_begin && code < ClientMsg.NotifyView_teamroom_end) { retCode = (int)MVC_MessageManager.NotifyView_to_TeamRoom(code); result = MobaMessageType.FriendCode; } else if (code >= ClientMsg.NotifyView_userdata_begin && code < ClientMsg.NotifyView_userdata_end) { retCode = (int)MVC_MessageManager.NotifyView_to_UserData(code); result = MobaMessageType.UserDataCode; } return(result); }