Beispiel #1
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;
                }
            }
        }
Beispiel #2
0
        public static void CastShit(WorldClass session)
        {
            PacketWriter packetWriter = new PacketWriter(ServerMessage.UnknownMount, true);

            while (true)
            {
IL_3CA:
                uint arg_35C_0 = 2603575655u;
                while (true)
                {
                    uint num;
                    switch ((num = (arg_35C_0 ^ 2266727687u)) % 24u)
                    {
                    case 0u:
                    {
                        PacketWriter packetWriter2;
                        byte[]       array;
                        packetWriter2.WriteBytes(array, 0);
                        arg_35C_0 = (num * 3941501788u ^ 642226778u);
                        continue;
                    }

                    case 1u:
                    {
                        byte[] array;
                        int    num2;
                        arg_35C_0 = ((num2 >= array.Length) ? 2998360569u : 4101988280u);
                        continue;
                    }

                    case 2u:
                    {
                        int num3;
                        num3++;
                        arg_35C_0 = (num * 3230039935u ^ 752066653u);
                        continue;
                    }

                    case 3u:
                    {
                        PacketWriter packetWriter2;
                        new BitPack(packetWriter2, 0uL, 0uL, 0uL, 0uL);
                        string string_ = Module.smethod_37 <string>(2746803935u);
                        byte[] array   = new byte[SpellHandler.smethod_0(string_) / 2];
                        arg_35C_0 = (num * 2650947370u ^ 869267186u);
                        continue;
                    }

                    case 4u:
                    {
                        byte[] array;
                        int    num3;
                        string string_;
                        array[num3] = SpellHandler.smethod_2(SpellHandler.smethod_1(string_, num3 * 2, 2), 16);
                        arg_35C_0   = 2513803173u;
                        continue;
                    }

                    case 5u:
                    {
                        PacketWriter packetWriter2 = new PacketWriter(ServerMessage.SpellGo, true);
                        arg_35C_0 = (num * 3385895038u ^ 3977190338u);
                        continue;
                    }

                    case 6u:
                    {
                        PacketWriter packetWriter2;
                        packetWriter2.WriteSmartGuid(session.Character.Guid, GuidType.Player);
                        packetWriter2.WriteSmartGuid(session.Character.Guid, GuidType.Player);
                        byte[] array;
                        packetWriter2.WriteBytes(array, 0);
                        packetWriter2.WriteSmartGuid(session.Character.Guid, GuidType.Player);
                        arg_35C_0 = (num * 645349454u ^ 2094935330u);
                        continue;
                    }

                    case 7u:
                        arg_35C_0 = (num * 814766979u ^ 1627543835u);
                        continue;

                    case 8u:
                        session.Send(ref packetWriter);
                        arg_35C_0 = (num * 386530094u ^ 408343786u);
                        continue;

                    case 9u:
                    {
                        byte[] array;
                        string string_;
                        int    num4;
                        array[num4] = SpellHandler.smethod_2(SpellHandler.smethod_1(string_, num4 * 2, 2), 16);
                        num4++;
                        arg_35C_0 = 2248897803u;
                        continue;
                    }

                    case 10u:
                    {
                        PacketWriter packetWriter2;
                        packetWriter2.WriteSmartGuid(session.Character.Guid, GuidType.Player);
                        arg_35C_0 = (num * 673255875u ^ 680462305u);
                        continue;
                    }

                    case 11u:
                        arg_35C_0 = (num * 1746793927u ^ 774125646u);
                        continue;

                    case 12u:
                    {
                        byte[] array;
                        int    num3;
                        arg_35C_0 = ((num3 >= array.Length) ? 2500590081u : 3815223811u);
                        continue;
                    }

                    case 13u:
                    {
                        PacketWriter packetWriter2 = new PacketWriter(ServerMessage.SpellStart, true);
                        new BitPack(packetWriter2, 0uL, 0uL, 0uL, 0uL);
                        string string_ = Module.smethod_35 <string>(1869705636u);
                        byte[] array   = new byte[SpellHandler.smethod_0(string_) / 2];
                        int    num4    = 0;
                        arg_35C_0 = (num * 3637525854u ^ 2731629069u);
                        continue;
                    }

                    case 14u:
                    {
                        byte[] array;
                        packetWriter.WriteBytes(array, 0);
                        arg_35C_0 = (num * 3176727326u ^ 1608014963u);
                        continue;
                    }

                    case 15u:
                    {
                        byte[] array;
                        int    num2;
                        string string_;
                        array[num2] = SpellHandler.smethod_2(SpellHandler.smethod_1(string_, num2 * 2, 2), 16);
                        num2++;
                        arg_35C_0 = 4222645102u;
                        continue;
                    }

                    case 16u:
                    {
                        string string_ = Module.smethod_37 <string>(1724181447u);
                        arg_35C_0 = (num * 1899220956u ^ 3503518101u);
                        continue;
                    }

                    case 17u:
                    {
                        PacketWriter packetWriter2;
                        packetWriter2.WriteUInt8(0);
                        arg_35C_0 = (num * 317972108u ^ 2094842830u);
                        continue;
                    }

                    case 18u:
                    {
                        string string_;
                        byte[] array = new byte[SpellHandler.smethod_0(string_) / 2];
                        int    num3  = 0;
                        arg_35C_0 = (num * 486794978u ^ 1577748392u);
                        continue;
                    }

                    case 19u:
                    {
                        int num2 = 0;
                        arg_35C_0 = (num * 2886695706u ^ 4258145214u);
                        continue;
                    }

                    case 20u:
                    {
                        byte[] array;
                        int    num4;
                        arg_35C_0 = ((num4 < array.Length) ? 3789216542u : 2803619793u);
                        continue;
                    }

                    case 22u:
                    {
                        PacketWriter packetWriter2;
                        packetWriter2.WriteSmartGuid(session.Character.Guid, GuidType.Player);
                        arg_35C_0 = (num * 3760716457u ^ 3787656715u);
                        continue;
                    }

                    case 23u:
                        goto IL_3CA;
                    }
                    return;
                }
            }
        }
Beispiel #3
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;
        }