示例#1
0
        public static void HandleChatMessageSay(ref PacketReader packet, WorldClass session)
        {
            BitUnpack         arg_0F_0 = new BitUnpack(packet);
            int               num      = packet.Read <int>();
            int               num2     = (int)arg_0F_0.GetBits <byte>(8) << 1;
            bool              bit      = arg_0F_0.GetBit();
            ChatMessageValues chatMessageValues;

            while (true)
            {
IL_10D:
                uint arg_E0_0 = 325641967u;
                while (true)
                {
                    uint num3;
                    switch ((num3 = (arg_E0_0 ^ 1114592966u)) % 8u)
                    {
                    case 0u:
                        goto IL_10D;

                    case 1u:
                    {
                        string text = packet.ReadString((uint)(bit ? ((byte)num2 + 1) : ((byte)num2)));
                        arg_E0_0 = 1695780296u;
                        continue;
                    }

                    case 2u:
                        return;

                    case 3u:
                    {
                        string text;
                        arg_E0_0 = ((ChatCommandParser.CheckForCommand(text) ? 3993131816u : 2950447498u) ^ num3 * 3295186339u);
                        continue;
                    }

                    case 4u:
                    {
                        string text;
                        ChatCommandParser.ExecuteChatHandler2(text, Manager.WorldMgr.GetSession2(session.Character.Guid));
                        arg_E0_0 = (num3 * 451064634u ^ 332353724u);
                        continue;
                    }

                    case 6u:
                    {
                        string text;
                        chatMessageValues          = new ChatMessageValues(MessageType.ChatMessageSay, text, true, true, session.Character.Name);
                        chatMessageValues.Language = (byte)num;
                        arg_E0_0 = (num3 * 3671775661u ^ 3376883115u);
                        continue;
                    }

                    case 7u:
                    {
                        string text;
                        ChatCommandParser.ExecuteChatHandler(text, session);
                        arg_E0_0 = (num3 * 3654367289u ^ 3353498485u);
                        continue;
                    }
                    }
                    goto Block_3;
                }
            }
Block_3:
            ChatHandler.SendMessage(ref session, chatMessageValues, null);
        }
示例#2
0
        public static void HandleChatMessageYell(ref PacketReader packet, WorldClass session)
        {
            new BitUnpack(packet);
            while (true)
            {
IL_DF:
                uint arg_B2_0 = 1471274433u;
                while (true)
                {
                    uint num;
                    switch ((num = (arg_B2_0 ^ 1457246423u)) % 8u)
                    {
                    case 0u:
                        goto IL_DF;

                    case 1u:
                    {
                        byte   count;
                        string message = packet.ReadString((uint)count);
                        arg_B2_0 = (num * 1956220272u ^ 333181946u);
                        continue;
                    }

                    case 2u:
                    {
                        ChatMessageValues chatMessageValues;
                        ChatHandler.SendMessage(ref session, chatMessageValues, null);
                        arg_B2_0 = (num * 1360094918u ^ 3810658607u);
                        continue;
                    }

                    case 3u:
                    {
                        ChatMessageValues chatMessageValues;
                        int num2;
                        chatMessageValues.Language = (byte)num2;
                        arg_B2_0 = (num * 1375933563u ^ 3990099844u);
                        continue;
                    }

                    case 5u:
                    {
                        string            message;
                        ChatMessageValues chatMessageValues = new ChatMessageValues(MessageType.ChatMessageYell, message, true, true, session.Character.Name);
                        arg_B2_0 = (num * 1524374222u ^ 112341642u);
                        continue;
                    }

                    case 6u:
                    {
                        int num2 = packet.Read <int>();
                        arg_B2_0 = (num * 3683192221u ^ 500492390u);
                        continue;
                    }

                    case 7u:
                    {
                        byte count = ChatHandler.smethod_0(packet);
                        arg_B2_0 = (num * 1784485323u ^ 3798317019u);
                        continue;
                    }
                    }
                    return;
                }
            }
        }
示例#3
0
        public static void HandleChatMessageWhisper(ref PacketReader packet, WorldClass session)
        {
            BitUnpack arg_0F_0 = new BitUnpack(packet);

            packet.Read <int>();
            byte bits  = arg_0F_0.GetBits <byte>(8);
            byte bits2 = arg_0F_0.GetBits <byte>(9);

            while (true)
            {
IL_12D:
                uint arg_FB_0 = 508952321u;
                while (true)
                {
                    uint num;
                    switch ((num = (arg_FB_0 ^ 680197638u)) % 9u)
                    {
                    case 0u:
                        goto IL_12D;

                    case 2u:
                    {
                        string            message;
                        ChatMessageValues chatMessage = new ChatMessageValues(MessageType.ChatMessageWhisper, message, false, true, session.Character.Name);
                        WorldClass        session2;
                        ChatHandler.SendMessage(ref session2, chatMessage, session);
                        arg_FB_0 = (num * 176779959u ^ 339669786u);
                        continue;
                    }

                    case 3u:
                        return;

                    case 4u:
                    {
                        string            message;
                        ChatMessageValues chatMessage = new ChatMessageValues(MessageType.ChatMessageWhisperInform, message, false, true, session.Character.Name);
                        WorldClass        session2;
                        ChatHandler.SendMessage(ref session, chatMessage, session2);
                        arg_FB_0 = 1982110815u;
                        continue;
                    }

                    case 5u:
                    {
                        string     name;
                        WorldClass session2 = Manager.WorldMgr.GetSession(name);
                        arg_FB_0 = (num * 827851986u ^ 138547638u);
                        continue;
                    }

                    case 6u:
                    {
                        string name = packet.ReadString((uint)bits2);
                        arg_FB_0 = (num * 3640695171u ^ 579213927u);
                        continue;
                    }

                    case 7u:
                    {
                        string message = packet.ReadString((uint)bits);
                        arg_FB_0 = (num * 3110842643u ^ 1736535012u);
                        continue;
                    }

                    case 8u:
                    {
                        WorldClass session2;
                        arg_FB_0 = (((session2 != null) ? 3244820180u : 2596212753u) ^ num * 1051122596u);
                        continue;
                    }
                    }
                    return;
                }
            }
        }