public static void HandleAuctionListItems(Packet packet)
        {
            packet.ReadInt32("Offset");
            packet.ReadPackedGuid128("Auctioneer");

            packet.ReadByte("MinLevel");
            packet.ReadByte("MaxLevel");
            packet.ReadInt32("InvType");
            packet.ReadInt32("ItemClass");
            packet.ReadInt32("ItemSubclass");
            packet.ReadInt32("Quality");
            var sort = packet.ReadByte("SortCount");

            packet.ResetBitReader();

            var len = packet.ReadBits(8);
            packet.ReadWoWString("Name", len);

            packet.ReadBit("OnlyUsable");
            packet.ReadBit("ExactMatch");

            var size = packet.ReadInt32("DataSize");
            var data = packet.ReadBytes(size);
            var sorts = new Packet(data, packet.Opcode, packet.Time, packet.Direction, packet.Number, packet.Writer, packet.FileName);
            for (var i = 0; i < sort; ++i)
            {
                sorts.ReadByte("UnkByte1", i);
                sorts.ReadByte("UnkByte2", i);
            }
        }
        public static void HandlePetNameQueryResponse(Packet packet)
        {
            var hasData = packet.ReadBit();
            if (!hasData)
            {
                packet.ReadUInt64("Pet number");
                return;
            }

            packet.ReadBit("Declined");

            const int maxDeclinedNameCases = 5;
            var declinedNameLen = new int[maxDeclinedNameCases];
            for (var i = 0; i < maxDeclinedNameCases; ++i)
                declinedNameLen[i] = (int)packet.ReadBits(7);

            var len = packet.ReadBits(8);

            for (var i = 0; i < maxDeclinedNameCases; ++i)
                if (declinedNameLen[i] != 0)
                    packet.ReadWoWString("Declined name", declinedNameLen[i], i);

            var petName = packet.ReadWoWString("Pet name", len);
            packet.ReadTime("Time");
            var number = packet.ReadUInt64("Pet number");

            var guidArray = (from pair in StoreGetters.NameDict where Equals(pair.Value, number) select pair.Key).ToList();
            foreach (var guid in guidArray)
                StoreGetters.NameDict[guid] = petName;
        }
        public static void HandleDestroyObject(Packet packet)
        {
            if (packet.Direction == Direction.ServerToClient)
            {
                var guid = new byte[8];

                guid[3] = packet.ReadBit();
                guid[2] = packet.ReadBit();
                guid[4] = packet.ReadBit();
                guid[1] = packet.ReadBit();

                packet.ReadBit("Despawn Animation");

                guid[7] = packet.ReadBit();
                guid[0] = packet.ReadBit();
                guid[6] = packet.ReadBit();
                guid[5] = packet.ReadBit();

                packet.ParseBitStream(guid, 0, 4, 7, 2, 6, 3, 1, 5);

                packet.WriteGuid("Object Guid", guid);
            }
            else
            {
                packet.WriteLine("              : CMSG_PVP_LOG_DATA");
            }
        }
        public static void HandleGuildQueryResponse(Packet packet)
        {
            var guid = new byte[8];
            var guid2 = new byte[8];

            var len = new uint[255];
            var count = 0u;
            var len2 = 0u;

            guid[5] = packet.ReadBit();
            var unk16 = packet.ReadBit("unk16");
            if (unk16)
            {
                count = packet.ReadBits("cnt", 21);
                guid2[5] = packet.ReadBit();
                guid2[1] = packet.ReadBit();
                guid2[4] = packet.ReadBit();
                guid2[7] = packet.ReadBit();
                for (var i = 0; i < count; i++)
                {
                    len[i] = packet.ReadBits(7);
                }
                guid2[3] = packet.ReadBit();
                guid2[2] = packet.ReadBit();
                guid2[0] = packet.ReadBit();
                guid2[6] = packet.ReadBit();

                len2 = packet.ReadBits("unk36", 7);
            }
            guid[3] = packet.ReadBit();
            guid[7] = packet.ReadBit();
            guid[2] = packet.ReadBit();
            guid[1] = packet.ReadBit();
            guid[0] = packet.ReadBit();
            guid[4] = packet.ReadBit();
            guid[6] = packet.ReadBit();
            if (unk16)
            {
                packet.ReadInt32("unk160");
                packet.ReadInt32("unk152");
                packet.ParseBitStream(guid2, 2, 7);
                packet.ReadInt32("unk156");
                packet.ReadInt32("unk32");
                for (var i = 0; i < count; i++)
                {
                    packet.ReadInt32("unk144", i);
                    packet.ReadInt32("unk140", i);
                    packet.ReadWoWString("str", len[i], i);
                }
                packet.ReadWoWString("str", len2);
                packet.ReadInt32("unk168");
                packet.ParseBitStream(guid2, 5, 4);
                packet.ReadInt32("unk164");
                packet.ParseBitStream(guid2, 1, 6, 0, 3);
                packet.WriteGuid("Guid2", guid2);
            }
            packet.ParseBitStream(guid, 2, 6, 4, 0, 7, 3, 5, 1);

            packet.WriteGuid("Guid", guid);
        }
Example #5
0
        public static void HandleGroupInvite(Packet packet)
        {
            var crossRealmGuid = new byte[8];

            packet.ReadInt32("Int114");
            packet.ReadInt32("Int128");
            packet.ReadByte("Byte118");
            crossRealmGuid[5] = packet.ReadBit();
            var bits12C = packet.ReadBits(9);
            crossRealmGuid[2] = packet.ReadBit();
            crossRealmGuid[1] = packet.ReadBit();
            crossRealmGuid[7] = packet.ReadBit();
            crossRealmGuid[4] = packet.ReadBit();
            crossRealmGuid[3] = packet.ReadBit();
            var bits10 = packet.ReadBits(9);
            crossRealmGuid[0] = packet.ReadBit();
            crossRealmGuid[6] = packet.ReadBit();
            packet.ReadXORByte(crossRealmGuid, 0);
            packet.ReadXORByte(crossRealmGuid, 4);
            packet.ReadWoWString("string12C", bits10);
            packet.ReadXORByte(crossRealmGuid, 5);
            packet.ReadXORByte(crossRealmGuid, 6);
            packet.ReadWoWString("string10", bits12C);
            packet.ReadXORByte(crossRealmGuid, 1);
            packet.ReadXORByte(crossRealmGuid, 7);
            packet.ReadXORByte(crossRealmGuid, 3);
            packet.ReadXORByte(crossRealmGuid, 2);

            packet.WriteGuid("crossRealmGuid", crossRealmGuid);
        }
        public static void HandleAuthResponse434(Packet packet)
        {
            var isQueued = packet.ReadBit();
            var hasAccountInfo = packet.ReadBit();

            if (isQueued)
            {
                var unkByte = packet.ReadByte();
                packet.WriteLine("Unk Byte: " + unkByte);

                var position = packet.ReadInt32();
                packet.WriteLine("Queue Position: " + position);

            }
            if (hasAccountInfo)
            {
                packet.ReadInt32("Billing Time Remaining");
                packet.ReadEnum<ClientType>("Account Expansion", TypeCode.Byte);
                packet.ReadInt32("Unknown UInt32");
                packet.ReadEnum<ClientType>("Player Expansion", TypeCode.Byte);
                packet.ReadInt32("Billing Time Rested");
                packet.ReadEnum<BillingFlag>("Billing Flags", TypeCode.Byte);
            }

            var code = (ResponseCode)packet.ReadByte();
            packet.WriteLine("Auth Code: " + code);
        }
        public static void HandleLootResponse(Packet packet)
        {
            packet.ReadPackedGuid128("Owner");
            packet.ReadPackedGuid128("LootObj");
            packet.ReadByteE<LootError>("FailureReason");
            packet.ReadByteE<LootType>("AcquireReason");
            packet.ReadByteE<LootMethod>("LootMethod");
            packet.ReadByteE<ItemQuality>("Threshold");

            packet.ReadUInt32("Coins");

            var itemCount = packet.ReadUInt32("ItemCount");
            var currencyCount = packet.ReadUInt32("CurrencyCount");

            packet.ResetBitReader();

            packet.ReadBit("Acquired");
            packet.ReadBit("AELooting");
            packet.ReadBit("PersonalLooting");

            for (var i = 0; i < itemCount; ++i)
                ReadLootItem(packet, i, "LootItem");

            for (var i = 0; i < currencyCount; ++i)
                V6_0_2_19033.Parsers.LootHandler.ReadCurrenciesData(packet, i, "Currencies");
        }
        public static void HandleInitCurrency(Packet packet)
        {
            var count = packet.ReadInt32("SetupCurrencyRecord");

            // ClientSetupCurrencyRecord
            for (var i = 0; i < count; ++i)
            {
                packet.ReadUInt32("Type", i);
                packet.ReadUInt32("Quantity", i);

                var hasWeeklyQuantity = packet.ReadBit();
                var hasMaxWeeklyQuantity = packet.ReadBit();
                var hasTrackedQuantity = packet.ReadBit();
                packet.ReadBits("Flags", 5, i);

                if (hasWeeklyQuantity)
                    packet.ReadUInt32("WeeklyQuantity", i);

                if (hasMaxWeeklyQuantity)
                    packet.ReadUInt32("MaxWeeklyQuantity", i);

                if (hasTrackedQuantity)
                    packet.ReadUInt32("TrackedQuantity", i);
            }
        }
Example #9
0
 public static void HandleTradeStatus(Packet packet)
 {
     packet.ReadBit("Unk Bit");
     var status = packet.ReadEnum<TradeStatus530>("Status", 5);
     switch (status)
     {
         case TradeStatus530.BeginTrade:
             var guid = packet.StartBitStream(0, 3, 2, 4, 1, 6, 7, 5);
             packet.ParseBitStream(guid, 5, 7, 3, 6, 4, 2, 0, 1);
             packet.WriteGuid("GUID", guid);
             break;
         case TradeStatus530.CloseWindow:
             packet.ReadBit("Unk Bit");
             packet.ReadInt32("Unk Int32");
             packet.ReadInt32("Unk Int32");
             break;
         case TradeStatus530.TradeCurrency:
         case TradeStatus530.CurrencyNotTradable:
             packet.ReadInt32("Unk Int32 1");
             packet.ReadInt32("Unk Int32 2");
             break;
         case TradeStatus530.NotEligible:
         case TradeStatus530.OnlyConjured:
             packet.ReadByte("Unk Byte");
             break;
         case TradeStatus530.OpenWindow:
             packet.ReadInt32("Trade Id");
             break;
     }
 }
        public static void HandleServerAddonInfo547(Packet packet)
        {
            var AddonsCount = packet.ReadBits("Addons Count", 23);
            uint[,] AddonsInfo = new uint[AddonsCount, 4];

            for (var i = 0; i < AddonsCount; ++i)
            {
                AddonsInfo[i, 0] = packet.ReadBit("Use CRC", i);
                AddonsInfo[i, 2] = packet.ReadBit("Has URL", i);
                AddonsInfo[i, 1] = packet.ReadBit("Has Public Key", i);
                if (AddonsInfo[i, 2] == 1)
                {
                    AddonsInfo[i, 3] = packet.ReadBits(8);
                }
                else
                {
                    AddonsInfo[i, 3] = 0;
                }
            }

            var BannedAddonsCount = packet.ReadBits("Banned Addons Count",18);

            for (var i = 0; i < AddonsCount; ++i)
            {
                if (AddonsInfo[i, 1] == 1)
                {
                    packet.ReadBytes(256);
                    // the bytes order isn't 1,2,3,4.. they are mangled
                }

                if (AddonsInfo[i, 0] == 1)
                {
                    packet.ReadUInt32("CRC Summ", i);
                    packet.ReadByte("Unk Byte1", i);
                }

                packet.ReadByte("Addon State", i);

                if (AddonsInfo[i, 2] == 1 && AddonsInfo[i, 3] > 0)
                {
                    packet.ReadWoWString("URL path", AddonsInfo[i, 3], i);
                }
            }

            for (var i = 0; i < BannedAddonsCount; ++i)
            {
                var NameMD5 = new byte[16];
                var VersionMD5 = new byte[16];

                for (uint j = 0; j < 16; j += 4)
                {
                    Array.Copy(packet.ReadBytes(4), 0, NameMD5, j, 4);
                    Array.Copy(packet.ReadBytes(4), 0, VersionMD5, j, 4);
                }

                packet.ReadUInt32("ID", i);
                packet.ReadUInt32("Timestamp", i);
                packet.ReadUInt32("Banned", i);
            }
        }
Example #11
0
        public static void HandleLootMasterList(Packet packet)
        {
            var guid = new byte[8];
            guid[1] = packet.ReadBit();
            var count = packet.ReadBits("count", 24);
            var guids = new byte[count][];
            guid[5] = packet.ReadBit();
            for (var i = 0; i < count; i++)
                guids[i] = packet.StartBitStream(4, 1, 2, 5, 3, 7, 0, 6);
            guid[2] = packet.ReadBit();
            guid[0] = packet.ReadBit();
            guid[6] = packet.ReadBit();
            guid[7] = packet.ReadBit();
            guid[3] = packet.ReadBit();
            guid[4] = packet.ReadBit();

            packet.ParseBitStream(guid, 3, 0, 2);

            for (var i = 0; i < count; i++)
            {
                packet.ParseBitStream(guids[i], 1, 3, 7, 2, 0, 6, 4, 5);
                packet.WriteGuid("guids", guids[i]);
            }
            packet.ParseBitStream(guid, 7, 1, 6, 4, 5);
            packet.WriteGuid("Guid", guid);
        }
Example #12
0
        public static void HandleLootList(Packet packet)
        {
            var guid48 = new byte[8];
            guid48[5] = packet.ReadBit();
            var unk24 = packet.ReadBit("unk24"); // 24
            var guid16 = new byte[8];
            if (unk24)
                guid16 = packet.StartBitStream(4, 6, 0, 7, 5, 2, 3, 1);
            guid48[1] = packet.ReadBit();
            var unk40 = packet.ReadBit("unk40"); // 40
            guid48[4] = packet.ReadBit();
            guid48[3] = packet.ReadBit();
            guid48[2] = packet.ReadBit();
            var guid32 = new byte[8];
            if (unk40)
                guid32 = packet.StartBitStream(2, 3, 4, 5, 6, 0, 1, 7);
            guid48[7] = packet.ReadBit();
            guid48[0] = packet.ReadBit();
            guid48[6] = packet.ReadBit();
            if (unk40)
            {
                packet.ParseBitStream(guid32, 7, 1, 0, 6, 5, 3, 4, 2);
                packet.WriteGuid("guid32", guid32);
            }
            if (unk24)
            {
                packet.ParseBitStream(guid16, 4, 5, 6, 3, 2, 7, 0, 1);
                packet.WriteGuid("guid16", guid16);
            }
            packet.ParseBitStream(guid48, 5, 1, 6, 2, 3, 0, 7, 4);

            packet.WriteGuid("guid48", guid48);
        }
Example #13
0
        public static void HandleItemPushResult(Packet packet)
        {
            packet.ReadPackedGuid128("PlayerGUID");

            packet.ReadByte("Slot");

            packet.ReadInt32("SlotInBag");

            packet.ReadUInt32("QuestLogItemID");
            packet.ReadUInt32("Quantity");
            packet.ReadUInt32("QuantityInInventory");
            packet.ReadInt32("DungeonEncounterID");

            packet.ReadUInt32("BattlePetBreedID");
            packet.ReadUInt32("BattlePetBreedQuality");
            packet.ReadUInt32("BattlePetSpeciesID");
            packet.ReadUInt32("BattlePetLevel");

            packet.ReadPackedGuid128("ItemGUID");

            packet.ResetBitReader();

            packet.ReadBit("Pushed");
            packet.ReadBit("Created");
            packet.ReadBits("DisplayText", 3);
            packet.ReadBit("IsBonusRoll");
            packet.ReadBit("IsEncounterLoot");

            V6_0_2_19033.Parsers.ItemHandler.ReadItemInstance(packet, "ItemInstance");
        }
Example #14
0
        public static void HandleMailQueryNextTimeResult60x(Packet packet)
        {
            packet.ReadSingle("NextMailTime");

            var int5 = packet.ReadInt32("NextCount");

            for (int i = 0; i < int5; i++)
            {
                packet.ReadPackedGuid128("SenderGUID", i);

                // PlayerGuidLookupHint
                packet.ResetBitReader();

                var bit4 = packet.ReadBit("HasVirtualRealmAddress", i);
                var bit12 = packet.ReadBit("HasNativeRealmAddress", i);

                if (bit4)
                    packet.ReadInt32("VirtualRealmAddress", i);

                if (bit12)
                    packet.ReadInt32("NativeRealmAddress", i);

                packet.ReadSingle("TimeLeft", i);
                packet.ReadInt32("AltSenderID", i);
                packet.ReadByte("AltSenderType", i);
                packet.ReadInt32("StationeryID", i);
            }
        }
        public static void ReadClientBattlePet(Packet packet, params object[] idx)
        {
            packet.ReadPackedGuid128("BattlePetGUID", idx);

            packet.ReadInt32("SpeciesID", idx);
            packet.ReadInt32("DisplayID", idx);
            packet.ReadInt32("CollarID", idx);

            packet.ReadInt16("BreedID", idx);
            packet.ReadInt16("Level", idx);
            packet.ReadInt16("Xp", idx);
            packet.ReadInt16("BattlePetDBFlags", idx);

            packet.ReadInt32("Power", idx);
            packet.ReadInt32("Health", idx);
            packet.ReadInt32("MaxHealth", idx);
            packet.ReadInt32("Speed", idx);

            packet.ReadByte("BreedQuality", idx);

            packet.ResetBitReader();

            var customNameLength = packet.ReadBits(7);
            var hasOwnerInfo = packet.ReadBit("HasOwnerInfo", idx);
            packet.ReadBit("NoRename", idx);

            packet.ReadWoWString("CustomName", customNameLength, idx);

            if (hasOwnerInfo)
                V6_0_2_19033.Parsers.BattlePetHandler.ReadClientBattlePetOwnerInfo(packet, "OwnerInfo", idx);
        }
        public static void HandleVoidItemSwapResponse(Packet packet)
        {
            packet.ReadBit("Has Src Item id (Inv)");

            byte[] itemId2 = packet.StartBitStream(4, 1, 6, 0, 3, 7, 2, 5);

            packet.ReadBit("Has Dest Item id (Inv)");

            byte[] itemId1 = itemId1 = packet.StartBitStream(6, 0, 3, 2, 1, 5, 7, 4);

            var usedSrcSlot = !packet.ReadBit("Used Src Slot (Inv)"); // always set?
            var usedDestSlot = !packet.ReadBit("Used Dest Slot (Inv)");

            packet.ParseBitStream(itemId1, 3, 7, 2, 5, 0, 1, 4, 6);
            packet.WriteGuid("Dest Item Id", itemId1);

            packet.ParseBitStream(itemId2, 0, 2, 7, 5, 6, 4, 3, 1);
            packet.WriteGuid("Src Item Id", itemId2);

            if (usedSrcSlot)
                packet.ReadInt32("New Slot for Src Item");

            if (usedDestSlot)
                packet.ReadInt32("New Slot for Dest Item");
        }
        public static void HandleGOCustomAnim(Packet packet)
        {
            var guid = new byte[8];

            guid[0] = packet.ReadBit();
            guid[6] = packet.ReadBit();
            var hasAnim = !packet.ReadBit();
            guid[4] = packet.ReadBit();
            guid[1] = packet.ReadBit();
            guid[7] = packet.ReadBit();
            guid[5] = packet.ReadBit();
            var bit20 = packet.ReadBit();
            guid[3] = packet.ReadBit();
            guid[2] = packet.ReadBit();
            packet.ReadXORByte(guid, 1);
            if (hasAnim)
                packet.ReadInt32("Anim");
            packet.ReadXORByte(guid, 6);
            packet.ReadXORByte(guid, 7);
            packet.ReadXORByte(guid, 5);
            packet.ReadXORByte(guid, 4);
            packet.ReadXORByte(guid, 3);
            packet.ReadXORByte(guid, 0);
            packet.ReadXORByte(guid, 2);

            packet.WriteGuid("Guid", guid);
        }
        public static void HandleSpellHealLog(Packet packet)
        {
            packet.ReadPackedGuid128("TargetGUID");
            packet.ReadPackedGuid128("CasterGUID");

            packet.ReadInt32<SpellId>("SpellID");
            packet.ReadInt32("Health");
            packet.ReadInt32("OverHeal");
            packet.ReadInt32("Absorbed");

            packet.ResetBitReader();

            packet.ReadBit("Crit");
            var hasCritRollMade = packet.ReadBit("HasCritRollMade");
            var hasCritRollNeeded = packet.ReadBit("HasCritRollNeeded");
            var hasLogData = packet.ReadBit("HasLogData");
            var hasSandboxScaling = packet.ReadBit("HasLogData");

            if (hasCritRollMade)
                packet.ReadSingle("CritRollMade");

            if (hasCritRollNeeded)
                packet.ReadSingle("CritRollNeeded");

            if (hasLogData)
                SpellHandler.ReadSpellCastLogData(packet);

            if (hasSandboxScaling)
                ReadSandboxScalingData(packet, "SandboxScalingData");
        }
Example #19
0
        public static void HandleTradeStatus(Packet packet)
        {
            packet.ReadBit("FailureForYou");

            var status = packet.ReadBits("Status", 5);

            if (status == 13)
                packet.ReadBit("PartnerIsSameBnetAccount");

            if (status == 13)
            {
                packet.ReadInt32("CurrencyType");
                packet.ReadInt32("CurrencyQuantity");
            }

            if (status == 31)
                packet.ReadInt32("ID");

            if (status == 4)
            {
                packet.ReadPackedGuid128("PartnerGuid");
                packet.ReadPackedGuid128("PartnerWowAccount");
            }

            if (status == 1 || status == 0)
                packet.ReadByte("TradeSlot");

            if (status == 8 || status == 21)
            {
                packet.ReadInt32("BagResult");
                packet.ReadInt32("ItemID");
            }
        }
        public static void HandleFeatureSystemStatus434(Packet packet)
        {
            packet.ReadByte("Complain System Status");
            packet.ReadInt32("Scroll of Resurrections Remaining");
            packet.ReadInt32("Scroll of Resurrections Per Day");
            packet.ReadInt32("Unused Int32");
            packet.ReadInt32("Unused Int32");
            packet.ReadBit("HasTravelPass");
            var parentalControl = packet.ReadBit("ParentalControl");
            packet.ReadBit("InGameShop");
            packet.ReadBit("RecruitAFrend");
            var feedback = packet.ReadBit("FeedbackSystem");
            packet.ReadBit("unk1");
            packet.ReadBit("IsVoiceChatAllowedByServer");
            packet.ReadBit("InGameShopStatus");
            packet.ReadBit("Scroll of Resurrection Enabled");
            packet.ReadBit("InGameShopParentalControl");

            if (feedback)
            {
                packet.ReadInt32("Unk5");
                packet.ReadInt32("Unk6");
                packet.ReadInt32("Unk7");
                packet.ReadInt32("Unk8");
            }

            if (parentalControl)
            {
                packet.ReadInt32("Unk9");
                packet.ReadInt32("Unk10");
                packet.ReadInt32("Unk11");
            }
        }
Example #21
0
        public static void HandleItemEnchantTimeUpdate(Packet packet)
        {
            var itemGuid = new byte[8];
            var playerGuid = new byte[8];
            packet.StartBitStream(itemGuid, 2, 4);
            playerGuid[4] = packet.ReadBit();
            itemGuid[5] = packet.ReadBit();
            packet.StartBitStream(playerGuid, 3, 5);
            packet.StartBitStream(itemGuid, 7, 0, 6);
            packet.StartBitStream(playerGuid, 6, 2, 0, 1);
            itemGuid[1] = packet.ReadBit();
            playerGuid[7] = packet.ReadBit();
            itemGuid[3] = packet.ReadBit();
            packet.ResetBitReader();

            packet.ReadXORBytes(playerGuid, 1, 7);
            packet.ReadXORBytes(itemGuid, 4, 7);
            packet.ReadXORByte(playerGuid, 5);
            packet.ReadXORBytes(itemGuid, 1, 2);
            packet.ReadXORBytes(playerGuid, 4, 2, 0);
            packet.ReadXORBytes(itemGuid, 0, 5);
            packet.ReadUInt32("Duration");
            packet.ReadUInt32("Slot");
            packet.ReadXORByte(playerGuid, 3);
            packet.ReadXORBytes(itemGuid, 3, 6);
            packet.ReadXORByte(playerGuid, 6);

            packet.WriteGuid("Player GUID", playerGuid);
            packet.WriteGuid("Item GUID", itemGuid);
        }
        public static void HandleClientAreaTrigger(Packet packet)
        {
            var entry = packet.ReadEntry("Area Trigger Id");
            packet.ReadBit("Unk bit1");
            packet.ReadBit("Unk bit2");

            packet.AddSniffData(StoreNameType.AreaTrigger, entry.Key, "AREATRIGGER");
        }
Example #23
0
 public static void HandleGroupInviteResponse(Packet packet)
 {
     packet.ReadByte("Byte11");
     var bit18 = packet.ReadBit();
     packet.ReadBit("Accept");
     if (bit18)
         packet.ReadInt32("Int14");
 }
 public static void HandleDestroyObject(Packet packet)
 {
     var guid = new byte[8];
     guid[4] = packet.ReadBit();
     packet.ReadBit("Despawn Animation");
     packet.StartBitStream(guid, 0, 1, 6, 2, 5, 7, 3);
     packet.ParseBitStream(guid, 7, 1, 2, 5, 0, 3, 6, 4);
     packet.WriteGuid("GUID", guid);
 }
Example #25
0
        public static void HandleServerAddonsList(Packet packet)
        {
            var bits20 = (int)packet.ReadBits(23);

            var bit3 = new bool[bits20];
            var usePublicKey = new bool[bits20];
            var bits0 = new uint[bits20];
            var bit1 = new bool[bits20];

            for (var i = 0; i < bits20; i++)
            {
                bit3[i] = packet.ReadBit();
                usePublicKey[i] = packet.ReadBit();

                if (bit3[i])
                    bits0[i] = packet.ReadBits(8);

                bit1[i] = packet.ReadBit();
            }

            var bits10 = (int)packet.ReadBits(18);

            for (var i = 0; i < bits20; i++)
            {
                if (bit3[i])
                    packet.ReadWoWString("Addon URL File", bits0[i], i);

                if (usePublicKey[i])
                {
                    var pubKey = packet.ReadBytes(256);
                    packet.WriteLine("[{0}] Name MD5: {1}", i, Utilities.ByteArrayToHexString(pubKey));
                }

                if (bit1[i])
                {
                    packet.ReadByte("Byte24", i);
                    packet.ReadInt32("Int24", i);
                }

                packet.ReadByte("Addon State", i);
            }

            for (var i = 0; i < bits10; i++)
            {
                packet.ReadInt32("Int14", i);
                packet.ReadInt32("IntED", i);

                for (var j = 0; j < 4; j++)
                {
                    packet.ReadInt32("IntED", i, j);
                    packet.ReadInt32("Int14", i, j);
                }

                packet.ReadInt32("IntED", i);
            }
        }
        public static void HandlePetBattleSlotUpdates(Packet packet)
        {
            var petBattleSlotCount = packet.ReadInt32("PetBattleSlotCount");

            packet.ReadBit("NewSlotUnlocked");
            packet.ReadBit("AutoSlotted");

            for (int i = 0; i < petBattleSlotCount; i++)
                V6_0_2_19033.Parsers.BattlePetHandler.ReadClientPetBattleSlot(packet, i, "PetBattleSlot");
        }
        public static void HandleRaidInstanceMessage(Packet packet)
        {
            packet.ReadByte("Type");

            packet.ReadUInt32<MapId>("MapID");
            packet.ReadUInt32("DifficultyID");

            packet.ReadBit("Locked");
            packet.ReadBit("Extended");
        }
Example #28
0
        public static void HandleChannelList(Packet packet)
        {
            packet.ReadUInt32("Flags");
            packet.ReadBit();
            packet.ReadBits(7);
            packet.ReadBit();
            var length = packet.ReadBits(7);

            packet.ReadWoWString("Channel Name", length);
        }
 public static void HandleChannelJoin(Packet packet)
 {
     packet.ReadInt32("Channel Id");
     var passwordLength = packet.ReadBits(7);
     packet.ReadBit("Joined by zone update");
     var channelLength = packet.ReadBits(7);
     packet.ReadBit("Has Voice");
     packet.ReadWoWString("Channel Pass", passwordLength);
     packet.ReadWoWString("Channel Name", channelLength);
 }
        public static void HandleBattleFinalRound(Packet packet)
        {
            var bits14 = 0;
            bits14 = (int)packet.ReadBits(20);

            var bit1 = new bool[bits14];
            var bit2 = new bool[bits14];
            var bit3 = new bool[bits14];
            var bit4 = new bool[bits14];
            var bit6 = new bool[bits14];
            var bit10 = new bool[bits14];
            var battleAbandon = false;
            var bit24 = false;
            var bitEB = new bool[bits14];

            for (var i = 0; i < 2; ++i) // for win/lose
            {
                bit24 = packet.ReadBit("Win/Lose", i);
            }

            for (var i = 0; i < bits14; ++i)
            {
                bit3[i] = packet.ReadBit();
                bit1[i] = packet.ReadBit();
                bit2[i] = packet.ReadBit();
                bitEB[i] = packet.ReadBit();
                bit4[i] = !packet.ReadBit("unk4", i);
                bit6[i] = !packet.ReadBit("unk6", i);
                bit10[i] = !packet.ReadBit("unk10", i);
            }

            var bit11 = packet.ReadBit();
            battleAbandon = packet.ReadBit("battleAbandon");

            for (var i = 0; i < 2; ++i)
            {
                packet.ReadInt32("Int28", i);
            }

            for (var i = 0; i < bits14; ++i)
            {
                packet.ReadByte("Slot", i);

                if (bit4[i])
                    packet.ReadInt16("Level after fight", i);
                if (bit6[i])
                    packet.ReadInt16("Experience", i);

                packet.ReadInt32("Health after fight", i);
                packet.ReadInt32("Health", i);

                if (bit10[i])
                    packet.ReadInt16("Level before fight", i);
            }
        }