Exemple #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)
         {
             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();
 }
Exemple #2
0
        protected override void OnGetMsg(MobaMessage msg)
        {
            int             num             = 0;
            MobaMessageType mobaMessageType = MVC_MessageManager.ClientMsg_to_RawCode((ClientMsg)msg.ID, out num);

            if (this.listCode.Contains((MobaGameCode)num))
            {
                string     name   = "OnGetMsg_" + mobaMessageType.ToString() + "_" + ((MobaGameCode)num).ToString();
                MethodInfo method = base.GetType().GetMethod(name, BindingFlags.Instance | BindingFlags.NonPublic);
                if (method != null)
                {
                    object[] parameters = new object[]
                    {
                        msg
                    };
                    method.Invoke(this, parameters);
                    base.TriggerListners();
                }
            }
        }
Exemple #3
0
        protected override void OnGetMsg(MobaMessage msg)
        {
            int             num             = 0;
            MobaMessageType mobaMessageType = MVC_MessageManager.ClientMsg_to_RawCode((ClientMsg)msg.ID, out num);

            if (this.Dic_Bottle.ContainsKey(mobaMessageType) && this.Dic_Bottle[mobaMessageType].Contains(num))
            {
                string          text             = "OnGetMsg_" + mobaMessageType.ToString() + "_";
                MobaMessageType mobaMessageType2 = mobaMessageType;
                if (mobaMessageType2 == MobaMessageType.GameCode)
                {
                    text += ((MobaGameCode)num).ToString();
                }
                MethodInfo method = base.GetType().GetMethod(text, BindingFlags.Instance | BindingFlags.NonPublic);
                if (method != null)
                {
                    object[] parameters = new object[]
                    {
                        msg
                    };
                    method.Invoke(this, parameters);
                }
            }
        }