Esempio n. 1
0
        public static void HandleLfgCompletionReward(Packet packet)
        {
            packet.ReadLfgEntry("Random LFG Entry");
            packet.ReadLfgEntry("Actual LFG Entry");

            ReadLfgRewardBlock(ref packet);
        }
Esempio n. 2
0
        public static void HandleLfgCompletionReward434(Packet packet)
        {
            packet.ReadLfgEntry("Random LFG Entry");
            packet.ReadLfgEntry("Actual LFG Entry");
            packet.ReadUInt32("Base Money");
            packet.ReadUInt32("Base XP");

            var numFields = packet.ReadByte("Reward Item Count");
            for (var i = 0; i < numFields; i++)
            {
                packet.ReadInt32<ItemId>("Reward Item Or Currency Id", i);
                packet.ReadInt32("Reward Item Display ID", i);
                packet.ReadInt32("Reward Item Stack Count", i);
                packet.ReadBool("Is Currency", i);
            }
        }
Esempio n. 3
0
        public static void HandleLfgJoin(Packet packet)
        {
            packet.ReadEnum<LfgRoleFlag>("Roles", TypeCode.Int32);
            packet.ReadBytes(2); // always 0
            var numFields = packet.ReadByte("Join Dungeon Count");
            for (var i = 0; i < numFields; i++)
                packet.ReadLfgEntry("Dungeon Entry", i);

            packet.ReadUInt32(); // always 0 (for 1..3) 0
            packet.ReadCString("Comment");
        }
Esempio n. 4
0
        public static void HandleGroupList(Packet packet)
        {
            var grouptype = packet.ReadEnum<GroupTypeFlag>("Group Type", TypeCode.Byte);
            packet.ReadByte("Sub Group");
            packet.ReadEnum<GroupUpdateFlag>("Flags", TypeCode.Byte);
            packet.ReadByte("Player's Role");

            if (grouptype.HasAnyFlag(GroupTypeFlag.LookingForDungeon))
            {
                packet.ReadEnum<InstanceStatus>("Group Type Status", TypeCode.Byte);
                packet.ReadLfgEntry("LFG Entry");
                if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_2_2_14545))
                    packet.ReadBoolean("Unk bool");
            }

            packet.ReadGuid("Group GUID");

            if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_3_0_10958))
                packet.ReadInt32("Counter");

            var numFields = packet.ReadInt32("Member Count");
            for (var i = 0; i < numFields; i++)
            {
                packet.ReadCString("[" + i + "] Name");
                packet.ReadGuid("[" + i + "] GUID");
                packet.ReadEnum<GroupMemberStatusFlag>("[" + i + "] Status", TypeCode.Byte);
                packet.ReadByte("[" + i + "] Sub Group");
                packet.ReadEnum<GroupUpdateFlag>("[" + i + "] Update Flags", TypeCode.Byte);

                if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_3_0_10958))
                    packet.ReadEnum<LfgRoleFlag>("[" + i + "] Role", TypeCode.Byte);
            }

            packet.ReadGuid("Leader GUID");

            if (numFields <= 0)
                return;

            packet.ReadEnum<LootMethod>("Loot Method", TypeCode.Byte);
            packet.ReadGuid("Looter GUID");
            packet.ReadEnum<ItemQuality>("Loot Threshold", TypeCode.Byte);

            if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_2_0_10192))
                packet.ReadEnum<MapDifficulty>("Dungeon Difficulty", TypeCode.Byte);

            packet.ReadEnum<MapDifficulty>("Raid Difficulty", TypeCode.Byte);

            if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_3_0_10958) &&
                ClientVersion.RemovedInVersion(ClientVersionBuild.V4_2_2_14545)) // Removed somewhere between wotlk and cataclysm
                packet.ReadByte("Unk Byte"); // Has something to do with difficulty too
        }
Esempio n. 5
0
        public static void HandleGroupList(Packet packet)
        {
            var grouptype = packet.ReadEnum<GroupTypeFlag>("Group Type", TypeCode.Byte);
            packet.ReadByte("Sub Group");
            packet.ReadEnum<GroupUpdateFlag>("Flags", TypeCode.Byte);
            packet.ReadByte("Player's Role");

            if (grouptype.HasAnyFlag(GroupTypeFlag.LookingForDungeon))
            {
                packet.ReadEnum<InstanceStatus>("Group Type Status", TypeCode.Byte);
                packet.ReadLfgEntry("LFG Entry");
            }

            packet.ReadGuid("Group GUID");
            packet.ReadInt32("Counter");
            var numFields = packet.ReadInt32("Member Count");

            for (var i = 0; i < numFields; i++)
            {
                packet.ReadCString("[" + i + "] Name");
                packet.ReadGuid("[" + i + "] GUID");
                packet.ReadEnum<GroupMemberStatusFlag>("[" + i + "] Status", TypeCode.Byte);
                packet.ReadByte("[" + i + "] Sub Group");
                packet.ReadEnum<GroupUpdateFlag>("[" + i + "] Update Flags", TypeCode.Byte);
                packet.ReadEnum<LfgRoleFlag>("[" + i + "] Role", TypeCode.Byte);
            }

            packet.ReadGuid("Leader GUID");

            if (numFields <= 0)
                return;

            packet.ReadEnum<LootMethod>("Loot Method", TypeCode.Byte);
            packet.ReadGuid("Looter GUID");
            packet.ReadEnum<ItemQuality>("Loot Threshold", TypeCode.Byte);
            packet.ReadEnum<MapDifficulty>("Dungeon Difficulty", TypeCode.Byte);
            packet.ReadEnum<MapDifficulty>("Raid Difficulty", TypeCode.Byte);
            packet.ReadByte("Unk Byte");
        }
Esempio n. 6
0
 public static void HandleLfgQueueStatusUpdate(Packet packet)
 {
     packet.ReadLfgEntry("LFG Entry");
     packet.ReadInt32("Average Wait Time");
     packet.ReadInt32("Wait Time");
     packet.ReadInt32("Wait Tanks");
     packet.ReadInt32("Wait Headers");
     packet.ReadInt32("Wait DPS");
     packet.ReadByte("Number of Tanks Needed");
     packet.ReadByte("Number of Healers Needed");
     packet.ReadByte("Number of Damage Dealers Needed");
     packet.ReadInt32("Queued Time");
 }
Esempio n. 7
0
 public static void ReadDungeonJoinResults(ref Packet packet, params int[] values)
 {
     packet.ReadLfgEntry("LFG Entry", values);
     packet.ReadEnum<LfgEntryCheckResult>("Entry Check Result", TypeCode.UInt32, values);
     if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_0_6a_13623))
     {
         packet.ReadInt32("needed ILvL", values);
         packet.ReadInt32("player ILvL", values);
     }
 }
Esempio n. 8
0
 public static void HandleLfgSearch(Packet packet)
 {
     packet.ReadLfgEntry("LFG Entry");
 }
Esempio n. 9
0
        public static void HandleLfgUpdatePlayer(Packet packet)
        {
            packet.ReadEnum<LfgUpdateType>("Update Type", TypeCode.Byte);
            var extraInfo = packet.ReadBoolean("Extra Info");
            if (!extraInfo)
                return;

            packet.ReadBoolean("Queued");
            packet.ReadBytes(2); // always 0
            var numFields2 = packet.ReadByte("Slot Count");
            for (var i = 0; i < numFields2; i++)
                packet.ReadLfgEntry("LFG Entry", i);

            packet.ReadCString("Comment");
        }
Esempio n. 10
0
        public static void HandleLfgProposalUpdate434(Packet packet)
        {
            packet.ReadTime("Date");
            packet.ReadInt32("Bosses Killed Mask");
            packet.ReadInt32("Unk UInt32 1");
            packet.ReadUInt32("Unk UInt32 2");
            packet.ReadLfgEntry("LFG Entry");
            packet.ReadUInt32("Unk UInt32 3");
            packet.ReadByteE<LfgProposalState>("State");

            var guid1 = new byte[8];
            var guid2 = new byte[8];

            guid2[4] = packet.ReadBit();
            guid1[3] = packet.ReadBit();
            guid1[7] = packet.ReadBit();
            guid1[0] = packet.ReadBit();
            guid2[1] = packet.ReadBit();
            packet.ReadBit("Silent");
            guid1[4] = packet.ReadBit();
            guid1[5] = packet.ReadBit();
            guid2[3] = packet.ReadBit();

            var count = packet.ReadBits("Response Count", 23);

            guid2[7] = packet.ReadBit();

            for (var i = 0; i < count; ++i)
            {
                var bits = new Bit[5];
                for (var j = 0; j < 5; ++j)
                    bits[j] = packet.ReadBit();
                packet.AddValue("Bits", string.Format("In Dungeon?: {0}, Same Group?: {1}, Accept: {2}, Answer: {3}, Self: {4}",
                    bits[0], bits[1], bits[2], bits[3], bits[4]), i); // 0 and 1 could be swapped
            }

            guid2[5] = packet.ReadBit();
            guid1[6] = packet.ReadBit();
            guid2[2] = packet.ReadBit();
            guid2[6] = packet.ReadBit();
            guid1[2] = packet.ReadBit();
            guid1[1] = packet.ReadBit();
            guid2[0] = packet.ReadBit();

            packet.ReadXORByte(guid1, 5);
            packet.ReadXORByte(guid2, 3);
            packet.ReadXORByte(guid2, 6);
            packet.ReadXORByte(guid1, 6);
            packet.ReadXORByte(guid1, 0);
            packet.ReadXORByte(guid2, 5);
            packet.ReadXORByte(guid1, 1);

            for (var i = 0; i < count; ++i)
                packet.ReadInt32E<LfgRoleFlag>("Roles", i);

            packet.ReadXORByte(guid2, 7);
            packet.ReadXORByte(guid1, 4);
            packet.ReadXORByte(guid2, 0);
            packet.ReadXORByte(guid2, 1);
            packet.ReadXORByte(guid1, 2);
            packet.ReadXORByte(guid1, 7);
            packet.ReadXORByte(guid2, 2);
            packet.ReadXORByte(guid1, 3);
            packet.ReadXORByte(guid2, 4);
        }
Esempio n. 11
0
        public static void HandleLfgRoleCheck(Packet packet)
        {
            packet.ReadEnum<LfgRoleCheckStatus>("Role Check Status", TypeCode.Int32);
            packet.ReadBoolean("Is Beginning");

            var numFields = packet.ReadByte("Entry Count");
            for (var i = 0; i < numFields; i++)
                packet.ReadLfgEntry("LFG Entry", i);

            var numFields2 = packet.ReadByte("Player Count");
            for (var i = 0; i < numFields2; i++)
            {
                packet.ReadGuid("GUID", i);
                packet.ReadBoolean("Ready", i);
                packet.ReadEnum<LfgRoleFlag>("Roles", TypeCode.Int32, i);
                packet.ReadByte("Level", i);
            }
        }
Esempio n. 12
0
 public static void HandLFGRoleCheckUpdate(Packet packet)
 {
     var guid = new byte[8];
     packet.ReadByte("unk65"); // 65
     packet.ReadByteE<LfgRoleCheckStatus>("Role Check Status"); // 16
     var count36 = packet.ReadBits("Member count", 21); // 36
     var guid40 = new byte[count36][];
     for (var i = 0; i < count36; i++)
     {
         packet.ReadBit("Choosed", i); // 48
         guid40[i] = packet.StartBitStream(3, 0, 5, 2, 7, 1, 4, 6);
     }
     guid[3] = packet.ReadBit();
     guid[5] = packet.ReadBit();
     var count20 = packet.ReadBits("Entry count", 22);
     guid[0] = packet.ReadBit();
     guid[7] = packet.ReadBit();
     guid[6] = packet.ReadBit();
     guid[1] = packet.ReadBit();
     guid[4] = packet.ReadBit();
     guid[2] = packet.ReadBit();
     var unk64 = packet.ReadBit("Is Beginning"); // 64
     packet.ParseBitStream(guid, 0);
     for (var i = 0; i < count36; i++)
     {
         packet.ReadByte("Level", i); // 56
         packet.ParseBitStream(guid40[i], 3, 6);
         packet.ReadInt32E<LfgRoleFlag>("Roles", i); // 88
         packet.ParseBitStream(guid40[i], 2, 4, 0, 1, 5, 7);
         packet.WriteGuid("Player", guid40[i]);
     }
     packet.ParseBitStream(guid, 1, 7, 6, 4, 3, 2, 5);
     packet.WriteGuid("Guid", guid);
     for (var i = 0; i < count20; i++)
         packet.ReadLfgEntry("LFG Entry", i); // 24
 }
Esempio n. 13
0
        public static void HandleLfgPlayerLockInfoResponse(Packet packet)
        {
            var numFields = packet.ReadByte("Random Dungeon Count");
            for (var i = 0; i < numFields; i++)
            {
                packet.ReadLfgEntry("Random Dungeon Entry", i);
                ReadLfgRewardBlock(ref packet);
            }

            ReadPlayerLockedDungeons(ref packet, -1);
        }
Esempio n. 14
0
 public static void ReadDungeonJoinResults(ref Packet packet)
 {
     packet.ReadLfgEntry("LFG Entry");
     packet.ReadEnum<LfgEntryCheckResult>("Entry Check Result", TypeCode.Int32);
 }
Esempio n. 15
0
        public static void HandleLfgJoin434(Packet packet)
        {
            packet.ReadInt32E<LfgRoleFlag>("Roles");

            for (var i = 0; i < 3; i++)
                packet.ReadInt32("Unk Int32", i);

            var length = packet.ReadBits(9);
            var count = packet.ReadBits("Join Dungeon Count", 24);

            packet.ReadWoWString("Comment", length);

            for (var i = 0; i < count; i++)
                packet.ReadLfgEntry("Dungeon Entry", i);
        }
Esempio n. 16
0
        public static void HandleLfgUpdateStatus(Packet packet)
        {
            var guid = new byte[8];

            guid[1] = packet.ReadBit();
            packet.ReadBit("Unk Bit 65");
            var count = packet.ReadBits("Dungeon Count", 24);
            guid[6] = packet.ReadBit();
            packet.ReadBit("Joined");
            var length = packet.ReadBits(9);
            guid[4] = packet.ReadBit();
            guid[7] = packet.ReadBit();
            guid[2] = packet.ReadBit();
            packet.ReadBit("LFGJoined");
            guid[0] = packet.ReadBit();
            guid[3] = packet.ReadBit();
            guid[5] = packet.ReadBit();
            packet.ReadBit("Queued");
            packet.ReadByte("Unk Byte 64");
            packet.ReadWoWString("Comment", length);
            packet.ReadUInt32("Queue Id");
            packet.ReadTime("Join Date");

            packet.ReadXORByte(guid, 6);

            for (var i = 0; i < 3; ++i)
                packet.ReadByte("Unk Byte", i); // always 0

            packet.ReadXORByte(guid, 1);
            packet.ReadXORByte(guid, 2);
            packet.ReadXORByte(guid, 4);
            packet.ReadXORByte(guid, 3);
            packet.ReadXORByte(guid, 5);
            packet.ReadXORByte(guid, 0);

            packet.ReadInt32("Unk_UInt32_1"); // Same value than "Unk_UInt32_1" in SMSG_LFG_JOIN_RESULT - Only seen 3

            packet.ReadXORByte(guid, 7);

            for (var i = 0; i < count; ++i)
                packet.ReadLfgEntry("Dungeon Entry", i);

            packet.WriteGuid("GUID", guid);
        }
Esempio n. 17
0
        public static void HandleLfgUpdateParty(Packet packet)
        {
            packet.ReadByteE<LfgUpdateType>("Update Type");
            var extraInfo = packet.ReadBool("Extra Info");
            if (!extraInfo)
                return;

            packet.ReadBool("LFG Joined");
            packet.ReadBool("Queued");
            packet.ReadBytes(5); // always 0, 0, for (1..3) 0
            var numFields2 = packet.ReadByte("Slot Count");
            for (var i = 0; i < numFields2; i++)
                packet.ReadLfgEntry("LFG Entry", i);

            packet.ReadCString("Comment");
        }
Esempio n. 18
0
        public static void HandleLfgQueueStatusUpdate434(Packet packet)
        {
            var guid = packet.StartBitStream(3, 0, 2, 6, 5, 7, 1, 4);

            packet.ReadXORByte(guid, 0);

            //for (var i = 0; i < 3; ++i) byte uint32
            packet.ReadByte("Tank Unk");
            packet.ReadInt32("Tank Time");
            packet.ReadByte("Healer Unk");
            packet.ReadInt32("Healer Time");
            packet.ReadByte("Damage Unk");
            packet.ReadInt32("Damage Time");

            packet.ReadXORByte(guid, 4);
            packet.ReadXORByte(guid, 6);

            packet.ReadInt32("Average Wait Time");
            packet.ReadTime("Join Time");
            packet.ReadLfgEntry("LFG Entry");
            packet.ReadInt32("Queued Time");

            packet.ReadXORByte(guid, 5);
            packet.ReadXORByte(guid, 7);
            packet.ReadXORByte(guid, 3);

            packet.ReadInt32("Queue Id");

            packet.ReadXORByte(guid, 1);
            packet.ReadXORByte(guid, 2);

            packet.ReadInt32("Wait Time"); // Matches "Role Unk2"
            packet.ReadInt32("Unk_UInt32_1"); // Same value than "Unk_UInt32_1" in SMSG_LFG_JOIN_RESULT - Only seen 3
            packet.WriteGuid("GUID", guid);
        }
Esempio n. 19
0
 public static void ReadDungeonJoinResults(ref Packet packet)
 {
     packet.ReadLfgEntry("LFG Entry");
     packet.ReadEnum<LfgEntryCheckResult>("Entry Check Result", TypeCode.Int32);
     if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_2_2_14545))
     {
         packet.ReadInt32("Unk 1");
         packet.ReadInt32("Unk 2");
     }
 }
Esempio n. 20
0
        public static void HandleLfgProposalUpdate(Packet packet)
        {
            packet.ReadLfgEntry("LFG Entry");
            packet.ReadEnum<LfgProposalState>("State", TypeCode.Byte);
            packet.ReadInt32("Group ID");
            packet.ReadInt32("Bosses Killed Mask");
            packet.ReadBoolean("Silent");

            var numFields = packet.ReadByte("Response Count");
            for (var i = 0; i < numFields; i++)
            {
                packet.ReadEnum<LfgRoleFlag>("Roles", TypeCode.Int32, i);
                packet.ReadBoolean("Self", i);
                packet.ReadBoolean("In Dungeon", i);
                packet.ReadBoolean("Same Group", i);
                packet.ReadBoolean("Answer", i);
                packet.ReadBoolean("Accept", i);
            }
        }
Esempio n. 21
0
 public static void HandleLfgOfferContinue(Packet packet)
 {
     packet.ReadLfgEntry("LFG Entry");
 }
Esempio n. 22
0
 public static void HandleLfgQueueStatusUpdate(Packet packet)
 {
     packet.ReadLfgEntry("LFG Entry");
     packet.ReadInt32("Average Wait Time");
     packet.ReadInt32("Wait Time");
     packet.ReadInt32("Wait Tanks");
     packet.ReadInt32("Wait Headers");
     packet.ReadInt32("Wait DPS");
     packet.ReadByte("Number of Tanks Needed");
     packet.ReadByte("Number of Healers Needed");
     packet.ReadByte("Number of Damage Dealers Needed");
     if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_3_3_11685))
         packet.ReadInt32("Queued Time");
 }
Esempio n. 23
0
        public static void HandleGroupList(Packet packet)
        {
            var grouptype = packet.ReadEnum<GroupTypeFlag>("Group Type", TypeCode.Byte);
            packet.ReadByte("Sub Group");
            packet.ReadEnum<GroupUpdateFlag>("Flags", TypeCode.Byte);
            packet.ReadByte("Player Roles Assigned");

            if (grouptype.HasFlag(GroupTypeFlag.LookingForDungeon))
            {
                packet.ReadEnum<InstanceStatus>("Group Type Status", TypeCode.Byte);
                packet.ReadLfgEntry("LFG Entry");
                if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_2_2_14545))
                    packet.ReadBoolean("Unk bool");
            }

            packet.ReadGuid("Group GUID");

            if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_3_0_10958))
                packet.ReadInt32("Counter");

            var numFields = packet.ReadInt32("Member Count");
            for (var i = 0; i < numFields; i++)
            {
                var name = packet.ReadCString("Name", i);
                var guid = packet.ReadGuid("GUID", i);
                StoreGetters.AddName(guid, name);
                packet.ReadEnum<GroupMemberStatusFlag>("Status", TypeCode.Byte, i);
                packet.ReadByte("Sub Group", i);
                packet.ReadEnum<GroupUpdateFlag>("Update Flags", TypeCode.Byte, i);

                if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_3_0_10958))
                    packet.ReadEnum<LfgRoleFlag>("Role", TypeCode.Byte, i);
            }

            packet.ReadGuid("Leader GUID");

            if (numFields <= 0)
                return;

            packet.ReadEnum<LootMethod>("Loot Method", TypeCode.Byte);
            packet.ReadGuid("Looter GUID");
            packet.ReadEnum<ItemQuality>("Loot Threshold", TypeCode.Byte);

            if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_2_0_10192))
                packet.ReadEnum<MapDifficulty>("Dungeon Difficulty", TypeCode.Byte);

            packet.ReadEnum<MapDifficulty>("Raid Difficulty", TypeCode.Byte);

            if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_3_0_10958) &&
                ClientVersion.RemovedInVersion(ClientVersionBuild.V4_0_6a_13623))
                packet.ReadByte("Unk Byte"); // Has something to do with difficulty too
        }
Esempio n. 24
0
        public static void HandleLfgPlayerLockInfoResponse(Packet packet)
        {
            var numFields = packet.ReadByte("Random Dungeon Count");
            for (var i = 0; i < numFields; i++)
            {
                packet.ReadLfgEntry("Random Dungeon Entry", i);
                ReadLfgRewardBlock(ref packet);
            }

            var numFields3 = packet.ReadInt32("Entry Count");
            for (var j = 0; j < numFields3; j++)
            {
                packet.ReadLfgEntry("LFG Entry", j);
                packet.ReadEnum<LfgEntryCheckResult>("Entry Check Result", TypeCode.UInt32, j);
            }
        }