Esempio n. 1
0
        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();
        }
Esempio n. 2
0
 private static void PreHandler(MobaFriendCode code, MobaMessage msg)
 {
     if (MVC_MessageManager.dicMabaFriendPreHandler.ContainsKey(code))
     {
         foreach (MobaMessageFunc current in MVC_MessageManager.dicMabaFriendPreHandler[code])
         {
             current(msg);
         }
     }
 }
Esempio n. 3
0
        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);
 }
Esempio n. 6
0
    private void DelePhotonMsgFriendCode(MobaFriendCode msgID, object msgParam)
    {
        MobaMessage message = MobaMessageManager.GetMessage(msgID, msgParam, 0f);

        MobaMessageManager.ExecuteMsg(message);
    }
Esempio n. 7
0
 public static ClientMsg Friend_to_NotifyView(MobaFriendCode code)
 {
     return(ClientMsg.NotifyView_game_begin + (int)code);
 }
Esempio n. 8
0
 public static ClientMsg Friend_to_NotifyModel(MobaFriendCode code)
 {
     return(ClientMsg.NotifyModel_friend_begin + (int)code);
 }
Esempio n. 9
0
 public static void RemoveListener_view(MobaFriendCode code, MobaMessageFunc func)
 {
     MobaMessageManager.UnRegistMessage(MVC_MessageManager.Friend_to_NotifyView(code), func);
 }
Esempio n. 10
0
 public static void AddListener_model(MobaFriendCode code, MobaMessageFunc func)
 {
     MobaMessageManager.RegistMessage(MVC_MessageManager.Friend_to_NotifyModel(code), func);
 }