public override void UnRegisterMsgHandler()
 {
     MVC_MessageManager.RemoveListener_model(MobaGameCode.GetTaskList, new MobaMessageFunc(this.OnGetMsg));
     MVC_MessageManager.RemoveListener_model(MobaGameCode.GetAchieveTaskAward, new MobaMessageFunc(this.OnGetMsg));
     MVC_MessageManager.RemoveListener_model(MobaGameCode.ShowDailyTask, new MobaMessageFunc(this.OnGetMsg));
     MVC_MessageManager.RemoveListener_model(MobaGameCode.GetDailyTaskAward, new MobaMessageFunc(this.OnGetMsg));
 }
Beispiel #2
0
 public override void RegisterMsgHandler()
 {
     this.listCode = new List <MobaGameCode>
     {
         MobaGameCode.GetHeroList,
         MobaGameCode.UseSoulstone,
         MobaGameCode.UseProps,
         MobaGameCode.UsingSkillPoint,
         MobaGameCode.UploadArenaAtc,
         MobaGameCode.LuckyDraw,
         MobaGameCode.Enchant,
         MobaGameCode.HeroAdvance,
         MobaGameCode.UploadFightResult,
         MobaGameCode.UsingEquipment,
         MobaGameCode.DischargeRune,
         MobaGameCode.BuyShopGoodsNew,
         MobaGameCode.ChangeSkin,
         MobaGameCode.WearPrivateEffect,
         MobaGameCode.SignDay,
         MobaGameCode.ReceiveMailAttachment
     };
     foreach (MobaGameCode current in this.listCode)
     {
         MVC_MessageManager.AddListener_model(current, new MobaMessageFunc(this.OnGetMsg));
     }
 }
 public override void UnRegisterMsgHandler()
 {
     MVC_MessageManager.RemoveListener_model(MobaGameCode.GetBattles, new MobaMessageFunc(this.OnGetMsg));
     MVC_MessageManager.RemoveListener_model(MobaGameCode.SweepBattle, new MobaMessageFunc(this.OnGetMsg));
     MVC_MessageManager.RemoveListener_model(MobaGameCode.RestTodayBattlesCount, new MobaMessageFunc(this.OnGetMsg));
     MVC_MessageManager.RemoveListener_model(MobaGameCode.UploadFightResult, new MobaMessageFunc(this.OnGetMsg));
 }
        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();
        }
 public override void UnRegisterMsgHandler()
 {
     MVC_MessageManager.RemoveListener_model(MobaMasterCode.Login, new MobaMessageFunc(this.OnGetMsg));
     MVC_MessageManager.RemoveListener_model(MobaMasterCode.GuestUpgrade, new MobaMessageFunc(this.OnGetMsg));
     MVC_MessageManager.RemoveListener_model(MobaMasterCode.Register, new MobaMessageFunc(this.OnGetMsg));
     MVC_MessageManager.RemoveListener_model(MobaMasterCode.LoginByPlatformUid, new MobaMessageFunc(this.OnGetMsg));
     MVC_MessageManager.RemoveListener_model(MobaMasterCode.LoginByChannelId, new MobaMessageFunc(this.OnGetMsg));
 }
 public override void UnRegisterMsgHandler()
 {
     MVC_MessageManager.RemoveListener_model(MobaFriendCode.Friend_GetFriendList, new MobaMessageFunc(this.OnGetMsg));
     MVC_MessageManager.RemoveListener_model(MobaFriendCode.Friend_ApplyAddFriend, new MobaMessageFunc(this.OnGetMsg));
     MVC_MessageManager.RemoveListener_model(MobaFriendCode.Friend_ModifyFriendStatus, new MobaMessageFunc(this.OnGetMsg));
     MVC_MessageManager.RemoveListener_model(MobaGameCode.GetUserInfoBySummId, new MobaMessageFunc(this.OnGetMsgGameCode));
     MVC_MessageManager.RemoveListener_model(MobaGameCode.GetFriendMessages, new MobaMessageFunc(this.OnGetMsgGameCode));
     MVC_MessageManager.RemoveListener_model(MobaGameCode.SystemNotice, new MobaMessageFunc(this.OnGetMsgGameCode));
     MVC_MessageManager.RemoveListener_model(MobaFriendCode.Friend_RaderFindFriend, new MobaMessageFunc(this.OnGetMsg));
 }
Beispiel #7
0
 protected override void OnGetMsg(MobaMessage msg)
 {
     base.DebugMessage = ((base.LastError != 0) ? "===>服务器列表信息获取失败" : "===>服务器列表信息获取成功");
     if (msg != null)
     {
         OperationResponse operationResponse = msg.Param as OperationResponse;
         if (operationResponse != null)
         {
             base.LastMsgType = (int)msg.MessageType;
             base.LastMsgID   = msg.ID;
             int             num;
             MobaMessageType mobaMessageType  = MVC_MessageManager.ClientMsg_to_RawCode((ClientMsg)msg.ID, out num);
             MobaMessageType mobaMessageType2 = mobaMessageType;
             if (mobaMessageType2 != MobaMessageType.MasterCode)
             {
                 if (mobaMessageType2 == MobaMessageType.GameCode)
                 {
                     MobaGameCode mobaGameCode = (MobaGameCode)num;
                     if (mobaGameCode == MobaGameCode.Login)
                     {
                         this.OnGetMsg_GameCode_Login(operationResponse);
                     }
                 }
             }
             else
             {
                 MobaMasterCode mobaMasterCode = (MobaMasterCode)num;
                 if (mobaMasterCode != MobaMasterCode.SelectGameArea)
                 {
                     if (mobaMasterCode == MobaMasterCode.GetAllGameServers)
                     {
                         this.OnGetMsg_MasterCode_GetAllGameServers(operationResponse);
                     }
                 }
                 else
                 {
                     this.OnGetMsg_MasterCode_SelectGameArea(operationResponse);
                 }
             }
         }
     }
     base.TriggerListners();
 }
Beispiel #8
0
 protected override void OnGetMsg(MobaMessage msg)
 {
     base.DebugMessage = ((base.LastError != 0) ? "===>天赋的信息获取失败" : "===>天赋的信息获取成功");
     if (msg != null)
     {
         OperationResponse operationResponse = msg.Param as OperationResponse;
         if (operationResponse != null)
         {
             MobaMasterCode mobaMasterCode = MVC_MessageManager.NotifyModel_to_Master((ClientMsg)msg.ID);
             base.LastMsgType = (int)mobaMasterCode;
             MobaMasterCode mobaMasterCode2 = mobaMasterCode;
             if (mobaMasterCode2 == MobaMasterCode.UpgradeUrl)
             {
                 this.UpgradeUrl(operationResponse);
             }
         }
     }
     base.Valid = (base.LastError == 0 && null != base.Data);
     base.TriggerListners();
 }
Beispiel #9
0
 public override void UnRegisterMsgHandler()
 {
     MVC_MessageManager.RemoveListener_model(MobaGameCode.UseSoulstone, new MobaMessageFunc(this.OnGetMsg));
     MVC_MessageManager.RemoveListener_model(MobaGameCode.UseProps, new MobaMessageFunc(this.OnGetMsg));
     MVC_MessageManager.RemoveListener_model(MobaGameCode.ChangeRune, new MobaMessageFunc(this.OnGetMsg));
     MVC_MessageManager.RemoveListener_model(MobaGameCode.Coalesce, new MobaMessageFunc(this.OnGetMsg));
     MVC_MessageManager.RemoveListener_model(MobaGameCode.ReceiveTBCReward, new MobaMessageFunc(this.OnGetMsg));
     MVC_MessageManager.RemoveListener_model(MobaGameCode.LuckyDraw, new MobaMessageFunc(this.OnGetMsg));
     MVC_MessageManager.RemoveListener_model(MobaGameCode.SellProps, new MobaMessageFunc(this.OnGetMsg));
     MVC_MessageManager.RemoveListener_model(MobaGameCode.ReceiveMailAttachment, new MobaMessageFunc(this.OnGetMsg));
     MVC_MessageManager.RemoveListener_model(MobaGameCode.Enchant, new MobaMessageFunc(this.OnGetMsg));
     MVC_MessageManager.RemoveListener_model(MobaGameCode.SweepBattle, new MobaMessageFunc(this.OnGetMsg));
     MVC_MessageManager.RemoveListener_model(MobaGameCode.GetEquipmentList, new MobaMessageFunc(this.OnGetMsg));
     MVC_MessageManager.RemoveListener_model(MobaGameCode.UsingEquipment, new MobaMessageFunc(this.OnGetMsg));
     MVC_MessageManager.RemoveListener_model(MobaGameCode.DischargeRune, new MobaMessageFunc(this.OnGetMsg));
     MVC_MessageManager.RemoveListener_model(MobaGameCode.HeroAdvance, new MobaMessageFunc(this.OnGetMsg));
     MVC_MessageManager.RemoveListener_model(MobaGameCode.UploadFightResult, new MobaMessageFunc(this.OnGetMsg));
     MVC_MessageManager.RemoveListener_model(MobaGameCode.MagicBottleItem, new MobaMessageFunc(this.OnGetMsg));
     MVC_MessageManager.RemoveListener_model(MobaGameCode.BuyShopGoodsNew, new MobaMessageFunc(this.OnGetMsg));
     MVC_MessageManager.RemoveListener_model(MobaGameCode.WearPrivateEffect, new MobaMessageFunc(this.OnGetMsg));
     MVC_MessageManager.RemoveListener_model(MobaGameCode.OneKeyCompose, new MobaMessageFunc(this.OnGetMsg));
 }
        protected override void OnGetMsg(MobaMessage msg)
        {
            MobaMasterCode mobaMasterCode  = MVC_MessageManager.NotifyModel_to_Master((ClientMsg)msg.ID);
            MobaMasterCode mobaMasterCode2 = mobaMasterCode;

            switch (mobaMasterCode2)
            {
            case MobaMasterCode.Login:
                this.OnGetMsg_MasterCode_Login(msg);
                goto IL_82;

            case MobaMasterCode.HulaiLogin:
            case MobaMasterCode.LoginOut:
            case MobaMasterCode.GuestUpgradeToOfficial:
IL_2E:
                if (mobaMasterCode2 == MobaMasterCode.Register)
                {
                    this.OnGetMsg_MasterCode_Register(msg);
                    goto IL_82;
                }
                if (mobaMasterCode2 != MobaMasterCode.GuestUpgrade)
                {
                    goto IL_82;
                }
                this.OnGetMsg_MasterCode_GuestUpgrade(msg);
                goto IL_82;

            case MobaMasterCode.LoginByPlatformUid:
                this.OnGetMsg_MasterCode_LoginByPlatformUid(msg);
                goto IL_82;

            case MobaMasterCode.LoginByChannelId:
                this.OnGetMsg_MasterCode_LoginByPlatformUid(msg);
                goto IL_82;
            }
            goto IL_2E;
IL_82:
            base.TriggerListners();
        }
        protected override void OnGetMsg(MobaMessage msg)
        {
            base.LastError = 505;
            OperationResponse operationResponse = msg.Param as OperationResponse;

            if (operationResponse != null)
            {
                MobaGameCode mobaGameCode  = MVC_MessageManager.NotifyModel_to_Game((ClientMsg)msg.ID);
                MobaGameCode mobaGameCode2 = mobaGameCode;
                if (mobaGameCode2 != MobaGameCode.SweepBattle)
                {
                    if (mobaGameCode2 != MobaGameCode.RestTodayBattlesCount)
                    {
                        if (mobaGameCode2 != MobaGameCode.UploadFightResult)
                        {
                            if (mobaGameCode2 == MobaGameCode.GetBattles)
                            {
                                this.OnGetMsg_GetBattles(operationResponse);
                            }
                        }
                        else
                        {
                            this.OnGetMsg_UploadFightResult(operationResponse);
                        }
                    }
                    else
                    {
                        this.OnGetMsg_RestTodayBattlesCount(operationResponse);
                    }
                }
                else
                {
                    this.OnGetMsg_SweepBattle(operationResponse);
                }
            }
            base.TriggerListners();
        }
        protected void OnGetMsgGameCode(MobaMessage msg)
        {
            base.DebugMessage = ((base.LastError != 0) ? "===>好友内容取失败" : "===>好友内容获取成功");
            if (msg != null)
            {
                OperationResponse operationResponse = msg.Param as OperationResponse;
                if (operationResponse != null)
                {
                    MobaGameCode mobaGameCode = MVC_MessageManager.NotifyModel_to_Game((ClientMsg)msg.ID);
                    base.LastMsgType = msg.ID;
                    MobaGameCode mobaGameCode2 = mobaGameCode;
                    switch (mobaGameCode2)
                    {
                    case MobaGameCode.GetFriendMessages:
                        this.OnGetMsg_GetFriendMessages(operationResponse);
                        goto IL_9B;

                    case MobaGameCode.SendPrivateMessage:
IL_67:
                        if (mobaGameCode2 != MobaGameCode.SystemNotice)
                        {
                            goto IL_9B;
                        }
                        this.OnGetMsg_SystemNotice(operationResponse);
                        goto IL_9B;

                    case MobaGameCode.GetUserInfoBySummId:
                        this.OnGetMsg_GetUserInfoBySummId(operationResponse);
                        goto IL_9B;
                    }
                    goto IL_67;
                }
            }
IL_9B:
            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();
        }