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(); }
private static void PreHandler(MobaFriendCode code, MobaMessage msg) { if (MVC_MessageManager.dicMabaFriendPreHandler.ContainsKey(code)) { foreach (MobaMessageFunc current in MVC_MessageManager.dicMabaFriendPreHandler[code]) { current(msg); } } }
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(); }
public static MobaMessage GetMessage(MobaFriendCode msgID, object msgParam, float delayTime = 0f) { return(new MobaMessage(MobaMessageType.FriendCode, (int)msgID, msgParam, delayTime, null)); }
public static void UnRegistMessage(MobaFriendCode msgID, MobaMessageFunc msgFunc) { MobaMessageManager.UnRegistMessage(MobaMessageType.FriendCode, (int)msgID, msgFunc); }
private void DelePhotonMsgFriendCode(MobaFriendCode msgID, object msgParam) { MobaMessage message = MobaMessageManager.GetMessage(msgID, msgParam, 0f); MobaMessageManager.ExecuteMsg(message); }
public static ClientMsg Friend_to_NotifyView(MobaFriendCode code) { return(ClientMsg.NotifyView_game_begin + (int)code); }
public static ClientMsg Friend_to_NotifyModel(MobaFriendCode code) { return(ClientMsg.NotifyModel_friend_begin + (int)code); }
public static void RemoveListener_view(MobaFriendCode code, MobaMessageFunc func) { MobaMessageManager.UnRegistMessage(MVC_MessageManager.Friend_to_NotifyView(code), func); }
public static void AddListener_model(MobaFriendCode code, MobaMessageFunc func) { MobaMessageManager.RegistMessage(MVC_MessageManager.Friend_to_NotifyModel(code), func); }