Esempio n. 1
0
        public static void HandleEquipItem(ref PacketReader packet, WorldClass2 session)
        {
            packet.Skip(4);
            byte bagSlot = packet.Read <byte>();

            while (true)
            {
IL_43:
                uint arg_2B_0 = 2890883479u;
                while (true)
                {
                    uint num;
                    switch ((num = (arg_2B_0 ^ 3187418839u)) % 3u)
                    {
                    case 1u:
                        ItemHandler.AddItem(session, bagSlot);
                        arg_2B_0 = (num * 4216493879u ^ 2545498223u);
                        continue;

                    case 2u:
                        goto IL_43;
                    }
                    return;
                }
            }
        }
Esempio n. 2
0
        public static void ExecuteChatHandler2(string chatCommand, WorldClass2 session)
        {
            string[] array = ChatCommandParser.smethod_5(chatCommand, new string[]
            {
                Module.smethod_36 <string>(2793817990u)
            }, StringSplitOptions.None);
            string key = ChatCommandParser.smethod_6(array[0], 0, 1);

            if (ChatCommandParser.ChatCommands2.ContainsKey(key))
            {
                while (true)
                {
IL_75:
                    uint arg_5D_0 = 2930766986u;
                    while (true)
                    {
                        uint num;
                        switch ((num = (arg_5D_0 ^ 4278760877u)) % 3u)
                        {
                        case 0u:
                            goto IL_75;

                        case 1u:
                            ChatCommandParser.ChatCommands2[key](array, session);
                            arg_5D_0 = (num * 1871045308u ^ 4256713516u);
                            continue;
                        }
                        goto Block_2;
                    }
                }
                Block_2 :;
            }
        }
        public static void Handletest(ref PacketReader packet, WorldClass session)
        {
            PacketWriter packetWriter = new PacketWriter(ServerMessage.ResumeComms, true);

            while (true)
            {
IL_68:
                int arg_52_0 = 2086761285;
                while (true)
                {
                    switch ((arg_52_0 ^ 716606170) % 3)
                    {
                    case 1:
                    {
                        session.Send(ref packetWriter);
                        WorldClass2 expr_3E = Manager.WorldMgr.GetSession2((session.Character != null) ? session.Character.Guid : 0uL);
                        if (expr_3E != null)
                        {
                            expr_3E.Send(ref packetWriter);
                            arg_52_0 = 92366913;
                            continue;
                        }
                        return;
                    }

                    case 2:
                        goto IL_68;
                    }
                    return;
                }
            }
        }
Esempio n. 4
0
        public static void HandleCancelAura(ref PacketReader packet, WorldClass2 session)
        {
            packet.Read <int>();
            while (true)
            {
IL_A4:
                uint arg_80_0 = 1946445704u;
                while (true)
                {
                    uint num;
                    switch ((num = (arg_80_0 ^ 148890857u)) % 6u)
                    {
                    case 0u:
                    {
                        WorldClass session2;
                        SpellHandler.AuraUpdate(session2, 0u);
                        arg_80_0 = (num * 714797375u ^ 3424544470u);
                        continue;
                    }

                    case 1u:
                    {
                        WorldClass session2 = Manager.WorldMgr.GetSession(session.Character.Guid);
                        arg_80_0 = (num * 537338206u ^ 3231834507u);
                        continue;
                    }

                    case 2u:
                        goto IL_A4;

                    case 4u:
                    {
                        WorldClass session2;
                        ObjectHandler.HandleUpdateObjectValues(ref session2, false);
                        arg_80_0 = (num * 392399052u ^ 1410114410u);
                        continue;
                    }

                    case 5u:
                    {
                        WorldClass session2;
                        session2.Character.SetUpdateField <int>(107, 0, 0);
                        arg_80_0 = (num * 1872475184u ^ 4096526783u);
                        continue;
                    }
                    }
                    return;
                }
            }
        }
        public static void HandleAuthChallenge(ref PacketReader packet, WorldClass2 session)
        {
            session.initiated = true;
            PacketWriter packetWriter;

            while (true)
            {
IL_B5:
                uint arg_91_0 = 678710099u;
                while (true)
                {
                    uint num;
                    switch ((num = (arg_91_0 ^ 1840759029u)) % 6u)
                    {
                    case 1u:
                        AuthenticationHandler.smethod_0(packetWriter, AuthenticationHandler.clientSeed = new byte[16]);
                        AuthenticationHandler.smethod_0(packetWriter, AuthenticationHandler.serverSeed = new byte[16]);
                        arg_91_0 = (num * 1123221691u ^ 983032136u);
                        continue;

                    case 2u:
                        packetWriter = new PacketWriter(ServerMessage.AuthChallenge, false);
                        arg_91_0     = (num * 2546250082u ^ 4201805034u);
                        continue;

                    case 3u:
                        goto IL_B5;

                    case 4u:
                        AuthenticationHandler.smethod_0(packetWriter, new byte[16]);
                        arg_91_0 = (num * 1487317018u ^ 3313288268u);
                        continue;

                    case 5u:
                        packetWriter.WriteUInt8(1);
                        arg_91_0 = (num * 320817430u ^ 2502966289u);
                        continue;
                    }
                    goto Block_1;
                }
            }
Block_1:
            session.Send(ref packetWriter);
        }
Esempio n. 6
0
        public static void HandleLogoutRequest(ref PacketReader packet, WorldClass2 session)
        {
            Character    character = session.Character;
            PacketWriter packetWriter;

            while (true)
            {
IL_DA:
                uint arg_B6_0 = 2356821893u;
                while (true)
                {
                    uint num;
                    switch ((num = (arg_B6_0 ^ 3488573736u)) % 6u)
                    {
                    case 1u:
                        Manager.ObjectMgr.SavePositionToDB(character);
                        arg_B6_0 = (num * 2991657712u ^ 1093469771u);
                        continue;

                    case 2u:
                        Manager.WorldMgr.WriteOutOfRangeObjects(Manager.SpawnMgr.GetOutOfRangeCreatures(character), Manager.WorldMgr.Sessions.ToList <KeyValuePair <ulong, WorldClass> >()[0].Value);
                        arg_B6_0 = (num * 3357637708u ^ 3124184774u);
                        continue;

                    case 3u:
                        goto IL_DA;

                    case 4u:
                        Manager.WorldMgr.DeleteSession(character.Guid);
                        arg_B6_0 = (num * 1832138036u ^ 1888841376u);
                        continue;

                    case 5u:
                        packetWriter = new PacketWriter(ServerMessage.LogoutComplete, true);
                        Manager.WorldMgr.GetSession(character.Guid);
                        arg_B6_0 = (num * 1880255037u ^ 1323852181u);
                        continue;
                    }
                    goto Block_1;
                }
            }
Block_1:
            session.Send(ref packetWriter);
        }
Esempio n. 7
0
        public static void HandleEmote(ref PacketReader packet, WorldClass2 session)
        {
            uint  emote;
            Emote emote2;

            while (true)
            {
IL_AD:
                uint arg_89_0 = 1752535003u;
                while (true)
                {
                    uint num;
                    switch ((num = (arg_89_0 ^ 716655401u)) % 6u)
                    {
                    case 0u:
                        return;

                    case 2u:
                        packet.ReadSmartGuid();
                        emote = EmoteHandler.smethod_0(packet);
                        EmoteHandler.smethod_0(packet);
                        arg_89_0 = (num * 3806359023u ^ 581283706u);
                        continue;

                    case 3u:
                        emote2   = Manager.WorldMgr.EmoteList.SingleOrDefault((Emote e) => (long)e.Id == (long)((ulong)emote));
                        arg_89_0 = (num * 608702844u ^ 55036292u);
                        continue;

                    case 4u:
                        goto IL_AD;

                    case 5u:
                        arg_89_0 = (((emote2 != null) ? 797466682u : 1979322787u) ^ num * 1562950612u);
                        continue;
                    }
                    goto Block_2;
                }
            }
Block_2:
            EmoteHandler.SendEmote((uint)emote2.EmoteId, Manager.WorldMgr.GetSession(session.Character.Guid), null);
        }
Esempio n. 8
0
        public static void HandleDestroyItem(ref PacketReader packet, WorldClass2 session)
        {
            packet.Read <uint>();
            byte b;
            Dictionary <byte, Item> dictionary;
            WorldClass session2;

            while (true)
            {
IL_E1:
                uint arg_B8_0 = 1479706634u;
                while (true)
                {
                    uint num;
                    switch ((num = (arg_B8_0 ^ 940884380u)) % 7u)
                    {
                    case 0u:
                        goto IL_E1;

                    case 1u:
                        session.Character.Bag.Remove(b);
                        arg_B8_0 = (num * 3750115250u ^ 704789659u);
                        continue;

                    case 2u:
                        if (b >= 23)
                        {
                            arg_B8_0 = (num * 10468204u ^ 43277318u);
                            continue;
                        }
                        goto IL_439;

                    case 3u:
                    {
                        Item arg_6A_0 = session.Character.Bag[b];
                        arg_B8_0 = (num * 4157225570u ^ 1490106046u);
                        continue;
                    }

                    case 4u:
                        dictionary = new Dictionary <byte, Item>();
                        arg_B8_0   = (num * 2455461421u ^ 1748343064u);
                        continue;

                    case 5u:
                        packet.Read <byte>();
                        b        = packet.Read <byte>();
                        session2 = Manager.WorldMgr.GetSession(session.Character.Guid);
                        arg_B8_0 = (num * 1883076200u ^ 3879309864u);
                        continue;
                    }
                    goto Block_2;
                }
            }
            uint arg_63A_0;
            Item item;

            while (true)
            {
IL_635:
                uint num;
                switch ((num = (arg_63A_0 ^ 940884380u)) % 30u)
                {
                case 0u:
                    session.Character.SetUpdateField <int>(1035 + (int)(b * 2), 0, 0);
                    session.Character.SetUpdateField <ushort>(1035 + (int)(b * 2) + 1, 0, 0);
                    session.Character.SetUpdateField <ushort>(1035 + (int)(b * 2) + 1, 0, 0);
                    session.Character.SetUpdateField <ushort>(1035 + (int)(b * 2) + 1, 0, 1);
                    arg_63A_0 = (num * 2347620057u ^ 297415167u);
                    continue;

                case 1u:
                {
                    PacketWriter packetWriter = new PacketWriter(ServerMessage.ObjectUpdate, true);
                    BitPack      arg_5AD_0    = new BitPack(packetWriter, 0uL, 0uL, 0uL, 0uL);
                    packetWriter.WriteUInt32(1u);
                    Character character;
                    packetWriter.WriteUInt16((ushort)character.Map);
                    arg_5AD_0.Write <bool>(true);
                    arg_5AD_0.Flush();
                    arg_63A_0 = (num * 364780618u ^ 4039577125u);
                    continue;
                }

                case 2u:
                {
                    byte b2;
                    arg_63A_0 = (((int)b2 < session.Character.Bag.Count) ? 1177635618u : 1980991802u);
                    continue;
                }

                case 3u:
                {
                    PacketWriter packetWriter;
                    packetWriter.WriteInt32(0);
                    arg_63A_0 = (num * 1863506504u ^ 2872540547u);
                    continue;
                }

                case 4u:
                    session2.Character = session.Character;
                    arg_63A_0          = 2092284884u;
                    continue;

                case 5u:
                {
                    PacketWriter packetWriter;
                    SmartGuid    guid;
                    packetWriter.WriteSmartGuid(guid);
                    session.Send(ref packetWriter);
                    arg_63A_0 = (num * 1992055980u ^ 2561592906u);
                    continue;
                }

                case 6u:
                    arg_63A_0 = (num * 2481838976u ^ 2085966606u);
                    continue;

                case 7u:
                {
                    byte b2;
                    b2       += 1;
                    arg_63A_0 = (num * 581392080u ^ 1120063516u);
                    continue;
                }

                case 8u:
                    ObjectHandler.HandleUpdateObjectValues(ref session2, false);
                    arg_63A_0 = (num * 3730459737u ^ 4119815487u);
                    continue;

                case 9u:
                    arg_63A_0 = (num * 4013260396u ^ 3339049186u);
                    continue;

                case 10u:
                {
                    int num2 = 0;
                    arg_63A_0 = (num * 170813716u ^ 815519874u);
                    continue;
                }

                case 11u:
                    goto IL_439;

                case 12u:
                {
                    byte      b2;
                    SmartGuid smartGuid;
                    session.Character.SetUpdateField <ulong>(1085 + (int)((23 + b2) * 4) + 2, smartGuid.HighGuid, 0);
                    arg_63A_0 = (num * 599351454u ^ 1201031827u);
                    continue;
                }

                case 13u:
                    ObjectHandler.HandleUpdateObjectValues(ref session2, false);
                    arg_63A_0 = (num * 1722599098u ^ 78266358u);
                    continue;

                case 14u:
                {
                    int num3 = 0;
                    arg_63A_0 = (num * 2079855051u ^ 1201392757u);
                    continue;
                }

                case 15u:
                {
                    byte      b2;
                    SmartGuid smartGuid;
                    session.Character.SetUpdateField <ulong>(1085 + (int)((23 + b2) * 4), smartGuid.Guid, 0);
                    arg_63A_0 = (num * 1686053465u ^ 2337712971u);
                    continue;
                }

                case 16u:
                {
                    Character character = session.Character;
                    arg_63A_0 = (num * 2024021156u ^ 3868436006u);
                    continue;
                }

                case 17u:
                    session.Character.Bag = dictionary;
                    arg_63A_0             = (num * 2306417256u ^ 1137006036u);
                    continue;

                case 19u:
                {
                    PacketWriter packetWriter;
                    Character    character;
                    packetWriter.WriteUInt16((ushort)character.Map);
                    int num3;
                    packetWriter.WriteUInt32((uint)num3);
                    SmartGuid guid = new SmartGuid(item.Guid, 0, GuidType.Item, 0uL);
                    arg_63A_0 = (num * 3758715600u ^ 4001188091u);
                    continue;
                }

                case 20u:
                    session.Character.SetUpdateField <ulong>(1085 + (int)(b * 4), 0uL, 0);
                    session.Character.SetUpdateField <ulong>(1085 + (int)(b * 4) + 2, 0uL, 0);
                    arg_63A_0 = (num * 4263489551u ^ 4220117414u);
                    continue;

                case 21u:
                {
                    int num3;
                    arg_63A_0 = (((num3 > 0) ? 897509384u : 511989551u) ^ num * 999052215u);
                    continue;
                }

                case 22u:
                {
                    int num2;
                    arg_63A_0 = ((num2 >= 16) ? 906854550u : 933086591u);
                    continue;
                }

                case 23u:
                {
                    int num2;
                    session.Character.SetUpdateField <ulong>(1085 + (23 + num2) * 4, 0uL, 0);
                    arg_63A_0 = 869087837u;
                    continue;
                }

                case 24u:
                {
                    byte b2 = 0;
                    arg_63A_0 = (num * 877610943u ^ 4050923773u);
                    continue;
                }

                case 25u:
                {
                    int num2;
                    num2++;
                    arg_63A_0 = (num * 3409590307u ^ 4053566833u);
                    continue;
                }

                case 26u:
                {
                    byte      b2;
                    SmartGuid smartGuid = new SmartGuid(session.Character.Bag[23 + b2].Guid, 0, GuidType.Item, 0uL);
                    arg_63A_0 = 684885291u;
                    continue;
                }

                case 27u:
                {
                    int num2;
                    session.Character.SetUpdateField <ulong>(1085 + (23 + num2) * 4 + 2, 0uL, 0);
                    arg_63A_0 = (num * 2108742514u ^ 956540315u);
                    continue;
                }

                case 28u:
                    goto IL_6C0;

                case 29u:
                    arg_63A_0 = (num * 66432867u ^ 1045735881u);
                    continue;
                }
                break;
            }
            return;

Block_2:
            using (Dictionary <byte, Item> .Enumerator enumerator = session.Character.Bag.GetEnumerator())
            {
                while (true)
                {
IL_176:
                    int arg_14D_0 = (!enumerator.MoveNext()) ? 177736481 : 1734923895;
                    while (true)
                    {
                        switch ((arg_14D_0 ^ 940884380) % 4)
                        {
                        case 0:
                            arg_14D_0 = 1734923895;
                            continue;

                        case 2:
                            goto IL_176;

                        case 3:
                        {
                            KeyValuePair <byte, Item> current = enumerator.Current;
                            dictionary.Add((current.Key > b) ? (current.Key - 1) : current.Key, current.Value);
                            arg_14D_0 = 1924910954;
                            continue;
                        }
                        }
                        goto Block_10;
                    }
                }
                Block_10 :;
            }
            session.Character.Bag.Clear();
            goto IL_6C0;
IL_439:
            item = session.Character.Equipment[b];
            session.Character.Equipment.Remove(b);
            arg_63A_0 = 875231736u;
            goto IL_635;
IL_6C0:
            arg_63A_0 = 1448980257u;
            goto IL_635;
        }
Esempio n. 9
0
        public static void HandleUnEquipItem(ref PacketReader packet, WorldClass2 session)
        {
            packet.Skip(5);
            byte b = packet.Read <byte>();
            byte b2;

            while (true)
            {
IL_303:
                uint arg_2B5_0 = 1819372127u;
                while (true)
                {
                    uint num;
                    switch ((num = (arg_2B5_0 ^ 1136699870u)) % 16u)
                    {
                    case 0u:
                    {
                        session.Character.SetUpdateField <ushort>(1035 + (int)(b2 * 2) + 1, 0, 0);
                        session.Character.SetUpdateField <ushort>(1035 + (int)(b2 * 2) + 1, 0, 1);
                        WorldClass session2;
                        ObjectHandler.HandleUpdateObjectValues(ref session2, false);
                        ObjectHandler.HandleUpdateObjectValues(ref session2, true);
                        arg_2B5_0 = (num * 3374913412u ^ 2282626695u);
                        continue;
                    }

                    case 1u:
                        b2        = packet.Read <byte>();
                        arg_2B5_0 = (num * 1902157130u ^ 174221922u);
                        continue;

                    case 2u:
                        session.Character.Bag.Remove(b);
                        arg_2B5_0 = (num * 4091420843u ^ 2617997471u);
                        continue;

                    case 3u:
                    {
                        WorldClass session2;
                        ObjectHandler.HandleUpdateObjectValues(ref session2, false);
                        session.Character.SetUpdateField <int>(1035 + (int)(b2 * 2), 0, 0);
                        arg_2B5_0 = (num * 3351533450u ^ 858014557u);
                        continue;
                    }

                    case 4u:
                    {
                        WorldClass session2 = Manager.WorldMgr.GetSession(session.Character.Guid);
                        arg_2B5_0 = (num * 3970539045u ^ 265521657u);
                        continue;
                    }

                    case 5u:
                        session.Character.SetUpdateField <ulong>(1085 + (int)(b2 * 4), 0uL, 0);
                        session.Character.SetUpdateField <ulong>(1085 + (int)(b2 * 4) + 2, 0uL, 0);
                        arg_2B5_0 = (num * 4224354357u ^ 2053361779u);
                        continue;

                    case 6u:
                        arg_2B5_0 = (((!session.Character.Equipment.ContainsKey(b2)) ? 1606302786u : 36007046u) ^ num * 2311842534u);
                        continue;

                    case 7u:
                    {
                        session.Character.Equipment.Remove(b2);
                        Item item;
                        session.Character.Bag.Add(b, item);
                        SmartGuid smartGuid = new SmartGuid(item.Guid, 0, GuidType.Item, 0uL);
                        arg_2B5_0 = 523317569u;
                        continue;
                    }

                    case 8u:
                        goto IL_30A;

                    case 9u:
                    {
                        WorldClass session2;
                        session2.Character = session.Character;
                        arg_2B5_0          = (num * 1020405840u ^ 1878556788u);
                        continue;
                    }

                    case 11u:
                        arg_2B5_0 = (session.Character.Bag.ContainsKey(b) ? 1868005100u : 1269139193u);
                        continue;

                    case 12u:
                    {
                        Item item = session.Character.Equipment[b2];
                        arg_2B5_0 = (num * 125860851u ^ 2899062321u);
                        continue;
                    }

                    case 13u:
                        session.Character.SetUpdateField <ushort>(1035 + (int)(b2 * 2) + 1, 0, 0);
                        arg_2B5_0 = (num * 1261327750u ^ 544625808u);
                        continue;

                    case 14u:
                        goto IL_303;

                    case 15u:
                    {
                        SmartGuid smartGuid;
                        session.Character.SetUpdateField <ulong>(1085 + (int)(b * 4), smartGuid.Guid, 0);
                        session.Character.SetUpdateField <ulong>(1085 + (int)(b * 4) + 2, smartGuid.HighGuid, 0);
                        arg_2B5_0 = (num * 4049090278u ^ 4148349777u);
                        continue;
                    }
                    }
                    goto Block_3;
                }
            }
Block_3:
            return;

IL_30A:
            ItemHandler.AddItem(session, b2);
        }
Esempio n. 10
0
        private static void AddItem(WorldClass2 session, byte bagSlot)
        {
            WorldClass session2 = Manager.WorldMgr.GetSession(session.Character.Guid);
            byte       equipSlot;
            Item       item2;
            SmartGuid  smartGuid;

            while (true)
            {
IL_14F:
                uint arg_122_0 = 3901046590u;
                while (true)
                {
                    uint num;
                    switch ((num = (arg_122_0 ^ 2735090873u)) % 8u)
                    {
                    case 0u:
                        goto IL_14F;

                    case 1u:
                        session.Character.Bag.Remove(bagSlot);
                        arg_122_0 = (num * 413465045u ^ 3934698462u);
                        continue;

                    case 3u:
                    {
                        Item item;
                        equipSlot = ItemHandler.GetEquipSlot(item.InventoryType);
                        if (!session.Character.Equipment.ContainsKey(equipSlot))
                        {
                            arg_122_0 = (num * 88286537u ^ 102903164u);
                            continue;
                        }
                        goto IL_928;
                    }

                    case 4u:
                        smartGuid = new SmartGuid(item2.Guid, 0, GuidType.Item, 0uL);
                        arg_122_0 = (num * 3934272609u ^ 2187647340u);
                        continue;

                    case 5u:
                        item2     = session.Character.Bag[bagSlot];
                        arg_122_0 = (num * 2864327870u ^ 3823397051u);
                        continue;

                    case 6u:
                    {
                        Item item;
                        session.Character.Equipment.Add(equipSlot, item);
                        if (session.Character.Bag.ContainsKey(bagSlot))
                        {
                            arg_122_0 = (num * 2375106689u ^ 756885426u);
                            continue;
                        }
                        goto IL_912;
                    }

                    case 7u:
                    {
                        Item item;
                        if (session.Character.Bag.TryGetValue(bagSlot, out item))
                        {
                            arg_122_0 = (num * 2306049815u ^ 322888747u);
                            continue;
                        }
                        goto IL_B4B;
                    }
                    }
                    goto Block_4;
                }
            }
            uint arg_A6D_0;
            int  index;
            Dictionary <byte, Item> dictionary;

            while (true)
            {
IL_A68:
                uint num;
                switch ((num = (arg_A6D_0 ^ 2735090873u)) % 52u)
                {
                case 0u:
                {
                    Item item3;
                    session.Character.SetUpdateField <ushort>(1035 + (int)(equipSlot * 2) + 1, (ushort)item3.ModId, 0);
                    arg_A6D_0 = (num * 2688365806u ^ 3665580916u);
                    continue;
                }

                case 2u:
                    session.Character.SetUpdateField <ushort>(1035 + (int)(equipSlot * 2) + 1, 0, 1);
                    arg_A6D_0 = (num * 397079707u ^ 2550042554u);
                    continue;

                case 3u:
                {
                    byte b;
                    arg_A6D_0 = (((int)b < session.Character.Bag.Count) ? 3012765023u : 3532292612u);
                    continue;
                }

                case 4u:
                {
                    Item item4 = session.Character.Equipment[equipSlot];
                    arg_A6D_0 = (num * 625219965u ^ 158864307u);
                    continue;
                }

                case 5u:
                {
                    int num2;
                    arg_A6D_0 = ((num2 >= 16) ? 3752629640u : 3003850106u);
                    continue;
                }

                case 6u:
                {
                    int num2 = 0;
                    arg_A6D_0 = (num * 2687791784u ^ 2016439126u);
                    continue;
                }

                case 7u:
                {
                    int num3;
                    index     = num3;
                    arg_A6D_0 = (num * 971334227u ^ 618718611u);
                    continue;
                }

                case 8u:
                {
                    byte b;
                    b        += 1;
                    arg_A6D_0 = (num * 1052352431u ^ 2217463802u);
                    continue;
                }

                case 9u:
                    goto IL_928;

                case 10u:
                    goto IL_912;

                case 11u:
                {
                    int num2;
                    session.Character.SetUpdateField <ulong>(1085 + (23 + num2) * 4 + 2, 0uL, 0);
                    arg_A6D_0 = (num * 3990101372u ^ 1156157827u);
                    continue;
                }

                case 12u:
                    session.Character.SetUpdateField <ulong>(1085 + (int)(equipSlot * 4), 0uL, 0);
                    arg_A6D_0 = (num * 2450056873u ^ 1905378433u);
                    continue;

                case 13u:
                    ObjectHandler.HandleUpdateObjectValues(ref session2, false);
                    arg_A6D_0 = (num * 2846314608u ^ 3060895351u);
                    continue;

                case 14u:
                    session.Character.SetUpdateField <ushort>(1035 + (int)(equipSlot * 2) + 1, 0, 0);
                    arg_A6D_0 = (num * 3375404461u ^ 3611762605u);
                    continue;

                case 15u:
                {
                    int num2;
                    session.Character.SetUpdateField <ulong>(1085 + (23 + num2) * 4, 0uL, 0);
                    arg_A6D_0 = 3244715514u;
                    continue;
                }

                case 16u:
                    session.Character.SetUpdateField <ulong>(1085 + (int)(equipSlot * 4) + 2, 0uL, 0);
                    session.Character.SetUpdateField <ulong>(1085 + (int)(equipSlot * 4), smartGuid.Guid, 0);
                    session.Character.SetUpdateField <ulong>(1085 + (int)(equipSlot * 4) + 2, smartGuid.HighGuid, 0);
                    ObjectHandler.HandleUpdateObjectValues(ref session2, false);
                    session.Character.SetUpdateField <int>(1035 + (int)(equipSlot * 2), 0, 0);
                    arg_A6D_0 = (num * 1510252851u ^ 1999990189u);
                    continue;

                case 17u:
                    ObjectHandler.HandleUpdateObjectValues(ref session2, false);
                    arg_A6D_0 = (num * 1475435762u ^ 2350161561u);
                    continue;

                case 18u:
                {
                    int num2;
                    num2++;
                    arg_A6D_0 = (num * 312829336u ^ 108542544u);
                    continue;
                }

                case 19u:
                {
                    Item item3;
                    session.Character.Equipment.Add(equipSlot, item3);
                    Item item4;
                    session.Character.Bag.Add(bagSlot, item4);
                    arg_A6D_0 = (num * 2281705214u ^ 4242836535u);
                    continue;
                }

                case 20u:
                    session.Character.SetUpdateField <int>(1035 + (int)(equipSlot * 2), item2.Id, 0);
                    arg_A6D_0 = (num * 1960862831u ^ 2754346203u);
                    continue;

                case 21u:
                {
                    byte b = 0;
                    arg_A6D_0 = (num * 269226237u ^ 265745344u);
                    continue;
                }

                case 22u:
                {
                    int num3 = 0;
                    arg_A6D_0 = (num * 888651060u ^ 1045458128u);
                    continue;
                }

                case 23u:
                    arg_A6D_0 = (num * 3169614868u ^ 1615237482u);
                    continue;

                case 24u:
                    arg_A6D_0 = (num * 1798968942u ^ 2783094218u);
                    continue;

                case 25u:
                    session.Character.Equipment.Remove(equipSlot);
                    arg_A6D_0 = (num * 2316556123u ^ 1531280410u);
                    continue;

                case 26u:
                {
                    Item      item3 = session.Character.Bag[bagSlot];
                    Item      item4;
                    SmartGuid smartGuid2 = new SmartGuid(item4.Guid, 0, GuidType.Item, 0uL);
                    SmartGuid smartGuid3 = new SmartGuid(item3.Guid, 0, GuidType.Item, 0uL);
                    arg_A6D_0 = (num * 2984176438u ^ 4129044090u);
                    continue;
                }

                case 27u:
                {
                    byte      b;
                    SmartGuid smartGuid4;
                    session.Character.SetUpdateField <ulong>(1085 + (int)((23 + b) * 4) + 2, smartGuid4.HighGuid, 0);
                    arg_A6D_0 = (num * 2890893173u ^ 349214354u);
                    continue;
                }

                case 28u:
                {
                    SmartGuid smartGuid2;
                    session.Character.SetUpdateField <ulong>(1085 + (int)(bagSlot * 4), smartGuid2.Guid, 0);
                    session.Character.SetUpdateField <ulong>(1085 + (int)(bagSlot * 4) + 2, smartGuid2.HighGuid, 0);
                    arg_A6D_0 = (num * 737849647u ^ 1775535865u);
                    continue;
                }

                case 29u:
                {
                    int num3;
                    arg_A6D_0 = ((num3 < Manager.WorldMgr.CharaterList.Count) ? 4017585302u : 2853305574u);
                    continue;
                }

                case 30u:
                    goto IL_588;

                case 31u:
                {
                    int num3;
                    num3++;
                    arg_A6D_0 = 4264159176u;
                    continue;
                }

                case 32u:
                    arg_A6D_0 = ((session.Character.Equipment.ContainsKey(equipSlot) ? 3897993171u : 4023075236u) ^ num * 3842347572u);
                    continue;

                case 33u:
                    goto IL_B4B;

                case 34u:
                    session.Character.SetUpdateField <ushort>(1035 + (int)(equipSlot * 2) + 1, (ushort)item2.ModId, 0);
                    arg_A6D_0 = (num * 2822665324u ^ 3380783635u);
                    continue;

                case 35u:
                    arg_A6D_0 = (num * 3349837127u ^ 2233701625u);
                    continue;

                case 36u:
                {
                    session.Character.SetUpdateField <ulong>(1085 + (int)(equipSlot * 4) + 2, 0uL, 0);
                    SmartGuid smartGuid3;
                    session.Character.SetUpdateField <ulong>(1085 + (int)(equipSlot * 4), smartGuid3.Guid, 0);
                    arg_A6D_0 = (num * 927448395u ^ 866192737u);
                    continue;
                }

                case 37u:
                    session.Character.SetUpdateField <ushort>(1035 + (int)(equipSlot * 2) + 1, 0, 0);
                    arg_A6D_0 = (num * 1706796764u ^ 3182899609u);
                    continue;

                case 38u:
                {
                    Item item3;
                    session.Character.SetUpdateField <int>(1035 + (int)(equipSlot * 2), item3.Id, 0);
                    arg_A6D_0 = (num * 42299747u ^ 2380411742u);
                    continue;
                }

                case 39u:
                    arg_A6D_0 = (num * 1318585816u ^ 3647086635u);
                    continue;

                case 40u:
                    session.Character.Bag = dictionary;
                    arg_A6D_0             = (num * 2027637424u ^ 1585480347u);
                    continue;

                case 41u:
                    arg_A6D_0 = (((!session.Character.Bag.ContainsKey(bagSlot)) ? 1338625282u : 395459323u) ^ num * 783094712u);
                    continue;

                case 42u:
                    session.Character.SetUpdateField <int>(1035 + (int)(equipSlot * 2), 0, 0);
                    arg_A6D_0 = (num * 1468912291u ^ 969255781u);
                    continue;

                case 43u:
                    Manager.WorldMgr.CharaterList[index] = session.Character;
                    arg_A6D_0 = 2195683288u;
                    continue;

                case 44u:
                {
                    byte      b;
                    SmartGuid smartGuid4;
                    session.Character.SetUpdateField <ulong>(1085 + (int)((23 + b) * 4), smartGuid4.Guid, 0);
                    arg_A6D_0 = (num * 1452020312u ^ 1516754462u);
                    continue;
                }

                case 45u:
                    session.Character.SetUpdateField <ushort>(1035 + (int)(equipSlot * 2) + 1, 0, 1);
                    arg_A6D_0 = (num * 4099664907u ^ 2811872651u);
                    continue;

                case 46u:
                {
                    byte      b;
                    SmartGuid smartGuid4 = new SmartGuid(session.Character.Bag[23 + b].Guid, 0, GuidType.Item, 0uL);
                    arg_A6D_0 = 3795433309u;
                    continue;
                }

                case 47u:
                    session.Character.Bag.Remove(bagSlot);
                    arg_A6D_0 = (num * 75564486u ^ 2509859790u);
                    continue;

                case 48u:
                {
                    SmartGuid smartGuid3;
                    session.Character.SetUpdateField <ulong>(1085 + (int)(equipSlot * 4) + 2, smartGuid3.HighGuid, 0);
                    arg_A6D_0 = (num * 2532079306u ^ 2782626003u);
                    continue;
                }

                case 49u:
                    ObjectHandler.HandleUpdateObjectValues(ref session2, false);
                    ObjectHandler.HandleUpdateObjectValues(ref session2, true);
                    arg_A6D_0 = (num * 617855158u ^ 1998553940u);
                    continue;

                case 50u:
                    session.Character.SetUpdateField <ulong>(1085 + (int)(equipSlot * 4), 0uL, 0);
                    arg_A6D_0 = (num * 2240052089u ^ 4263156475u);
                    continue;

                case 51u:
                {
                    int num3;
                    arg_A6D_0 = ((Manager.WorldMgr.CharaterList[num3].Guid != session.Character.Guid) ? 3122669558u : 3428108934u);
                    continue;
                }
                }
                break;
            }
            ItemHandler.smethod_1(ItemHandler.smethod_0(Helper.DataDirectory(), Module.smethod_34 <string>(1144845388u)), Json.CreateString <List <Character> >(Manager.WorldMgr.CharaterList));
            return;

Block_4:
            dictionary = new Dictionary <byte, Item>();
            using (Dictionary <byte, Item> .Enumerator enumerator = session.Character.Bag.GetEnumerator())
            {
                while (true)
                {
IL_1ED:
                    int arg_1C4_0 = enumerator.MoveNext() ? -232738112 : -1969773645;
                    while (true)
                    {
                        switch ((arg_1C4_0 ^ -1559876423) % 4)
                        {
                        case 0:
                            arg_1C4_0 = -232738112;
                            continue;

                        case 1:
                        {
                            KeyValuePair <byte, Item> current = enumerator.Current;
                            dictionary.Add((current.Key > bagSlot) ? (current.Key - 1) : current.Key, current.Value);
                            arg_1C4_0 = -1601354682;
                            continue;
                        }

                        case 3:
                            goto IL_1ED;
                        }
                        goto Block_16;
                    }
                }
                Block_16 :;
            }
            session.Character.Bag.Clear();
IL_588:
            arg_A6D_0 = 2199478937u;
            goto IL_A68;
IL_912:
            session2.Character = session.Character;
            arg_A6D_0          = 3632523060u;
            goto IL_A68;
IL_928:
            arg_A6D_0 = (session.Character.Equipment.ContainsKey(equipSlot) ? 2517109469u : 3799877539u);
            goto IL_A68;
IL_B4B:
            index     = 0;
            arg_A6D_0 = 3332340327u;
            goto IL_A68;
        }
Esempio n. 11
0
        public static void HandleConnectTo(WorldClass session, ushort port = 3724, byte conn = 0, WorldClass2 session2 = null)
        {
            PacketWriter packetWriter = new PacketWriter(ServerMessage.ConnectTo, true);

            while (true)
            {
IL_65:
                uint arg_48_0 = 1189851645u;
                while (true)
                {
                    uint num;
                    switch ((num = (arg_48_0 ^ 117810876u)) % 4u)
                    {
                    case 0u:
                        goto IL_65;

                    case 1u:
                        packetWriter.WriteUInt64(12330219965770517405uL);
                        arg_48_0 = (num * 886289363u ^ 1599573856u);
                        continue;

                    case 3u:
                        packetWriter.WriteUInt32(14u);
                        arg_48_0 = (num * 798883457u ^ 2791294625u);
                        continue;
                    }
                    goto Block_1;
                }
            }
Block_1:
            RsaCrypt rsaCrypt = new RsaCrypt();

            try
            {
                rsaCrypt.InitializeEncryption <byte[]>(RsaStore.D, RsaStore.P, RsaStore.Q, RsaStore.DP, RsaStore.DQ, RsaStore.InverseQ, false);
                while (true)
                {
IL_53C:
                    uint arg_4A2_0 = 1950399364u;
                    while (true)
                    {
                        uint num;
                        switch ((num = (arg_4A2_0 ^ 117810876u)) % 35u)
                        {
                        case 0u:
                        {
                            byte[] array;
                            int    num2;
                            array[num2] = (byte)AuthenticationHandler.payloadOrder[num2];
                            arg_4A2_0   = 778837338u;
                            continue;
                        }

                        case 1u:
                        {
                            byte[] array2;
                            array2[10] = 0;
                            array2[11] = 0;
                            arg_4A2_0  = (num * 3426925493u ^ 1622493560u);
                            continue;
                        }

                        case 2u:
                        {
                            byte[] array2;
                            array2[18] = 0;
                            arg_4A2_0  = (num * 3672511218u ^ 2614652434u);
                            continue;
                        }

                        case 3u:
                        {
                            byte[] array2;
                            array2[0] = 67;
                            arg_4A2_0 = (num * 70935332u ^ 306833328u);
                            continue;
                        }

                        case 4u:
                        {
                            byte[] array2;
                            byte[] array3;
                            array2[22] = array3[1];
                            arg_4A2_0  = (num * 3674763274u ^ 3649142947u);
                            continue;
                        }

                        case 5u:
                        {
                            byte[] array2;
                            array2[13] = 0;
                            array2[14] = 0;
                            arg_4A2_0  = (num * 788135060u ^ 2778562157u);
                            continue;
                        }

                        case 6u:
                            goto IL_53C;

                        case 7u:
                        {
                            byte[] array2;
                            array2[1] = 253;
                            array2[2] = 184;
                            arg_4A2_0 = (num * 4034181865u ^ 116591846u);
                            continue;
                        }

                        case 8u:
                        {
                            byte[] array2;
                            array2[15] = 0;
                            array2[16] = 0;
                            arg_4A2_0  = (num * 1808574983u ^ 3232411455u);
                            continue;
                        }

                        case 9u:
                        {
                            byte[] array2 = new byte[255];
                            arg_4A2_0 = (num * 3052653591u ^ 3793484446u);
                            continue;
                        }

                        case 10u:
                            arg_4A2_0 = (num * 566048763u ^ 581218626u);
                            continue;

                        case 11u:
                        {
                            byte[] array2;
                            array2[233] = 42;
                            arg_4A2_0   = (num * 3199619518u ^ 4104188893u);
                            continue;
                        }

                        case 12u:
                        {
                            byte[] array2;
                            array2[5] = 127;
                            arg_4A2_0 = (num * 534924131u ^ 1301694869u);
                            continue;
                        }

                        case 13u:
                        {
                            byte[] array2;
                            array2[20] = 0;
                            byte[] array3 = AuthenticationHandler.smethod_10(port);
                            array2[21] = array3[0];
                            arg_4A2_0  = (num * 1558897694u ^ 577623817u);
                            continue;
                        }

                        case 14u:
                        {
                            byte[] array2;
                            array2[6] = 0;
                            arg_4A2_0 = (num * 1594444616u ^ 3121916550u);
                            continue;
                        }

                        case 15u:
                        {
                            byte[] array2;
                            AuthenticationHandler.smethod_13(new byte[0].GenerateRandomKey(20), 0, array2, 234, 20);
                            arg_4A2_0 = (num * 1673846917u ^ 3902196868u);
                            continue;
                        }

                        case 16u:
                        {
                            byte[] expr_2B6 = new byte[32];
                            AuthenticationHandler.smethod_8(expr_2B6, fieldof(< PrivateImplementationDetails >.struct8_0).FieldHandle);
                            byte[] array2;
                            AuthenticationHandler.smethod_13(expr_2B6, 0, array2, 93, 32);
                            AuthenticationHandler.smethod_13(new byte[108], 0, array2, 125, 108);
                            arg_4A2_0 = (num * 3680003173u ^ 2041052791u);
                            continue;
                        }

                        case 17u:
                        {
                            byte[] array2;
                            Array  arg_297_0 = rsaCrypt.Encrypt <byte[]>(array2, false);
                            byte[] array4    = new byte[256];
                            AuthenticationHandler.smethod_14(arg_297_0, array4, 256);
                            arg_4A2_0 = (num * 2289352343u ^ 161977499u);
                            continue;
                        }

                        case 18u:
                        {
                            int num2;
                            num2++;
                            arg_4A2_0 = 1213188245u;
                            continue;
                        }

                        case 19u:
                        {
                            rsaCrypt.InitializeDecryption <byte[]>(RsaStore.Exponent, RsaStore.Modulus, false);
                            byte[] array = new byte[AuthenticationHandler.payloadOrder.Length];
                            arg_4A2_0 = (num * 163108824u ^ 2004099280u);
                            continue;
                        }

                        case 20u:
                        {
                            byte[] array2;
                            array2[7] = 0;
                            arg_4A2_0 = (num * 669897089u ^ 3823184314u);
                            continue;
                        }

                        case 21u:
                        {
                            int num2 = 0;
                            arg_4A2_0 = (num * 1178352322u ^ 2056709069u);
                            continue;
                        }

                        case 22u:
                        {
                            string string_ = Module.smethod_35 <string>(848950031u);
                            arg_4A2_0 = (num * 560797187u ^ 1592203457u);
                            continue;
                        }

                        case 23u:
                            packetWriter.WriteUInt8(conn);
                            arg_4A2_0 = (num * 264353632u ^ 1806577887u);
                            continue;

                        case 24u:
                        {
                            int num2;
                            arg_4A2_0 = ((AuthenticationHandler.payloadOrder[num2] <= 16) ? 423310451u : 557178527u);
                            continue;
                        }

                        case 25u:
                        {
                            byte[] array2;
                            array2[3] = 34;
                            array2[4] = 1;
                            arg_4A2_0 = (num * 4152105185u ^ 2192753377u);
                            continue;
                        }

                        case 26u:
                        {
                            byte[] array;
                            int    num2;
                            array[num2] = (byte)(AuthenticationHandler.payloadOrder[num2] - 3);
                            arg_4A2_0   = (num * 3507665298u ^ 2968893570u);
                            continue;
                        }

                        case 27u:
                        {
                            byte[] array2;
                            array2[12] = 0;
                            arg_4A2_0  = (num * 618037152u ^ 1046649983u);
                            continue;
                        }

                        case 28u:
                        {
                            byte[] array2;
                            array2[19] = 0;
                            arg_4A2_0  = (num * 1680293565u ^ 2487070996u);
                            continue;
                        }

                        case 29u:
                        {
                            int num2;
                            arg_4A2_0 = ((num2 >= AuthenticationHandler.payloadOrder.Length) ? 858439922u : 70439534u);
                            continue;
                        }

                        case 30u:
                        {
                            byte[] array4;
                            AuthenticationHandler.smethod_0(packetWriter, array4);
                            arg_4A2_0 = (num * 216092153u ^ 2688375690u);
                            continue;
                        }

                        case 31u:
                        {
                            byte[] array2;
                            array2[8] = 1;
                            array2[9] = 0;
                            arg_4A2_0 = (num * 3445269463u ^ 748842564u);
                            continue;
                        }

                        case 33u:
                        {
                            byte[] array2;
                            array2[17] = 0;
                            arg_4A2_0  = (num * 40612712u ^ 3030126910u);
                            continue;
                        }

                        case 34u:
                        {
                            byte[] array2;
                            string string_;
                            AuthenticationHandler.smethod_13(AuthenticationHandler.smethod_12(AuthenticationHandler.smethod_11(), string_), 0, array2, 23, 71);
                            arg_4A2_0 = (num * 376848159u ^ 536405427u);
                            continue;
                        }
                        }
                        goto Block_7;
                    }
                }
                Block_7 :;
            }
            finally
            {
                if (rsaCrypt != null)
                {
                    while (true)
                    {
                        IL_57F :
                        uint arg_566_0 = 461746135u;
                        while (true)
                        {
                            uint num;
                            switch ((num = (arg_566_0 ^ 117810876u)) % 3u)
                            {
                            case 0u:
                                goto IL_57F;

                            case 2u:
                                AuthenticationHandler.smethod_15(rsaCrypt);
                                arg_566_0 = (num * 3554924306u ^ 496472224u);
                                continue;
                            }
                            goto Block_10;
                        }
                    }
                    Block_10 :;
                }
            }
            if (session2 == null)
            {
                goto IL_5B1;
            }
IL_58A:
            int arg_594_0 = 202372283;

IL_58F:
            switch ((arg_594_0 ^ 117810876) % 4)
            {
            case 0:
IL_5B1:
                session.Send(ref packetWriter);
                arg_594_0 = 910700601;
                goto IL_58F;

            case 2:
                goto IL_58A;

            case 3:
                session2.Send(ref packetWriter);
                return;
            }
        }
Esempio n. 12
0
 public static void HandleReadyForAccountDataTimes(ref PacketReader packet, WorldClass2 session)
 {
     Log.Message(LogType.Error, Module.smethod_37 <string>(3535683298u), Array.Empty <object>());
 }
Esempio n. 13
0
        public static void HandleSetSelection(ref PacketReader packet, WorldClass2 session)
        {
            ulong num  = packet.ReadSmartGuid();
            ulong num2 = num;

            if (session.Character != null)
            {
                while (true)
                {
IL_102:
                    uint arg_D6_0 = 3744153441u;
                    while (true)
                    {
                        uint num3;
                        switch ((num3 = (arg_D6_0 ^ 2889169456u)) % 8u)
                        {
                        case 0u:
                            goto IL_109;

                        case 1u:
                        {
                            WorldClass session2 = Manager.WorldMgr.GetSession(session.Character.Guid);
                            arg_D6_0 = (num3 * 2616728126u ^ 4099375192u);
                            continue;
                        }

                        case 2u:
                            goto IL_102;

                        case 4u:
                        {
                            WorldClass session2;
                            session2.Character.TargetGuid = num;
                            arg_D6_0 = (num3 * 177931843u ^ 3339308577u);
                            continue;
                        }

                        case 5u:
                            arg_D6_0 = ((num2 == 0uL) ? 2175149112u : 3071540255u);
                            continue;

                        case 6u:
                        {
                            WorldClass session2;
                            arg_D6_0 = (((session2 != null) ? 3933082510u : 3865277495u) ^ num3 * 2745653647u);
                            continue;
                        }

                        case 7u:
                            Log.Message(LogType.Debug, Module.smethod_34 <string>(3202474686u), new object[]
                            {
                                session.Character.Guid,
                                num2
                            });
                            arg_D6_0 = 3481464427u;
                            continue;
                        }
                        goto Block_4;
                    }
                }
Block_4:
                return;

IL_109:
                Log.Message(LogType.Debug, Module.smethod_35 <string>(3044584216u), new object[]
                {
                    session.Character.Guid
                });
                return;
            }
        }
Esempio n. 14
0
        public static void HandleAuthContinuedSession(ref PacketReader packet, WorldClass2 session)
        {
            AuthenticationHandler.session2 = session;
            Manager.WorldMgr.Sessions.SingleOrDefault <KeyValuePair <ulong, WorldClass> >();
            while (true)
            {
IL_1B7:
                uint arg_17D_0 = 2389353796u;
                while (true)
                {
                    uint num;
                    switch ((num = (arg_17D_0 ^ 2381408322u)) % 11u)
                    {
                    case 0u:
                        goto IL_1B7;

                    case 1u:
                    {
                        SHA1Managed expr_127 = AuthenticationHandler.smethod_18();
                        byte[]      array;
                        AuthenticationHandler.smethod_3(expr_127, array, 0, array.Length, array, 0);
                        byte[] array2;
                        AuthenticationHandler.smethod_3(expr_127, array2, 0, 40, array2, 0);
                        byte[] byte_;
                        AuthenticationHandler.smethod_4(expr_127, byte_, 0, 4);
                        AuthenticationHandler.smethod_5(expr_127);
                        new PacketWriter(ServerMessage.EnableCrypt, false);
                        PacketWriter packetWriter = new PacketWriter(ServerMessage.ResumeComms, true);
                        arg_17D_0 = (num * 3949002163u ^ 3941582883u);
                        continue;
                    }

                    case 2u:
                    {
                        PacketWriter packetWriter;
                        AuthenticationHandler.session2.Send(ref packetWriter);
                        arg_17D_0 = (num * 3904375768u ^ 568160447u);
                        continue;
                    }

                    case 3u:
                        packet.Read <ulong>();
                        packet.ReadBytes(20u);
                        arg_17D_0 = (((AuthenticationHandler.session2 != null) ? 2852424687u : 3500428177u) ^ num * 109821150u);
                        continue;

                    case 4u:
                    {
                        byte[] array2 = AuthenticationHandler.sessionKey;
                        arg_17D_0 = (num * 2163954332u ^ 1605872583u);
                        continue;
                    }

                    case 5u:
                        return;

                    case 6u:
                    {
                        byte[] byte_ = AuthenticationHandler.smethod_17(2549515048u);
                        arg_17D_0 = (num * 4131246918u ^ 2980239949u);
                        continue;
                    }

                    case 7u:
                        packet.Read <ulong>();
                        arg_17D_0 = (num * 3561050817u ^ 404291365u);
                        continue;

                    case 8u:
                        arg_17D_0 = ((Manager.WorldMgr.AddSession2(0uL, ref AuthenticationHandler.session2) ? 213636815u : 1576825925u) ^ num * 3435104658u);
                        continue;

                    case 9u:
                    {
                        byte[] array = AuthenticationHandler.smethod_12(AuthenticationHandler.smethod_16(), Module.smethod_34 <string>(1006528553u));
                        arg_17D_0 = 2341857576u;
                        continue;
                    }
                    }
                    goto Block_3;
                }
            }
            Block_3 :;
        }
Esempio n. 15
0
        public static void HandleQueryCreature(ref PacketReader packet, WorldClass2 session)
        {
            int          num          = packet.Read <int>();
            PacketWriter packetWriter = new PacketWriter(ServerMessage.QueryCreatureResponse, true);
            Creature     creature;

            while (true)
            {
IL_2D5:
                uint arg_273_0 = 935609141u;
                while (true)
                {
                    uint     num2;
                    Creature arg_94_0;
                    Creature creature2;
                    switch ((num2 = (arg_273_0 ^ 1968969320u)) % 21u)
                    {
                    case 0u:
                        arg_273_0 = (num2 * 1160359644u ^ 1382369928u);
                        continue;

                    case 1u:
                    {
                        BitPack bitPack;
                        bitPack.Write <int>(0, 11);
                        arg_273_0 = (num2 * 677173750u ^ 1461952003u);
                        continue;
                    }

                    case 2u:
                    {
                        int num3;
                        arg_273_0 = ((num3 < 8) ? 494615343u : 1586928102u);
                        continue;
                    }

                    case 3u:
                    {
                        BitPack bitPack;
                        bitPack.Write <int>(CacheHandler.smethod_0(creature.Name) + 1, 11);
                        arg_273_0 = (num2 * 1758624067u ^ 374741763u);
                        continue;
                    }

                    case 4u:
                    {
                        BitPack bitPack;
                        bitPack.Write <int>(CacheHandler.smethod_0(creature.IconName) + 1, 6);
                        arg_273_0 = (num2 * 1232297304u ^ 4160998185u);
                        continue;
                    }

                    case 5u:
                    {
                        int num3;
                        num3++;
                        arg_273_0 = 1308934713u;
                        continue;
                    }

                    case 6u:
                    {
                        int num3 = 0;
                        arg_273_0 = (num2 * 3728719144u ^ 2678938313u);
                        continue;
                    }

                    case 7u:
                    {
                        BitPack bitPack;
                        bitPack.Write <int>(0, 11);
                        arg_273_0 = 1141993764u;
                        continue;
                    }

                    case 8u:
                    {
                        BitPack bitPack;
                        bitPack.Flush();
                        arg_273_0 = (num2 * 3762835184u ^ 3777278325u);
                        continue;
                    }

                    case 9u:
                    {
                        BitPack bitPack;
                        bool    flag;
                        bitPack.Write <bool>(flag);
                        arg_273_0 = (num2 * 138756829u ^ 2636086554u);
                        continue;
                    }

                    case 10u:
                    {
                        bool flag;
                        if (flag)
                        {
                            arg_273_0 = (num2 * 2594936822u ^ 3565690882u);
                            continue;
                        }
                        goto IL_461;
                    }

                    case 11u:
                        arg_94_0 = null;
                        goto IL_94;

                    case 12u:
                    {
                        BitPack bitPack = new BitPack(packetWriter, 0uL, 0uL, 0uL, 0uL);
                        arg_273_0 = (num2 * 4280214209u ^ 1042752614u);
                        continue;
                    }

                    case 13u:
                    {
                        int num3;
                        arg_273_0 = ((num3 == 0) ? 1779483626u : 1978272905u);
                        continue;
                    }

                    case 14u:
                    {
                        BitPack bitPack;
                        bitPack.Write <byte>(creature.RacialLeader);
                        arg_273_0 = (num2 * 1236445006u ^ 3192248368u);
                        continue;
                    }

                    case 16u:
                    {
                        creature = creature2;
                        BitPack bitPack;
                        bitPack.Write <int>((CacheHandler.smethod_0(creature.SubName) != 0) ? (CacheHandler.smethod_0(creature.SubName) + 1) : 0, 11);
                        arg_273_0 = 1985970779u;
                        continue;
                    }

                    case 17u:
                        if (!Manager.ObjectMgr.Creatures.ContainsKey(num))
                        {
                            arg_273_0 = (num2 * 3085956927u ^ 2159627834u);
                            continue;
                        }
                        arg_94_0 = Manager.ObjectMgr.Creatures[num];
                        goto IL_94;

                    case 18u:
                    {
                        bool flag = creature2 != null;
                        packetWriter.WriteInt32(num);
                        arg_273_0 = (num2 * 2288083706u ^ 371019689u);
                        continue;
                    }

                    case 19u:
                        goto IL_2D5;

                    case 20u:
                    {
                        BitPack bitPack;
                        bitPack.Flush();
                        packetWriter.WriteCString(creature.Name);
                        arg_273_0 = (num2 * 2500615134u ^ 1082460273u);
                        continue;
                    }
                    }
                    goto Block_6;
IL_94:
                    creature2 = arg_94_0;
                    arg_273_0 = 499258206u;
                }
            }
            uint arg_57B_0;

            while (true)
            {
IL_576:
                uint num2;
                switch ((num2 = (arg_57B_0 ^ 1968969320u)) % 13u)
                {
                case 0u:
                    goto IL_5BD;

                case 1u:
                    packetWriter.WriteUInt32(0u);
                    packetWriter.WriteInt32(0);
                    packetWriter.WriteInt32(creature.MovementInfoId);
                    arg_57B_0 = (num2 * 2108068086u ^ 2103927701u);
                    continue;

                case 2u:
                    packetWriter.WriteFloat(creature.PowerModifier);
                    arg_57B_0 = (num2 * 3254214234u ^ 1483086716u);
                    continue;

                case 3u:
                    packetWriter.WriteCString(creature.SubName);
                    arg_57B_0 = (num2 * 68929227u ^ 1745800214u);
                    continue;

                case 4u:
                    arg_57B_0 = ((!CacheHandler.smethod_1(creature.IconName, "")) ? 2105694095u : 1920274108u);
                    continue;

                case 6u:
                    arg_57B_0 = (num2 * 3208784011u ^ 1758951452u);
                    continue;

                case 7u:
                    arg_57B_0 = ((CacheHandler.smethod_1(creature.SubName, "") ? 515129868u : 272658274u) ^ num2 * 1474246403u);
                    continue;

                case 8u:
                    session.Send(ref packetWriter);
                    arg_57B_0 = 930990882u;
                    continue;

                case 9u:
                    goto IL_461;

                case 10u:
                    packetWriter.WriteInt32(creature.ExpansionRequired);
                    packetWriter.WriteInt32(0);
                    arg_57B_0 = (num2 * 374667452u ^ 3127358176u);
                    continue;

                case 11u:
                    packetWriter.WriteInt32(0);
                    packetWriter.WriteInt32(creature.DisplayInfoId[0]);
                    packetWriter.WriteInt32(creature.DisplayInfoId[1]);
                    packetWriter.WriteInt32(creature.DisplayInfoId[2]);
                    packetWriter.WriteInt32(creature.DisplayInfoId[3]);
                    packetWriter.WriteFloat(creature.HealthModifier);
                    arg_57B_0 = (num2 * 3255905299u ^ 1742458378u);
                    continue;

                case 12u:
                    packetWriter.WriteCString(creature.IconName);
                    arg_57B_0 = (num2 * 3969563941u ^ 2161894101u);
                    continue;
                }
                break;
            }
            return;

Block_6:
            using (List <uint> .Enumerator enumerator = creature.Flag.GetEnumerator())
            {
                while (true)
                {
IL_359:
                    uint arg_32C_0 = enumerator.MoveNext() ? 282529697u : 694090308u;
                    while (true)
                    {
                        uint num2;
                        switch ((num2 = (arg_32C_0 ^ 1968969320u)) % 5u)
                        {
                        case 0u:
                        {
                            uint current;
                            packetWriter.WriteUInt32(current);
                            arg_32C_0 = (num2 * 555555645u ^ 4034385136u);
                            continue;
                        }

                        case 1u:
                        {
                            uint current = enumerator.Current;
                            arg_32C_0 = 2123150290u;
                            continue;
                        }

                        case 2u:
                            arg_32C_0 = 282529697u;
                            continue;

                        case 3u:
                            goto IL_359;
                        }
                        goto Block_12;
                    }
                }
                Block_12 :;
            }
            packetWriter.WriteInt32(creature.Type);
            packetWriter.WriteInt32(creature.Family);
            packetWriter.WriteInt32(creature.Rank);
            packetWriter.WriteInt32(0);
            goto IL_5BD;
IL_461:
            Log.Message(LogType.Debug, Module.smethod_36 <string>(1817613708u), new object[]
            {
                num
            });
            arg_57B_0 = 2105694095u;
            goto IL_576;
IL_5BD:
            arg_57B_0 = 602327916u;
            goto IL_576;
        }
Esempio n. 16
0
        public static void HandleCastSpell(ref PacketReader packet, WorldClass2 session)
        {
            SmartGuid castId = packet.ReadGuid();

            packet.Read <int>();
            WorldClass session2;
            bool       flag;
            int        num2;

            while (true)
            {
IL_A5:
                uint arg_80_0 = 88971970u;
                while (true)
                {
                    uint num;
                    switch ((num = (arg_80_0 ^ 899281459u)) % 6u)
                    {
                    case 0u:
                        session2 = Manager.WorldMgr.GetSession(session.Character.Guid);
                        arg_80_0 = (num * 2285706345u ^ 946484535u);
                        continue;

                    case 2u:
                        flag     = false;
                        arg_80_0 = (num * 2596192904u ^ 1190916770u);
                        continue;

                    case 3u:
                        num2     = packet.Read <int>();
                        arg_80_0 = (num * 1794880723u ^ 3422198762u);
                        continue;

                    case 4u:
                        goto IL_A5;

                    case 5u:
                        packet.Read <int>();
                        arg_80_0 = (num * 1876448829u ^ 2032187839u);
                        continue;
                    }
                    goto Block_1;
                }
            }
Block_1:
            uint key = 0u;

            using (Dictionary <string, Tuple <uint, uint> > .Enumerator enumerator = Manager.WorldMgr.MountSpells.GetEnumerator())
            {
                while (true)
                {
IL_178:
                    uint arg_140_0 = enumerator.MoveNext() ? 1710289446u : 1398974958u;
                    while (true)
                    {
                        uint num;
                        switch ((num = (arg_140_0 ^ 899281459u)) % 7u)
                        {
                        case 0u:
                        {
                            KeyValuePair <string, Tuple <uint, uint> > current;
                            arg_140_0 = ((((ulong)current.Value.Item2 != (ulong)((long)num2)) ? 2858814123u : 2326435399u) ^ num * 1448571402u);
                            continue;
                        }

                        case 2u:
                            goto IL_178;

                        case 3u:
                        {
                            KeyValuePair <string, Tuple <uint, uint> > current = enumerator.Current;
                            arg_140_0 = 407543239u;
                            continue;
                        }

                        case 4u:
                        {
                            KeyValuePair <string, Tuple <uint, uint> > current;
                            key       = current.Value.Item1;
                            flag      = true;
                            arg_140_0 = (num * 3736795090u ^ 2499053439u);
                            continue;
                        }

                        case 5u:
                            arg_140_0 = 1710289446u;
                            continue;
                        }
                        goto Block_8;
                    }
                }
                Block_8 :;
            }
            if (flag)
            {
                goto IL_21A;
            }
            goto IL_2AA;
            uint arg_270_0;

            while (true)
            {
IL_26B:
                uint num;
                switch ((num = (arg_270_0 ^ 899281459u)) % 11u)
                {
                case 0u:
                    goto IL_2B9;

                case 1u:
                    SpellHandler.activeSpell = num2;
                    arg_270_0 = 1254900537u;
                    continue;

                case 2u:
                    ObjectHandler.HandleUpdateObjectValues(ref session2, false);
                    arg_270_0 = (num * 491903829u ^ 962464016u);
                    continue;

                case 3u:
                    session.Character.SetUpdateField <int>(107, 0, 0);
                    ObjectHandler.HandleUpdateObjectValues(ref session2, false);
                    arg_270_0 = (num * 848114486u ^ 2321693018u);
                    continue;

                case 4u:
                    goto IL_21A;

                case 5u:
                    session.Character.SetUpdateField <uint>(107, Manager.WorldMgr.MountDisplays[key], 0);
                    arg_270_0 = (num * 1207556804u ^ 358871447u);
                    continue;

                case 6u:
                    goto IL_2AA;

                case 7u:
                    goto IL_2C0;

                case 8u:
                    arg_270_0 = (((SpellHandler.activeSpell != 0) ? 3488354535u : 2713727219u) ^ num * 1240849208u);
                    continue;

                case 9u:
                    MoveHandler.HandleMoveSetRunSpeed(ref session, 7f);
                    arg_270_0 = (num * 4147973084u ^ 1878138665u);
                    continue;
                }
                break;
            }
            return;

IL_2B9:
            SpellHandler.activeSpell = 0;
            return;

IL_2C0:
            MoveHandler.HandleMoveSetRunSpeed(ref session, 14f);
            return;

IL_21A:
            arg_270_0 = 979607853u;
            goto IL_26B;
IL_2AA:
            SpellHandler.CastSpell(session2, num2, castId);
            arg_270_0 = 1740439945u;
            goto IL_26B;
        }
Esempio n. 17
0
        public static void HandleAddonInfo(byte[] addonData, WorldClass session, WorldClass2 session2)
        {
            PacketWriter packetWriter = new PacketWriter(ServerMessage.AddonInfo, true);

            while (true)
            {
IL_372:
                uint arg_304_0 = 1809991266u;
                while (true)
                {
                    uint num;
                    switch ((num = (arg_304_0 ^ 465668698u)) % 24u)
                    {
                    case 0u:
                    {
                        bool flag;
                        Log.Message(LogType.Debug, Module.smethod_34 <string>(1433819748u), new object[]
                            {
                                flag
                            });
                        uint num2;
                        Log.Message(LogType.Debug, Module.smethod_35 <string>(3521479446u), new object[]
                            {
                                num2
                            });
                        arg_304_0 = (num * 3803766880u ^ 310157591u);
                        continue;
                    }

                    case 1u:
                    {
                        bool    flag;
                        BitPack bitPack;
                        bitPack.Write <bool>(flag);
                        bitPack.Write <bool>(true);
                        arg_304_0 = (num * 2564976232u ^ 4098056120u);
                        continue;
                    }

                    case 2u:
                        session2.Send(ref packetWriter);
                        arg_304_0 = (num * 854072662u ^ 909947967u);
                        continue;

                    case 3u:
                        AddonHandler.smethod_0(packetWriter, AddonHandler.addonPublicKey);
                        arg_304_0 = 1787484475u;
                        continue;

                    case 4u:
                        session.Send(ref packetWriter);
                        arg_304_0 = 1721024912u;
                        continue;

                    case 5u:
                    {
                        packetWriter.WriteInt32(0);
                        int num3 = 0;
                        arg_304_0 = (num * 2826608521u ^ 4236980803u);
                        continue;
                    }

                    case 6u:
                    {
                        bool flag = true;
                        arg_304_0 = (num * 3186595720u ^ 2676385765u);
                        continue;
                    }

                    case 7u:
                    {
                        PacketReader packetReader;
                        uint         num2 = packetReader.Read <uint>();
                        arg_304_0 = (num * 4197325555u ^ 895042553u);
                        continue;
                    }

                    case 8u:
                    {
                        BitPack      bitPack      = new BitPack(packetWriter, 0uL, 0uL, 0uL, 0uL);
                        PacketReader packetReader = new PacketReader(addonData, false, true);
                        int          num4         = packetReader.Read <int>();
                        arg_304_0 = (num * 2378964428u ^ 2574027569u);
                        continue;
                    }

                    case 9u:
                        return;

                    case 11u:
                        packetWriter.WriteUInt32(0u);
                        arg_304_0 = (num * 3130896976u ^ 2394918073u);
                        continue;

                    case 12u:
                    {
                        int num3;
                        int num4;
                        arg_304_0 = ((num3 >= num4) ? 1751666612u : 1552554250u);
                        continue;
                    }

                    case 13u:
                    {
                        uint num5;
                        Log.Message(LogType.Debug, Module.smethod_35 <string>(3521479446u), new object[]
                            {
                                num5
                            });
                        packetWriter.WriteUInt8(2);
                        arg_304_0 = (num * 2886261538u ^ 754012465u);
                        continue;
                    }

                    case 14u:
                        arg_304_0 = (((session2 != null) ? 3483294810u : 2624109236u) ^ num * 2840857279u);
                        continue;

                    case 15u:
                        packetWriter.WriteUInt8(1);
                        arg_304_0 = (num * 396774567u ^ 3621888192u);
                        continue;

                    case 16u:
                    {
                        PacketReader packetReader;
                        string       text = packetReader.ReadCString();
                        bool         flag = !packetReader.Read <bool>();
                        arg_304_0 = 37866661u;
                        continue;
                    }

                    case 17u:
                    {
                        int num3;
                        num3++;
                        arg_304_0 = (num * 2650975885u ^ 450296731u);
                        continue;
                    }

                    case 18u:
                    {
                        BitPack bitPack;
                        bitPack.Write <bool>(false);
                        arg_304_0 = (num * 4029069879u ^ 4124995232u);
                        continue;
                    }

                    case 19u:
                    {
                        int num4;
                        packetWriter.WriteInt32(num4);
                        arg_304_0 = (num * 3154899402u ^ 71122105u);
                        continue;
                    }

                    case 20u:
                    {
                        BitPack bitPack;
                        bitPack.Flush();
                        bool flag;
                        arg_304_0 = ((flag ? 488058857u : 1913203301u) ^ num * 1804616717u);
                        continue;
                    }

                    case 21u:
                        goto IL_372;

                    case 22u:
                    {
                        PacketReader packetReader;
                        uint         num5 = packetReader.Read <uint>();
                        bool         flag;
                        arg_304_0 = ((flag ? 1009495839u : 1036313990u) ^ num * 1645478371u);
                        continue;
                    }

                    case 23u:
                    {
                        string text;
                        Log.Message(LogType.Debug, Module.smethod_35 <string>(877436003u), new object[]
                            {
                                text
                            });
                        arg_304_0 = 1826827818u;
                        continue;
                    }
                    }
                    goto Block_5;
                }
            }
            Block_5 :;
        }
Esempio n. 18
0
        public static void HandleQueryGameObject(ref PacketReader packet, WorldClass2 session)
        {
            new BitUnpack(packet);
            PacketWriter packetWriter;
            GameObject   gameObject;
            int          num2;

            while (true)
            {
IL_1F1:
                uint arg_1AF_0 = 939672256u;
                while (true)
                {
                    uint num;
                    switch ((num = (arg_1AF_0 ^ 920590424u)) % 13u)
                    {
                    case 0u:
                        packetWriter.WriteInt32(gameObject.Type);
                        arg_1AF_0 = (num * 3489202542u ^ 804866110u);
                        continue;

                    case 1u:
                        num2         = packet.Read <int>();
                        packetWriter = new PacketWriter(ServerMessage.QueryGameObjectResponse, true);
                        arg_1AF_0    = (num * 4230693193u ^ 1260749569u);
                        continue;

                    case 2u:
                        goto IL_1F1;

                    case 3u:
                    {
                        int num3;
                        arg_1AF_0 = ((num3 < 3) ? 649306648u : 501273771u);
                        continue;
                    }

                    case 4u:
                        packetWriter.WriteCString(gameObject.CastBarCaption);
                        arg_1AF_0 = (num * 1049916045u ^ 2977864359u);
                        continue;

                    case 5u:
                    {
                        int num3 = 0;
                        arg_1AF_0 = (num * 1422964311u ^ 1103477659u);
                        continue;
                    }

                    case 6u:
                        packetWriter.WriteInt32(gameObject.DisplayInfoId);
                        packetWriter.WriteCString(gameObject.Name);
                        arg_1AF_0 = (num * 1555460888u ^ 1306993837u);
                        continue;

                    case 7u:
                    {
                        GameObject gameObject2;
                        gameObject = gameObject2;
                        arg_1AF_0  = (num * 3863233653u ^ 3067406073u);
                        continue;
                    }

                    case 8u:
                        arg_1AF_0 = (num * 3223686670u ^ 3681640510u);
                        continue;

                    case 10u:
                        packetWriter.WriteCString(gameObject.IconName);
                        arg_1AF_0 = (num * 719648425u ^ 184840880u);
                        continue;

                    case 11u:
                    {
                        packetWriter.WriteCString("");
                        int num3;
                        num3++;
                        arg_1AF_0 = 997737950u;
                        continue;
                    }

                    case 12u:
                    {
                        BitPack    arg_69_0    = new BitPack(packetWriter, 0uL, 0uL, 0uL, 0uL);
                        GameObject gameObject2 = Manager.ObjectMgr.GameObjects.ContainsKey(num2) ? Manager.ObjectMgr.GameObjects[num2] : null;
                        bool       flag        = gameObject2 != null;
                        packetWriter.WriteInt32(num2);
                        arg_69_0.Write <bool>(flag);
                        arg_69_0.Flush();
                        packetWriter.WriteInt32(0);
                        if (flag)
                        {
                            arg_1AF_0 = 1462109909u;
                            continue;
                        }
                        goto IL_3B5;
                    }
                    }
                    goto Block_4;
                }
            }
            uint arg_390_0;
            uint data;

            while (true)
            {
IL_38B:
                uint num;
                switch ((num = (arg_390_0 ^ 920590424u)) % 6u)
                {
                case 0u:
                    arg_390_0 = (num * 1830974033u ^ 1499644793u);
                    continue;

                case 2u:
                    goto IL_376;

                case 3u:
                    session.Send(ref packetWriter);
                    arg_390_0 = 1203705223u;
                    continue;

                case 4u:
                    packetWriter.WriteUInt32Pos(data, 10);
                    arg_390_0 = (num * 267662565u ^ 3800569846u);
                    continue;

                case 5u:
                    goto IL_3B5;
                }
                break;
            }
            return;

Block_4:
            packetWriter.WriteCString(gameObject.Unk);
            using (List <int> .Enumerator enumerator = gameObject.Data.GetEnumerator())
            {
                while (true)
                {
IL_26E:
                    int arg_245_0 = (!enumerator.MoveNext()) ? 1793865676 : 1818950977;
                    while (true)
                    {
                        switch ((arg_245_0 ^ 920590424) % 4)
                        {
                        case 1:
                        {
                            int current = enumerator.Current;
                            packetWriter.WriteInt32(current);
                            arg_245_0 = 1520035619;
                            continue;
                        }

                        case 2:
                            arg_245_0 = 1818950977;
                            continue;

                        case 3:
                            goto IL_26E;
                        }
                        goto Block_9;
                    }
                }
                Block_9 :;
            }
            packetWriter.WriteFloat(gameObject.Size);
            packetWriter.WriteUInt8((byte)gameObject.QuestItemId.Count);
            using (List <int> .Enumerator enumerator = gameObject.QuestItemId.GetEnumerator())
            {
                while (true)
                {
IL_312:
                    int arg_2E9_0 = enumerator.MoveNext() ? 1696554899 : 1349067385;
                    while (true)
                    {
                        switch ((arg_2E9_0 ^ 920590424) % 4)
                        {
                        case 0:
                            goto IL_312;

                        case 2:
                            arg_2E9_0 = 1696554899;
                            continue;

                        case 3:
                        {
                            int current2 = enumerator.Current;
                            packetWriter.WriteInt32(current2);
                            arg_2E9_0 = 2058465060;
                            continue;
                        }
                        }
                        goto Block_13;
                    }
                }
                Block_13 :;
            }
            packetWriter.WriteInt32(gameObject.ExpansionRequired);
            data = (uint)CacheHandler.smethod_3(CacheHandler.smethod_2(packetWriter)) - 14u;
IL_376:
            arg_390_0 = 842632948u;
            goto IL_38B;
IL_3B5:
            Log.Message(LogType.Debug, Module.smethod_33 <string>(1557632366u), new object[]
            {
                num2
            });
            arg_390_0 = 1862001515u;
            goto IL_38B;
        }
Esempio n. 19
0
        public static void InvokeHandler(ref PacketReader reader, WorldClass2 session)
        {
            if (session.Character != null)
            {
                goto IL_1D;
            }
            goto IL_10D;
            uint arg_D2_0;

            while (true)
            {
IL_CD:
                uint num;
                switch ((num = (arg_D2_0 ^ 4276270309u)) % 8u)
                {
                case 0u:
                    goto IL_10D;

                case 1u:
                    goto IL_125;

                case 2u:
                    arg_D2_0 = (((!Manager.WorldMgr.Sessions2.ContainsKey(0uL)) ? 2237578483u : 3357433262u) ^ num * 65758199u);
                    continue;

                case 4u:
                    PacketManager.OpcodeHandlers2[reader.Opcode](ref reader, session);
                    arg_D2_0 = (num * 2035814786u ^ 254308324u);
                    continue;

                case 5u:
                    Manager.WorldMgr.Sessions2[0uL] = session;
                    arg_D2_0 = (num * 424709425u ^ 2091957032u);
                    continue;

                case 6u:
                {
                    ulong arg_32_0 = session.Character.Guid;
                    arg_D2_0 = (num * 3958291579u ^ 1546637405u);
                    continue;
                }

                case 7u:
                    goto IL_1D;
                }
                break;
            }
            goto IL_16A;
IL_125:
            Log.Message(LogType.Packet, Module.smethod_35 <string>(1352914638u), new object[]
            {
                reader.Opcode,
                reader.Opcode,
                reader.Size
            });
            return;

IL_16A:
            Log.Message(LogType.Packet, Module.smethod_36 <string>(729730053u), new object[]
            {
                reader.Opcode,
                reader.Opcode,
                reader.Size
            });
            return;

IL_1D:
            arg_D2_0 = 4043372643u;
            goto IL_CD;
IL_10D:
            arg_D2_0 = ((!PacketManager.OpcodeHandlers2.ContainsKey(reader.Opcode)) ? 2674153982u : 3059807657u);
            goto IL_CD;
        }