Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Parser(Opcode.SMSG_DISPLAY_PLAYER_CHOICE)]
- public static void HandleDisplayPlayerChoice(Packet packet)
- {
- packet.ReadInt32("ChoiceID");
- var responseCount = packet.ReadUInt32();
- packet.ReadPackedGuid128("SenderGUID");
- packet.ReadInt32("UiTextureKitID");
- packet.ReadUInt32("Unknown");
- packet.ResetBitReader();
- var questionLength = packet.ReadBits(8);
- packet.ReadBit("CloseChoiceFrame");
- packet.ReadBit("HideWarboardHeader");
- packet.ReadBit("KeepOpenAfterChoice");
- for (var i = 0u; i < responseCount; ++i)
- ReadPlayerChoiceResponse(packet, "PlayerChoiceResponse", i);
- packet.ReadWoWString("Question", questionLength);
- }
- public static void ReadPlayerChoiceResponse(Packet packet, params object[] indexes)
- {
- packet.ReadInt32("ResponseID", indexes);
- packet.ReadInt32("ChoiceArtFileID", indexes);
- packet.ReadInt32("Flags", indexes);
- packet.ReadUInt32("WidgetSetID", indexes);
- packet.ReadUInt32("Unk1", indexes);
- packet.ReadUInt32("Unk2", indexes);
- packet.ReadUInt32("Unk3", indexes);
- packet.ReadByte("GroupID", indexes);
- packet.ResetBitReader();
- var answerLength = packet.ReadBits("AnswerLength", 9, indexes);
- var headerLength = packet.ReadBits("HeaderLength", 9, indexes);
- var UnkLength = packet.ReadBits("UnkLength", 7, indexes);
- var confirmationTextLength = packet.ReadBits("ConfirmationLength", 9, indexes);
- var descriptionLength = packet.ReadBits("DescriptionLength", 11, indexes);
- var UnkLength2 = packet.ReadBits("UnkLength2", 7, indexes);
- var hasReward = packet.ReadBit();
- if (hasReward)
- ReadPlayerChoiceResponseReward(packet, "PlayerChoiceResponseReward", indexes);
- packet.ReadWoWString("Answer", answerLength, indexes);
- packet.ReadWoWString("Header", headerLength, indexes);
- packet.ReadWoWString("Description", descriptionLength, indexes);
- packet.ReadWoWString("ConfirmationText", confirmationTextLength, indexes);
- packet.ReadWoWString("UnkText", UnkLength, indexes);
- packet.ReadWoWString("UnkText2", UnkLength2, indexes);
- }
- public static void ReadPlayerChoiceResponseReward(Packet packet, params object[] indexes)
- {
- packet.ResetBitReader();
- packet.ReadInt32("TitleID", indexes);
- packet.ReadInt32("PackageID", indexes);
- packet.ReadInt32("SkillLineID", indexes);
- packet.ReadUInt32("SkillPointCount", indexes);
- packet.ReadUInt32("ArenaPointCount", indexes);
- packet.ReadUInt32("HonorPointCount", indexes);
- packet.ReadUInt64("Money", indexes);
- packet.ReadUInt32("Xp", indexes);
- var itemCount = packet.ReadUInt32();
- var currencyCount = packet.ReadUInt32();
- var factionCount = packet.ReadUInt32();
- var itemChoiceCount = packet.ReadUInt32();
- for (var i = 0u; i < itemCount; ++i)
- ReadRewardItem(packet, "Item", i);
- for (var i = 0u; i < currencyCount; ++i)
- ReadRewardItem(packet, "Currency", i);
- for (var i = 0u; i < factionCount; ++i)
- ReadRewardItem(packet, "Faction", i);
- for (var i = 0u; i < itemChoiceCount; ++i)
- ReadRewardItem(packet, "ItemChoice", i);
- }
Advertisement
Add Comment
Please, Sign In to add comment