Ejemplo n.º 1
1
        public static void HandleGuildAchievementData(Packet packet)
        {
            var count = packet.ReadBits("Criteria count", 20);

            var guid = new byte[count][];

            for (var i = 0; i < count; ++i)
            {
                guid[i] = new byte[8];
                packet.StartBitStream(guid[i], 3, 5, 4, 7, 2, 1, 0, 6);
            }

            for (var i = 0; i < count; ++i)
            {
                packet.ReadXORByte(guid[i], 2);
                packet.ReadXORByte(guid[i], 7);
                packet.ReadInt32("Unk 1", i);
                packet.ReadXORByte(guid[i], 5);
                packet.ReadXORByte(guid[i], 3);
                packet.ReadXORByte(guid[i], 1);
                packet.ReadInt32<AchievementId>("Achievement Id", i);
                packet.ReadXORByte(guid[i], 6);
                packet.ReadInt32("Unk 2", i);
                packet.ReadXORByte(guid[i], 4);
                packet.ReadXORByte(guid[i], 0);
                packet.ReadPackedTime("Time", i);
                packet.WriteGuid("Guid", guid[i], i);
            }
        }
Ejemplo n.º 2
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);
        }
Ejemplo n.º 3
0
        public static void HandleVoidStorageContents(Packet packet)
        {
            var count = packet.ReadBits("Count", 7);

            var id = new byte[count][];
            var guid = new byte[count][];

            for (int i = 0; i < count; ++i)
            {
                id[i] = new byte[8];
                guid[i] = new byte[8];

                guid[i][2] = packet.ReadBit();
                id[i][2] = packet.ReadBit();
                id[i][5] = packet.ReadBit();
                id[i][7] = packet.ReadBit();
                guid[i][0] = packet.ReadBit();
                id[i][3] = packet.ReadBit();
                id[i][1] = packet.ReadBit();
                guid[i][5] = packet.ReadBit();
                id[i][0] = packet.ReadBit();
                guid[i][7] = packet.ReadBit();
                id[i][6] = packet.ReadBit();
                id[i][4] = packet.ReadBit();
                guid[i][4] = packet.ReadBit();
                guid[i][3] = packet.ReadBit();
                guid[i][1] = packet.ReadBit();
                guid[i][6] = packet.ReadBit();
            }

            for (int i = 0; i < count; ++i)
            {
                packet.ReadXORByte(id[i], 4);
                packet.ReadXORByte(guid[i], 2);
                packet.ReadXORByte(guid[i], 3);
                packet.ReadXORByte(guid[i], 1);
                packet.ReadXORByte(guid[i], 4);
                packet.ReadXORByte(guid[i], 0);
                packet.ReadXORByte(id[i], 3);
                packet.ReadXORByte(id[i], 1);
                packet.ReadXORByte(id[i], 6);
                packet.ReadInt32("Item Slot", i);
                packet.ReadInt32("Item Suffix Factor", i);
                packet.ReadXORByte(guid[i], 5);
                packet.ReadXORByte(id[i], 5);
                packet.ReadXORByte(id[i], 2);
                packet.ReadInt32("Item Random Property ID", i);
                packet.ReadXORByte(id[i], 7);
                packet.ReadXORByte(guid[i], 7);
                packet.ReadXORByte(guid[i], 6);
                packet.ReadXORByte(id[i], 0);
                packet.ReadUInt32<ItemId>("Item Entry", i);
                packet.ReadInt32("New Unk", i);
                packet.WriteGuid("Item Id", id[i], i);
                packet.WriteGuid("Item Player Creator Guid", guid[i], i);
            }
        }
Ejemplo n.º 4
0
        public static void HandleGuildPlayerSetNote(Packet packet)
        {
            var playerGUID = new byte[8];

            playerGUID[1]  = packet.ReadBit();
            var noteLength = packet.ReadBits("note length", 8);
            playerGUID[4]  = packet.ReadBit();
            playerGUID[2]  = packet.ReadBit();
            var ispublic   = packet.ReadBit("IsPublic");
            playerGUID[3]  = packet.ReadBit();
            playerGUID[5]  = packet.ReadBit();
            playerGUID[0]  = packet.ReadBit();
            playerGUID[6]  = packet.ReadBit();
            playerGUID[7]  = packet.ReadBit();

            packet.ReadXORByte(playerGUID, 5);
            packet.ReadXORByte(playerGUID, 1);
            packet.ReadXORByte(playerGUID, 6);
            packet.ReadWoWString("note", noteLength);
            packet.ReadXORByte(playerGUID, 0);
            packet.ReadXORByte(playerGUID, 7);
            packet.ReadXORByte(playerGUID, 4);
            packet.ReadXORByte(playerGUID, 3);
            packet.ReadXORByte(playerGUID, 2);

            packet.WriteGuid("Player GUID", playerGUID);
        }
        public static void HandleServerAuctionHello(Packet packet)
        {
            var guid = new byte[8];

            guid[2] = packet.ReadBit();
            guid[0] = packet.ReadBit();
            guid[7] = packet.ReadBit();
            guid[1] = packet.ReadBit();
            guid[4] = packet.ReadBit();
            guid[6] = packet.ReadBit();
            packet.ReadBit("Enabled");
            guid[3] = packet.ReadBit();
            guid[5] = packet.ReadBit();

            packet.ReadXORByte(guid, 3);
            packet.ReadXORByte(guid, 2);
            packet.ReadXORByte(guid, 5);
            packet.ReadXORByte(guid, 7);
            packet.ReadXORByte(guid, 6);
            packet.ReadXORByte(guid, 4);
            packet.ReadInt32("AuctionHouse ID");
            packet.ReadXORByte(guid, 1);
            packet.ReadXORByte(guid, 0);

            packet.WriteGuid("Guid", guid);
        }
Ejemplo n.º 6
0
        public static void HandlePlaySound(Packet packet)
        {
            var guid = new byte[8];

            guid[5] = packet.ReadBit();
            guid[6] = packet.ReadBit();
            guid[0] = packet.ReadBit();
            guid[1] = packet.ReadBit();
            guid[7] = packet.ReadBit();
            guid[2] = packet.ReadBit();
            guid[4] = packet.ReadBit();
            guid[3] = packet.ReadBit();
            packet.ReadXORByte(guid, 5);
            packet.ReadXORByte(guid, 1);
            var sound = packet.ReadUInt32("Sound Id");
            packet.ReadXORByte(guid, 6);
            packet.ReadXORByte(guid, 2);
            packet.ReadXORByte(guid, 4);
            packet.ReadXORByte(guid, 7);
            packet.ReadXORByte(guid, 3);
            packet.ReadXORByte(guid, 0);

            packet.WriteGuid("Guid", guid);

            Storage.Sounds.Add(sound, packet.TimeSpan);
        }
Ejemplo n.º 7
0
        public static void HandleCorpseQueryResponse(Packet packet)
        {
            var pos = new Vector3();
            var guid = new byte[8];

            guid[4] = packet.ReadBit();
            guid[2] = packet.ReadBit();
            guid[5] = packet.ReadBit();
            guid[3] = packet.ReadBit();
            guid[1] = packet.ReadBit();
            guid[6] = packet.ReadBit();
            guid[0] = packet.ReadBit();
            packet.ReadBit("Corpse Found");
            guid[7] = packet.ReadBit();

            packet.ReadXORByte(guid, 3);
            packet.ReadXORByte(guid, 1);
            packet.ReadXORByte(guid, 2);
            packet.ReadInt32<MapId>("Map ID");
            pos.X = packet.ReadSingle();
            packet.ReadXORByte(guid, 6);
            packet.ReadXORByte(guid, 4);
            packet.ReadXORByte(guid, 5);
            packet.ReadInt32<MapId>("Corpse Map ID");
            packet.ReadXORByte(guid, 7);
            pos.Z = packet.ReadSingle();
            packet.ReadXORByte(guid, 0);
            pos.Y = packet.ReadSingle();

            packet.AddValue("Position", pos);
            packet.WriteGuid("Corpse Low GUID", guid);
        }
Ejemplo n.º 8
0
        public static void HandleGroupAssignment(Packet packet)
        {
            var guid = new byte[8];

            packet.ReadByte("Byte12");
            packet.ReadByte("Byte10");
            guid[0] = packet.ReadBit();
            guid[5] = packet.ReadBit();
            guid[6] = packet.ReadBit();
            guid[7] = packet.ReadBit();
            guid[3] = packet.ReadBit();
            guid[1] = packet.ReadBit();
            guid[2] = packet.ReadBit();
            var bit11 = packet.ReadBit();
            guid[4] = packet.ReadBit();
            packet.ReadXORByte(guid, 4);
            packet.ReadXORByte(guid, 3);
            packet.ReadXORByte(guid, 1);
            packet.ReadXORByte(guid, 5);
            packet.ReadXORByte(guid, 2);
            packet.ReadXORByte(guid, 6);
            packet.ReadXORByte(guid, 7);
            packet.ReadXORByte(guid, 0);

            packet.WriteGuid("Guid", guid);
        }
Ejemplo n.º 9
0
        public static void HandleGroupAssistantLeader(Packet packet)
        {
            var guid = new byte[8];

            packet.ReadBool("Promote");
            guid[1] = packet.ReadBit();
            var bit11 = packet.ReadBit();
            guid[0] = packet.ReadBit();
            guid[7] = packet.ReadBit();
            guid[5] = packet.ReadBit();
            guid[3] = packet.ReadBit();
            guid[4] = packet.ReadBit();
            guid[2] = packet.ReadBit();
            guid[6] = packet.ReadBit();

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

            packet.WriteGuid("Guid", guid);
        }
Ejemplo n.º 10
0
        public static void HandleGroupInvite(Packet packet)
        {
            var crossRealmGuid = new byte[8];

            packet.ReadInt32("Int114");
            packet.ReadByte("Byte118");
            packet.ReadInt32("Int128");
            crossRealmGuid[7] = packet.ReadBit();
            var realmNameLen = packet.ReadBits(9);
            crossRealmGuid[3] = packet.ReadBit();
            var nameLen = packet.ReadBits(9);
            crossRealmGuid[2] = packet.ReadBit();
            crossRealmGuid[5] = packet.ReadBit();
            crossRealmGuid[4] = packet.ReadBit();
            crossRealmGuid[0] = packet.ReadBit();
            crossRealmGuid[1] = packet.ReadBit();
            crossRealmGuid[6] = packet.ReadBit();

            packet.ReadXORByte(crossRealmGuid, 7);
            packet.ReadXORByte(crossRealmGuid, 6);
            packet.ReadXORByte(crossRealmGuid, 0);
            packet.ReadXORByte(crossRealmGuid, 4);
            packet.ReadWoWString("Name", nameLen);
            packet.ReadXORByte(crossRealmGuid, 1);
            packet.ReadXORByte(crossRealmGuid, 2);
            packet.ReadXORByte(crossRealmGuid, 3);
            packet.ReadWoWString("Realm Name", realmNameLen);
            packet.ReadXORByte(crossRealmGuid, 5);

            packet.WriteGuid("crossRealmGuid", crossRealmGuid);
        }
Ejemplo n.º 11
0
        public static void HandleGroupInvite(Packet packet)
        {
            var guid = new byte[8];

            packet.ReadInt32("Unk Int32"); // Non-zero in cross realm parties (1383)
            packet.ReadInt32("Unk Int32"); // Always 0
            packet.ReadByte("unk");

            guid[2] = packet.ReadBit();
            var strLen = packet.ReadBits(9);
            guid[0] = packet.ReadBit();

            guid[3] = packet.ReadBit();
            guid[4] = packet.ReadBit();
            guid[6] = packet.ReadBit();
            guid[7] = packet.ReadBit();
            guid[5] = packet.ReadBit();
            guid[1] = packet.ReadBit();

            var nameLen = packet.ReadBits(9);

            packet.ResetBitReader();

            packet.ReadXORByte(guid, 5);
            packet.ReadWoWString("Realm Name", strLen); // Non-empty in cross realm parties
            packet.ReadWoWString("Name", nameLen);
            packet.ReadXORByte(guid, 4);
            packet.ReadXORByte(guid, 0);
            packet.ReadXORByte(guid, 3);
            packet.ReadXORByte(guid, 6);
            packet.ReadXORByte(guid, 1);
            packet.ReadXORByte(guid, 2);
            packet.ReadXORByte(guid, 7);
            packet.WriteGuid("Guid", guid); // Non-zero in cross realm parties
        }
Ejemplo n.º 12
0
        public static void HandleCorpseQueryResponse(Packet packet)
        {
            var pos = new Vector3();
            var guid = new byte[8];

            guid[4] = packet.ReadBit();
            guid[2] = packet.ReadBit();
            guid[5] = packet.ReadBit();
            guid[3] = packet.ReadBit();
            guid[1] = packet.ReadBit();
            guid[6] = packet.ReadBit();
            guid[0] = packet.ReadBit();
            packet.ReadBit("Corpse Found");
            guid[7] = packet.ReadBit();

            packet.ReadXORByte(guid, 3);
            packet.ReadXORByte(guid, 1);
            packet.ReadXORByte(guid, 2);
            packet.ReadEntryWithName<Int32>(StoreNameType.Map, "Map ID");
            pos.X = packet.ReadSingle();
            packet.ReadXORByte(guid, 6);
            packet.ReadXORByte(guid, 4);
            packet.ReadXORByte(guid, 5);
            packet.ReadEntryWithName<Int32>(StoreNameType.Map, "Corpse Map ID");
            packet.ReadXORByte(guid, 7);
            pos.Z = packet.ReadSingle();
            packet.ReadXORByte(guid, 0);
            pos.Y = packet.ReadSingle();

            packet.WriteLine("Position: {0}", pos);
            packet.WriteGuid("Corpse Low GUID", guid);
        }
Ejemplo n.º 13
0
        public static void HandleAutoStoreLootItem510(Packet packet)
        {
            var counter = packet.ReadBits("Count", 23);

            var guid = new byte[counter][];

            for (var i = 0; i < counter; ++i)
            {
                guid[i] = new byte[8];
                packet.StartBitStream(guid[i], 2, 1, 5, 7, 4, 3, 0, 6);
            }

            packet.ResetBitReader();

            for (var i = 0; i < counter; ++i)
            {
                packet.ReadXORByte(guid[i], 0);
                packet.ReadXORByte(guid[i], 3);
                packet.ReadByte("Slot", i);
                packet.ReadXORByte(guid[i], 7);
                packet.ReadXORByte(guid[i], 2);
                packet.ReadXORByte(guid[i], 4);
                packet.ReadXORByte(guid[i], 1);
                packet.ReadXORByte(guid[i], 6);
                packet.ReadXORByte(guid[i], 5);

                packet.WriteGuid("Looter GUID", guid[i], i);
            }
        }
Ejemplo n.º 14
0
        public static void HandleScenarioProgressUpdate(Packet packet)
        {
            var guid3 = new byte[8];
            var guid4 = new byte[8];

            var bits28 = 0;

            guid4[7] = packet.ReadBit();
            guid4[0] = packet.ReadBit();
            guid4[4] = packet.ReadBit();
            bits28 = (int)packet.ReadBits(4);
            guid3[3] = packet.ReadBit();
            guid3[4] = packet.ReadBit();
            guid3[0] = packet.ReadBit();
            guid4[6] = packet.ReadBit();
            guid3[2] = packet.ReadBit();
            guid4[3] = packet.ReadBit();
            guid3[7] = packet.ReadBit();
            guid4[5] = packet.ReadBit();
            guid3[6] = packet.ReadBit();
            guid3[5] = packet.ReadBit();
            guid3[1] = packet.ReadBit();
            guid4[2] = packet.ReadBit();
            guid4[1] = packet.ReadBit();
            packet.ReadXORByte(guid4, 5);
            packet.ReadXORByte(guid3, 2);
            packet.ReadXORByte(guid3, 6);
            packet.ReadXORByte(guid4, 4);
            packet.ReadXORByte(guid3, 4);
            packet.ReadXORByte(guid4, 6);
            packet.ReadXORByte(guid3, 3);
            packet.ReadPackedTime("Time");
            packet.ReadXORByte(guid4, 7);
            packet.ReadXORByte(guid3, 5);
            packet.ReadXORByte(guid3, 7);
            packet.ReadXORByte(guid3, 0);
            packet.ReadXORByte(guid4, 1);
            packet.ReadXORByte(guid3, 1);
            packet.ReadXORByte(guid4, 2);
            packet.ReadXORByte(guid4, 3);
            packet.ReadInt32("Int50");
            packet.ReadInt32("Int4C");
            packet.ReadInt32("Criteria ID");
            packet.ReadXORByte(guid4, 0);

            packet.WriteGuid("Guid3", guid3);
            packet.WriteGuid("Guid4", guid4);
        }
Ejemplo n.º 15
0
        public static void HandleQuestgiverAcceptQuest(Packet packet)
        {
            var guid = new byte[8];

            packet.ReadUInt32<QuestId>("Quest ID");
            guid[3] = packet.ReadBit();
            guid[2] = packet.ReadBit();
            guid[7] = packet.ReadBit();
            packet.ReadBit("bit18");
            guid[5] = packet.ReadBit();
            guid[0] = packet.ReadBit();
            guid[6] = packet.ReadBit();
            guid[1] = packet.ReadBit();
            guid[4] = packet.ReadBit();

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

            packet.WriteGuid("Guid", guid);
        }
Ejemplo n.º 16
0
        public static void HandleGuildQueryResponse(Packet packet)
        {
            var guid1 = new byte[8];
            var guid2 = new byte[8];

            var hasData = packet.ReadBit();

            int nameLen = 0;
            int rankCount = 0;
            int[] rankName = null;
            if (hasData)
            {
                packet.StartBitStream(guid2, 1, 7);
                nameLen = (int)packet.ReadBits(7);
                packet.StartBitStream(guid2, 5, 0, 6, 3, 4, 2);
                rankCount = (int)packet.ReadBits(21);
                rankName = new int[rankCount];
                for (var i = 0; i < rankCount; ++i)
                    rankName[i] = (int)packet.ReadBits(7);
            }

            packet.StartBitStream(guid1, 2, 6, 7, 5, 4, 3, 0, 1);
            if (hasData)
            {
                packet.ReadWoWString("Guild Name", nameLen);
                packet.ReadXORByte(guid2, 5);
                for (var i = 0; i < rankCount; ++i)
                {
                    packet.ReadUInt32("Rights Order", i);
                    packet.ReadUInt32("Creation Order", i);
                    packet.ReadWoWString("Rank Name", rankName[i], i);
                }

                packet.ReadInt32("Emblem Border Color");
                packet.ReadXORBytes(guid2, 6, 0);
                packet.ReadInt32("Emblem Border Style");
                packet.ReadInt32("Emblem Style");
                packet.ReadXORByte(guid2, 4);
                packet.ReadInt32("Emblem Color");
                packet.ReadXORBytes(guid2, 7, 2, 3, 1);
                packet.ReadInt32("Emblem Background Color");
                packet.WriteGuid("Guid2", guid2);
            }

            packet.ParseBitStream(guid1, 1, 6, 3, 5, 4, 0, 2, 7);
            packet.WriteGuid("Guid1", guid1);
        }
Ejemplo n.º 17
0
        public static void HandleEquipmentSetList(Packet packet)
        {
            var count = packet.ReadBits(19);

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

            var bits0 = new uint[count];
            var bits4 = new uint[count];

            for (var i = 0; i < count; i++)
            {
                guid1[i] = new byte[NumSlots][];
                guid2[i] = new byte[8];

                guid2[i][7] = packet.ReadBit();

                for (var j = 0; j < NumSlots; j++)
                {
                    guid1[i][j] = new byte[8];
                    packet.StartBitStream(guid1[i][j], 6, 7, 5, 1, 0, 4, 2, 3);
                }

                guid2[i][3] = packet.ReadBit();
                guid2[i][1] = packet.ReadBit();
                guid2[i][5] = packet.ReadBit();
                guid2[i][6] = packet.ReadBit();
                bits0[i] = packet.ReadBits(8);
                bits4[i] = packet.ReadBits(9);
                guid2[i][0] = packet.ReadBit();
                guid2[i][2] = packet.ReadBit();
                guid2[i][4] = packet.ReadBit();
            }

            for (var i = 0; i < count; i++)
            {
                for (var j = 0; j < NumSlots; j++)
                {
                    packet.ParseBitStream(guid1[i][j], 7, 4, 5, 3, 0, 6, 2, 1);
                    packet.WriteGuid("Item GUID", guid1[i][j], i, j);
                }

                packet.ReadXORByte(guid2[i], 7);
                packet.ReadXORByte(guid2[i], 3);
                packet.ReadXORByte(guid2[i], 0);
                packet.ReadXORByte(guid2[i], 5);
                packet.ReadWoWString("Set Name", bits0[i], i);
                packet.ReadXORByte(guid2[i], 4);
                packet.ReadXORByte(guid2[i], 6);
                packet.ReadXORByte(guid2[i], 2);
                packet.ReadXORByte(guid2[i], 1);
                packet.ReadInt32("Index", i);
                packet.ReadWoWString("Set Icon", bits4[i], i);

                packet.WriteGuid("GUID", guid2[i], i);
            }
        }
Ejemplo n.º 18
0
        public static void HandleAttackStartStop(Packet packet)
        {
            var VictimGUID = new byte[8];
            var AttackerGUID = new byte[8];

            AttackerGUID[2] = packet.ReadBit();
            VictimGUID[3] = packet.ReadBit();
            VictimGUID[7] = packet.ReadBit();
            VictimGUID[2] = packet.ReadBit();
            VictimGUID[1] = packet.ReadBit();
            AttackerGUID[1] = packet.ReadBit();
            VictimGUID[6] = packet.ReadBit();

            packet.ReadBit("Unk bit");

            VictimGUID[0] = packet.ReadBit();
            AttackerGUID[5] = packet.ReadBit();
            AttackerGUID[6] = packet.ReadBit();
            AttackerGUID[0] = packet.ReadBit();
            VictimGUID[4] = packet.ReadBit();
            VictimGUID[5] = packet.ReadBit();
            AttackerGUID[3] = packet.ReadBit();
            AttackerGUID[4] = packet.ReadBit();
            AttackerGUID[7] = packet.ReadBit();

            packet.ReadXORByte(AttackerGUID, 3);
            packet.ReadXORByte(AttackerGUID, 7);
            packet.ReadXORByte(AttackerGUID, 2);
            packet.ReadXORByte(VictimGUID, 4);
            packet.ReadXORByte(AttackerGUID, 0);
            packet.ReadXORByte(VictimGUID, 1);
            packet.ReadXORByte(AttackerGUID, 4);
            packet.ReadXORByte(VictimGUID, 5);
            packet.ReadXORByte(VictimGUID, 6);
            packet.ReadXORByte(VictimGUID, 7);
            packet.ReadXORByte(VictimGUID, 3);
            packet.ReadXORByte(AttackerGUID, 1);
            packet.ReadXORByte(VictimGUID, 2);
            packet.ReadXORByte(AttackerGUID, 6);
            packet.ReadXORByte(AttackerGUID, 5);
            packet.ReadXORByte(VictimGUID, 0);

            packet.WriteGuid("Attacker GUID", AttackerGUID);
            packet.WriteGuid("Victim GUID", VictimGUID);
        }
Ejemplo n.º 19
0
 public static void HandleMoveSetRunSpeed(Packet packet)
 {
     var guid = packet.StartBitStream(1, 5, 2, 0, 4, 3, 7, 6);
     packet.ParseBitStream(guid, 3, 2, 6, 0);
     packet.ReadInt32("Counter");
     packet.ReadXORByte(guid, 5);
     packet.ReadSingle("Speed");
     packet.ParseBitStream(guid, 7, 4, 1);
     packet.WriteGuid("Guid", guid);
 }
Ejemplo n.º 20
0
 public static void HandleMoveSetFlightSpeed(Packet packet)
 {
     var guid = packet.StartBitStream(2, 1, 6, 5, 7, 3, 0, 4);
     packet.ParseBitStream(guid, 7, 4, 3);
     packet.ReadInt32("Counter");
     packet.ReadXORByte(guid, 5);
     packet.ReadSingle("Speed");
     packet.ParseBitStream(guid, 6, 2, 0, 1);
     packet.WriteGuid("Guid", guid);
 }
Ejemplo n.º 21
0
        public static void HandleBattleCharBoostClient(Packet packet)
        {
            byte[] guid = new byte[8];
            byte[] guid2 = new byte[8];

            packet.ReadInt32("unk int32");
            guid2[1] = packet.ReadBit();
            guid[0] = packet.ReadBit();
            guid2[5] = packet.ReadBit();
            guid2[4] = packet.ReadBit();
            guid[3] = packet.ReadBit();
            guid2[6] = packet.ReadBit();
            guid2[0] = packet.ReadBit();
            guid[5] = packet.ReadBit();
            guid2[3] = packet.ReadBit();
            guid2[7] = packet.ReadBit();
            guid[1] = packet.ReadBit();
            guid2[2] = packet.ReadBit();
            guid[2] = packet.ReadBit();
            var charInfo = !packet.ReadBit("Not Contains Char Info");
            guid[7] = packet.ReadBit();
            guid[4] = packet.ReadBit();
            guid[6] = packet.ReadBit();

            packet.ReadXORByte(guid, 2);
            packet.ReadXORByte(guid2, 0);
            packet.ParseBitStream(guid, 0, 7);
            packet.ReadXORByte(guid2, 7);
            packet.ReadXORByte(guid, 3);
            packet.ParseBitStream(guid2, 6, 4, 5);
            packet.ParseBitStream(guid, 1, 6, 4);
            packet.ParseBitStream(guid2, 1, 2, 3);
            packet.ReadXORByte(guid, 5);
            if (charInfo)
            {
                int hexOutput = packet.ReadInt32("Char Info");
                packet.WriteLine(string.Format("Hex Output {0:X}", hexOutput));
            }
            packet.WriteGuid("Player GUID", guid);
            packet.WriteGuid("Guid2", guid2);
        }
Ejemplo n.º 22
0
        public static void HandleAuraPointsDepleted(Packet packet)
        {
            var guid = packet.StartBitStream(2, 4, 1, 7, 5, 0, 3, 6);

            packet.ReadXORByte(guid, 5);
            packet.ReadXORByte(guid, 0);
            packet.ReadByte("Points?");
            packet.ReadXORByte(guid, 3);
            packet.ReadXORByte(guid, 7);
            packet.ReadXORByte(guid, 4);
            packet.ReadXORByte(guid, 2);
            packet.ReadByte("Slot ID?");
            packet.ReadXORByte(guid, 6);
            packet.ReadXORByte(guid, 1);
            packet.WriteGuid("Guid", guid);
        }
Ejemplo n.º 23
0
        public static void HandlePetNameQuery(Packet packet)
        {
            var guid = new byte[8];
            var number = new byte[8];

            guid[5] = packet.ReadBit();
            number[3] = packet.ReadBit();
            guid[6] = packet.ReadBit();
            packet.StartBitStream(number, 5, 7);
            packet.StartBitStream(guid, 2, 4);
            number[2] = packet.ReadBit();
            guid[3] = packet.ReadBit();
            number[1] = packet.ReadBit();
            guid[7] = packet.ReadBit();
            number[6] = packet.ReadBit();
            packet.StartBitStream(guid, 1, 0);
            packet.StartBitStream(number, 4, 0);
            packet.ResetBitReader();

            packet.ReadXORByte(number, 5);
            packet.ReadXORBytes(guid, 4, 3);
            packet.ReadXORBytes(number, 7, 4);
            packet.ReadXORBytes(guid, 5, 2, 0, 6);
            packet.ReadXORBytes(number, 2, 0, 6);
            packet.ReadXORByte(guid, 1);
            packet.ReadXORByte(number, 3);
            packet.ReadXORByte(guid, 7);
            packet.ReadXORByte(number, 1);

            var GUID = new WowGuid64(BitConverter.ToUInt64(guid, 0));
            var Number = BitConverter.ToUInt64(number, 0);
            packet.WriteGuid("Guid", guid);
            packet.AddValue("Pet Number", Number);

            // Store temporary name (will be replaced in SMSG_QUERY_PET_NAME_RESPONSE)
            StoreGetters.AddName(GUID, Number.ToString(CultureInfo.InvariantCulture));
        }
Ejemplo n.º 24
0
        public static void HandleAutoStoreLootItem547(Packet packet)
        {
            if (packet.Direction == Direction.ClientToServer)
            {
                var counter = packet.ReadBits("Count", 23);

                var guid = new byte[counter][];

                for (var i = 0; i < counter; ++i)
                {
                    guid[i] = new byte[8];

                    guid[i][2] = packet.ReadBit();
                    guid[i][1] = packet.ReadBit();
                    guid[i][5] = packet.ReadBit();
                    guid[i][7] = packet.ReadBit();
                    guid[i][4] = packet.ReadBit();
                    guid[i][3] = packet.ReadBit();
                    guid[i][0] = packet.ReadBit();
                    guid[i][6] = packet.ReadBit();
                }

                packet.ResetBitReader();

                for (var i = 0; i < counter; ++i)
                {
                    packet.ReadXORByte(guid[i], 0);
                    packet.ReadXORByte(guid[i], 3);
                    packet.ReadByte("Slot", i);
                    packet.ReadXORByte(guid[i], 7);
                    packet.ReadXORByte(guid[i], 2);
                    packet.ReadXORByte(guid[i], 4);
                    packet.ReadXORByte(guid[i], 1);
                    packet.ReadXORByte(guid[i], 6);
                    packet.ReadXORByte(guid[i], 5);

                    packet.WriteGuid("Lootee GUID", guid[i], i);
                }
            }
            else
            {
                packet.WriteLine("              : SMSG_???");
                //packet.Opcode = (int)Opcode.CMSG_MOUNTSPECIAL_ANIM;
                packet.ReadToEnd();
            }
        }
Ejemplo n.º 25
0
        public static void HandleFlightSplineSync(Packet packet)
        {
            var guid = new byte[8];

            packet.StartBitStream(guid, 4, 0, 7, 2, 3, 6, 5, 1);
            packet.ReadXORByte(guid, 2);
            packet.ReadXORByte(guid, 5);
            packet.ReadSingle("Duration modifier");
            packet.ReadXORByte(guid, 6);
            packet.ReadXORByte(guid, 4);
            packet.ReadXORByte(guid, 3);
            packet.ReadXORByte(guid, 1);
            packet.ReadXORByte(guid, 7);
            packet.ReadXORByte(guid, 0);

            packet.WriteGuid("GUID", guid);
        }
Ejemplo n.º 26
0
        public static void HandleAIReaction(Packet packet)
        {
            var guid = new byte[8];

            packet.StartBitStream(guid, 5, 7, 0, 4, 6, 2, 3, 1);
            packet.ReadXORByte(guid, 4);
            packet.ReadXORByte(guid, 6);
            packet.ReadXORByte(guid, 5);
            packet.ReadInt32E<AIReaction>("Reaction");
            packet.ReadXORByte(guid, 7);
            packet.ReadXORByte(guid, 1);
            packet.ReadXORByte(guid, 2);
            packet.ReadXORByte(guid, 0);
            packet.ReadXORByte(guid, 3);

            packet.WriteGuid("Guid", guid);
        }
Ejemplo n.º 27
0
        public static void HandleCorpseQuery(Packet packet)
        {
            if (packet.Direction == Direction.ServerToClient)
            {
                var guid = new byte[8];

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

                var CorpseFound = packet.ReadBit("CorpseFound");

                guid[7] = packet.ReadBit();

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

                packet.ReadUInt32("MapId");
                packet.ReadSingle("X");

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

                packet.ReadUInt32("CorpseMapId");

                packet.ReadXORByte(guid, 7);

                packet.ReadSingle("Z");

                packet.ReadXORByte(guid, 0);

                packet.ReadSingle("Y");

                packet.WriteGuid("Corpse Guid", guid);
            } else
            {
                packet.WriteLine("              : CMSG_MOUNTSPECIAL_ANIM");
                packet.Opcode = (int)Opcode.CMSG_MOUNTSPECIAL_ANIM;
            }
        }
Ejemplo n.º 28
0
        public static void HandleCriteriaUpdate(Packet packet)
        {
            var counter = new byte[8];
            var guid2 = new byte[8];

            counter[1] = packet.ReadBit();
            guid2[2] = packet.ReadBit();
            packet.ReadBits("Flags", 4); // some flag... & 1 -> delete
            packet.StartBitStream(guid2, 4, 0, 7);
            counter[6] = packet.ReadBit();
            guid2[5] = packet.ReadBit();
            packet.StartBitStream(counter, 0, 2, 4);
            packet.StartBitStream(guid2, 3, 6);
            packet.StartBitStream(counter, 3, 5);
            guid2[1] = packet.ReadBit();
            counter[7] = packet.ReadBit();

            packet.ResetBitReader();

            packet.ReadPackedTime("Time");
            packet.ReadXORByte(counter, 1);
            packet.ReadXORByte(guid2, 2);
            packet.ReadXORByte(counter, 2);
            packet.ReadXORByte(guid2, 3);
            packet.ReadXORByte(counter, 5);
            packet.ReadXORBytes(guid2, 0, 4);

            packet.ReadUInt32("Timer 1");
            packet.ReadXORByte(guid2, 5);
            packet.ReadInt32("Criteria ID");
            packet.ReadXORByte(guid2, 1);
            packet.ReadXORBytes(counter, 7, 3, 6);
            packet.ReadXORByte(guid2, 7);
            packet.ReadXORBytes(counter, 0, 4);
            packet.ReadXORByte(guid2, 6);
            packet.ReadUInt32("Timer 2");

            packet.WriteLine("Counter: {0}", BitConverter.ToInt64(counter, 0));
            packet.WriteGuid("GUID2", guid2);
        }
Ejemplo n.º 29
0
        public static void Handle13022(Packet packet)
        {
            var guid = packet.StartBitStream(3, 7, 6, 2, 5, 4, 0, 1);

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

            packet.ReadInt32("Unk Int32");

            packet.ReadXORByte(guid, 0);
            packet.ReadXORByte(guid, 3);
            packet.ReadXORByte(guid, 7);
            packet.ReadXORByte(guid, 6);

            packet.WriteGuid("Unk Guid?", guid);
        }
        public static void HandleBattlefieldListServer434(Packet packet)
        {
            packet.ReadInt32("Holiday First Win Arena Currency Bonus");
            packet.ReadInt32("Random First Win Arena Currency Bonus");
            packet.ReadInt32("Holiday Loss Honor Currency Bonus");
            packet.ReadEntry<Int32>(StoreNameType.Battleground, "BG type");
            packet.ReadInt32("Random Loss Honor Currency Bonus");
            packet.ReadInt32("Random Win Honor Currency Bonus");
            packet.ReadInt32("Holiday Win Honor Currency Bonus");
            packet.ReadByte("Max level");
            packet.ReadByte("Min level");

            var guidBytes = new byte[8];

            guidBytes[0] = packet.ReadBit();
            guidBytes[1] = packet.ReadBit();
            guidBytes[7] = packet.ReadBit();
            packet.ReadBit("Has Won Holiday Today");
            packet.ReadBit("Has Won Random Today");
            var count = packet.ReadBits("BG Instance count", 24); // Max 64
            guidBytes[6] = packet.ReadBit();
            guidBytes[4] = packet.ReadBit();
            guidBytes[2] = packet.ReadBit();
            guidBytes[3] = packet.ReadBit();
            packet.ReadBit("Unk Bit"); // Unk bit 1
            guidBytes[5] = packet.ReadBit();
            packet.ReadBit("Trigger PVPQUEUE_ANYWHERE_SHOW");

            packet.ReadXORByte(guidBytes, 6);
            packet.ReadXORByte(guidBytes, 1);
            packet.ReadXORByte(guidBytes, 7);
            packet.ReadXORByte(guidBytes, 5);

            for (var i = 0; i < count; i++)
                packet.ReadUInt32("BG Instance ID", i);

            packet.ReadXORByte(guidBytes, 0);
            packet.ReadXORByte(guidBytes, 2);
            packet.ReadXORByte(guidBytes, 4);
            packet.ReadXORByte(guidBytes, 3);

            packet.WriteGuid("Guid", guidBytes);
        }