Skip to content

Commit

Permalink
6.0.3 Structs SMSG_ITEM_UPGRADE_RESULT, SMSG_TITLE_LOST, SMSG_PETITIO…
Browse files Browse the repository at this point in the history
…N_DECLINED, SMSG_PETITION_RENAME_GUILD_RESPONSE, SMSG_PENDING_RAID_LOCK, SMSG_PET_ACTION_FEEDBACK
  • Loading branch information
DDuarte committed Feb 8, 2015
1 parent b22d55e commit 061c32d
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 16 deletions.
1 change: 0 additions & 1 deletion WowPacketParser/Enums/Opcode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2325,7 +2325,6 @@ public enum Opcode
SMSG_TIME_SYNC_REQ,
SMSG_TITLE_EARNED,
SMSG_TITLE_LOST,
SMSG_TITLE_REMOVED,
SMSG_TOGGLE_XP_GAIN,
SMSG_TOTEM_CREATED,
SMSG_TOTEM_MOVED,
Expand Down
2 changes: 1 addition & 1 deletion WowPacketParser/Enums/Version/V5_3_0_16981/Opcodes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ public static BiDictionary<Opcode, int> Opcodes(Direction direction)
{Opcode.SMSG_TIME_ADJUSTMENT, 0x159C},
{Opcode.SMSG_TIME_SYNC_REQ, 0x0AD4},
{Opcode.SMSG_TITLE_EARNED, 0x02D0},
{Opcode.SMSG_TITLE_REMOVED, 0x0484},
{Opcode.SMSG_TITLE_LOST, 0x0484},
{Opcode.SMSG_TRADE_STATUS, 0x0DC0},
{Opcode.SMSG_TRAINER_BUY_FAILED, 0x08C5},
{Opcode.SMSG_TRAINER_LIST, 0x08C9},
Expand Down
6 changes: 6 additions & 0 deletions WowPacketParser/Parsing/Parsers/ItemHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1264,5 +1264,11 @@ public static void HandleItemExpirePurchaseRefund(Packet packet)
packet.ParseBitStream(guid, 1, 0, 3, 4, 7, 6, 5, 2);
packet.WriteGuid("Guid", guid);
}

[Parser(Opcode.SMSG_ITEM_UPGRADE_RESULT)]
public static void HandleItemUpgradeResult(Packet packet)
{
packet.ReadBit("Result");
}
}
}
7 changes: 3 additions & 4 deletions WowPacketParser/Parsing/Parsers/PetHandler.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
Expand Down Expand Up @@ -205,17 +204,17 @@ public static void HandlePetSpellsLearnedRemoved(Packet packet)
[Parser(Opcode.SMSG_PET_ACTION_FEEDBACK)]
public static void HandlePetActionFeedback(Packet packet)
{
var state = packet.ReadByteE<PetFeedback>("Pet state");
var state = packet.ReadByteE<PetFeedback>("Response");

switch (state)
{
case PetFeedback.NothingToAttack:
if (ClientVersion.AddedInVersion(ClientType.Cataclysm) || packet.CanRead())
packet.ReadInt32<SpellId>("Spell ID");
packet.ReadInt32<SpellId>("SpellID");
break;
case PetFeedback.CantAttackTarget:
if (ClientVersion.AddedInVersion(ClientType.Cataclysm))
packet.ReadInt32<SpellId>("Spell ID"); // sub_8ADA60 2nd parameter is SpellID, check sub_8B22C0
packet.ReadInt32<SpellId>("SpellID"); // sub_8ADA60 2nd parameter is SpellID, check sub_8B22C0
break;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,10 @@ public static void HandleLogXPGain(Packet packet)
}

[Parser(Opcode.SMSG_TITLE_EARNED)]
[Parser(Opcode.SMSG_TITLE_REMOVED)]
[Parser(Opcode.SMSG_TITLE_LOST)]
public static void HandleServerTitle(Packet packet)
{
packet.ReadUInt32("Title Id");
packet.ReadInt32("Index");
}
}
}
6 changes: 0 additions & 6 deletions WowPacketParserModule.V5_4_7_17898/Parsers/ItemHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,6 @@ public static void HandleItemSendUpgrade(Packet packet)
packet.WriteGuid("NPC GUID", npcGUID);
}

[Parser(Opcode.SMSG_ITEM_UPGRADE_RESULT)]
public static void HandleItemUpgradeResult(Packet packet)
{
packet.ReadBit("Successful");
}

[Parser(Opcode.CMSG_GET_ITEM_PURCHASE_DATA)]
public static void HandleItemRefundInfo(Packet packet)
{
Expand Down
16 changes: 16 additions & 0 deletions WowPacketParserModule.V6_0_2_19033/Parsers/GuildHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -822,5 +822,21 @@ public static void HandleGuildMemberRecipes(Packet packet)
for (int i = 0; i < 0x12C; i++)
packet.ReadByte("SkillLineBitArray", i);
}

[Parser(Opcode.SMSG_PETITION_DECLINED)]
public static void HandlePetitionDeclined(Packet packet)
{
packet.ReadPackedGuid128("Decliner");
}

[Parser(Opcode.SMSG_PETITION_RENAME_GUILD_RESPONSE)]
public static void HandlePetitionRenameGuildResponse(Packet packet)
{
packet.ReadPackedGuid128("PetitionGuid");
var length = packet.ReadBits("NewGuildNameLength", 7);
packet.ResetBitReader();

packet.ReadWoWString("NewGuildName", length);
}
}
}
10 changes: 9 additions & 1 deletion WowPacketParserModule.V6_0_2_19033/Parsers/InstanceHandler.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System;
using WowPacketParser.Enums;
using WowPacketParser.Misc;
using WowPacketParser.Parsing;
Expand Down Expand Up @@ -211,5 +210,14 @@ public static void HandleInstanceResetFailed(Packet packet)
packet.ReadInt32("MapID");
packet.ReadBits("ResetFailedReason", 2);
}

[Parser(Opcode.SMSG_PENDING_RAID_LOCK)]
public static void HandlePendingRaidLock(Packet packet)
{
packet.ReadInt32("TimeUntilLock");
packet.ReadUInt32("CompletedMask");
packet.ReadBit("Extending");
packet.ReadBit("WarningOnly");
}
}
}
7 changes: 7 additions & 0 deletions WowPacketParserModule.V6_0_2_19033/Parsers/PetHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -223,5 +223,12 @@ public static void HandlePetAdded(Packet packet)
{
ReadPetStableInfo(packet, "PetStableInfo");
}

[Parser(Opcode.SMSG_PET_ACTION_FEEDBACK)]
public static void HandlePetActionFeedback(Packet packet)
{
packet.ReadInt32<SpellId>("SpellID");
packet.ReadByteE<PetFeedback>("Response");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,5 @@ public static void HandleComplaintResult(Packet packet)
packet.ReadUInt32("ComplaintType");
packet.ReadByte("Result");
}

}
}

0 comments on commit 061c32d

Please sign in to comment.