本文整理汇总了C#中WowPacketParser.Misc.Packet.ReadInt32E方法的典型用法代码示例。如果您正苦于以下问题:C# Packet.ReadInt32E方法的具体用法?C# Packet.ReadInt32E怎么用?C# Packet.ReadInt32E使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WowPacketParser.Misc.Packet
的用法示例。
在下文中一共展示了Packet.ReadInt32E方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HandleContactList
public static void HandleContactList(Packet packet)
{
packet.ReadInt32E<ContactListFlag>("List Flags");
var count = packet.ReadInt32("Count");
for (var i = 0; i < count; i++)
{
packet.ReadGuid("GUID");
packet.ReadInt32("Realm Id");
packet.ReadInt32("Realm Id");
var flag = packet.ReadInt32E<ContactEntryFlag>("Flags");
packet.ReadCString("Note");
if (!flag.HasAnyFlag(ContactEntryFlag.Friend))
continue;
var status = packet.ReadByteE<ContactStatus>("Status");
if (status == 0) // required any flag
continue;
packet.ReadInt32<AreaId>("Area");
packet.ReadInt32("Level");
packet.ReadInt32E<Class>("Class");
}
// still needed?
if (packet.CanRead())
CoreParsers.WardenHandler.ReadCheatCheckDecryptionBlock(packet);
}
示例2: HandleAttackerStateUpdate
public static void HandleAttackerStateUpdate(Packet packet)
{
var hitInfo = packet.ReadInt32E<SpellHitInfo>("HitInfo");
packet.ReadPackedGuid("AttackerGUID");
packet.ReadPackedGuid("TargetGUID");
packet.ReadInt32("Damage");
if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_0_3_9183))
packet.ReadInt32("OverDamage");
var subDmgCount = packet.ReadByte();
for (var i = 0; i < subDmgCount; ++i)
{
packet.ReadInt32("SchoolMask", i);
packet.ReadSingle("Float Damage", i);
packet.ReadInt32("Int Damage", i);
if (ClientVersion.RemovedInVersion(ClientVersionBuild.V3_0_3_9183) ||
hitInfo.HasAnyFlag(SpellHitInfo.HITINFO_PARTIAL_ABSORB | SpellHitInfo.HITINFO_FULL_ABSORB))
packet.ReadInt32("Damage Absorbed", i);
if (ClientVersion.RemovedInVersion(ClientVersionBuild.V3_0_3_9183) ||
hitInfo.HasAnyFlag(SpellHitInfo.HITINFO_PARTIAL_RESIST | SpellHitInfo.HITINFO_FULL_RESIST))
packet.ReadInt32("Damage Resisted", i);
}
if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_0_3_9183))
packet.ReadByteE<VictimStates>("VictimState");
else
packet.ReadInt32E<VictimStates>("VictimState");
packet.ReadInt32("Unk Attacker State 0");
packet.ReadInt32<SpellId>("Melee Spell ID ");
if (ClientVersion.RemovedInVersion(ClientVersionBuild.V3_0_3_9183) ||
hitInfo.HasAnyFlag(SpellHitInfo.HITINFO_BLOCK))
packet.ReadInt32("Block Amount");
if (hitInfo.HasAnyFlag(SpellHitInfo.HITINFO_RAGE_GAIN))
packet.ReadInt32("Rage Gained");
if (hitInfo.HasAnyFlag(SpellHitInfo.HITINFO_UNK0))
{
packet.ReadInt32("Unk Attacker State 3 1");
packet.ReadSingle("Unk Attacker State 3 2");
packet.ReadSingle("Unk Attacker State 3 3");
packet.ReadSingle("Unk Attacker State 3 4");
packet.ReadSingle("Unk Attacker State 3 5");
packet.ReadSingle("Unk Attacker State 3 6");
packet.ReadSingle("Unk Attacker State 3 7");
packet.ReadSingle("Unk Attacker State 3 8");
packet.ReadSingle("Unk Attacker State 3 9");
packet.ReadSingle("Unk Attacker State 3 10");
packet.ReadSingle("Unk Attacker State 3 11");
packet.ReadInt32("Unk Attacker State 3 12");
packet.ReadInt32("Unk Attacker State 3 13");
packet.ReadInt32("Unk Attacker State 3 14");
}
}
示例3: HandleContactList
public static void HandleContactList(Packet packet)
{
packet.ReadInt32E<ContactListFlag>("List Flags");
var count = packet.ReadInt32("Count");
for (var i = 0; i < count; i++)
{
packet.ReadGuid("GUID");
packet.ReadInt32("Realm Id");
packet.ReadInt32("Realm Id");
var flag = packet.ReadInt32E<ContactEntryFlag>("Flags");
packet.ReadCString("Note");
if (!flag.HasAnyFlag(ContactEntryFlag.Friend))
continue;
var status = packet.ReadByteE<ContactStatus>("Status");
if (status == 0) // required any flag
continue;
packet.ReadInt32<AreaId>("Area");
packet.ReadInt32("Level");
packet.ReadInt32E<Class>("Class");
}
}
示例4: HandleComplain
public static void HandleComplain(Packet packet)
{
bool fromChat = packet.ReadBool("From Chat"); // false = from mail
packet.ReadGuid("Guid");
packet.ReadInt32E<Language>("Language");
packet.ReadInt32E<ChatMessageType>("Type");
packet.ReadInt32("Channel ID");
if (fromChat)
{
packet.ReadTime("Time ago");
packet.ReadCString("Complain");
}
}
示例5: HandleInstanceDifficulty
public static void HandleInstanceDifficulty(Packet packet)
{
packet.ReadInt32E<MapDifficulty>("Difficulty");
if (ClientVersion.AddedInVersion(ClientType.WrathOfTheLichKing)
&& ClientVersion.RemovedInVersion(ClientType.Cataclysm))
packet.ReadInt32("Player Difficulty");
}
示例6: HandleLootMethod
public static void HandleLootMethod(Packet packet)
{
packet.ReadByte("PartyIndex");
packet.ReadByteE<LootMethod>("Method");
packet.ReadPackedGuid128("Master");
packet.ReadInt32E<ItemQuality>("Threshold");
}
示例7: HandleAddCalendarEvent
public static void HandleAddCalendarEvent(Packet packet)
{
packet.ReadCString("Title");
packet.ReadCString("Description");
packet.ReadByteE<CalendarEventType>("Event Type");
packet.ReadByteE<CalendarRepeatType>("Repeat Type");
packet.ReadInt32("Max Invites");
packet.ReadInt32<LFGDungeonId>("Dungeon ID");
packet.ReadPackedTime("Event Time");
packet.ReadPackedTime("Unk PackedTime");
var flags = packet.ReadInt32E<CalendarFlag>("Event Flags");
if ((flags & CalendarFlag.GuildAnnouncement) != 0)
return;
var count = packet.ReadInt32("Invite Count");
for (var i = 0; i < count; i++)
{
packet.ReadPackedGuid("Creator GUID");
packet.ReadByteE<CalendarEventStatus>("Status");
packet.ReadByteE<CalendarModerationRank>("Moderation Rank");
}
}
示例8: HandleCalendarEventInviteAlert
public static void HandleCalendarEventInviteAlert(Packet packet)
{
// TODO: find unks
packet.ReadUInt64("EventID");
packet.ReadPackedTime("Date");
packet.ReadInt32E<CalendarFlag>("Flags");
packet.ReadByteE<CalendarEventType>("EventType");
packet.ReadInt32("TextureID");
packet.ReadPackedGuid128("EventGuildID");
packet.ReadUInt64("InviteID");
packet.ReadByteE<CalendarEventStatus>("Status");
packet.ReadByteE<CalendarModerationRank>("ModeratorStatus");
packet.ReadPackedGuid128("OwnerGUID | InvitedByGUID");
packet.ReadPackedGuid128("OwnerGUID | InvitedByGUID");
var eventNameLength = packet.ReadBits("EventNameLength", 8);
packet.ResetBitReader();
packet.ReadWoWString("EventName", eventNameLength);
}
示例9: HandleCalendarCommandResult
public static void HandleCalendarCommandResult(Packet packet)
{
packet.ReadInt32("UnkInt1");
packet.ReadCString("UnkString1");
packet.ReadCString("Param 1"); // if %s is used in the error message
packet.ReadInt32E<CalendarError>("Error");
}
示例10: HandleContactList
public static void HandleContactList(Packet packet)
{
packet.ReadInt32E<ContactListFlag>("List Flags");
var bits6 = packet.ReadBits("ContactInfoCount", 8);
for (var i = 0; i < bits6; i++)
{
packet.ReadPackedGuid128("Guid", i);
packet.ReadPackedGuid128("WowAccount", i);
packet.ReadInt32("VirtualRealmAddr", i);
packet.ReadInt32("NativeRealmAddr", i);
packet.ReadInt32("TypeFlags", i);
packet.ReadByte("Status", i);
packet.ReadInt32("AreaID", i);
packet.ReadInt32("Level", i);
packet.ReadInt32("ClassID", i);
packet.ResetBitReader();
var bits44 = packet.ReadBits(10);
packet.ReadWoWString("Notes", bits44, i);
}
}
示例11: HandleClientChatMessageChannel434
public static void HandleClientChatMessageChannel434(Packet packet)
{
packet.ReadInt32E<Language>("Language");
var channelNameLen = packet.ReadBits(9);
var msgLen = packet.ReadBits(8);
packet.ReadWoWString("Message", msgLen);
packet.ReadWoWString("Channel Name", channelNameLen);
}
示例12: HandleAuctionListItems
public static void HandleAuctionListItems(Packet packet)
{
packet.ReadInt32("Offset");
packet.ReadPackedGuid128("Auctioneer");
packet.ReadByte("MinLevel");
packet.ReadByte("MaxLevel");
packet.ReadInt32E<ItemQuality>("Quality");
var sort = packet.ReadByte("SortCount");
var knownPetsCount = packet.ReadUInt32("KnownPetsCount");
packet.ReadByte("MaxPetLevel");
for (int i = 0; i < knownPetsCount; ++i)
packet.ReadByte("KnownPets", i);
var nameLength = packet.ReadBits(8);
packet.ReadWoWString("Name", nameLength);
var classFiltersCount = packet.ReadBits("ClassFiltersCount", 3);
packet.ReadBit("OnlyUsable");
packet.ReadBit("ExactMatch");
packet.ResetBitReader();
for (int i = 0; i < classFiltersCount; ++i)
{
packet.ReadInt32E<ItemClass>("ItemClass", "ClassFilters", i);
var subClassFiltersCount = packet.ReadBits("SubClassFiltersCount", 5, "ClassFilters", i);
for (int j = 0; j < subClassFiltersCount; ++j)
{
packet.ReadInt32("ItemSubclass", "ClassFilters", i, "SubClassFilters", j);
packet.ReadUInt32("InvTypeMask", "ClassFilters", i, "SubClassFilters", j);
}
}
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("Type", i);
sorts.ReadByte("Direction", i);
}
}
示例13: HandleAIReaction
public static void HandleAIReaction(Packet packet)
{
var guid = packet.StartBitStream(5, 7, 0, 4, 6, 2, 3, 1);
packet.ParseBitStream(guid, 4, 6, 5);
packet.ReadInt32E<AIReaction>("Reaction");
packet.ParseBitStream(guid, 7, 1, 2, 0, 3);
packet.WriteGuid("Guid", guid);
}
示例14: HandleHotfixNotify
public static void HandleHotfixNotify(Packet packet)
{
var tableHash = packet.ReadInt32E<DB2Hash>("TableHash");
var recordID = packet.ReadInt32("RecordID");
var timestamp = packet.ReadUInt32("Timestamp");
Storage.AddHotfixData(recordID, tableHash, false, timestamp);
}
示例15: HandleClientChatMessageWhisper
public static void HandleClientChatMessageWhisper(Packet packet)
{
packet.ReadInt32E<Language>("Language");
var msgLen = packet.ReadBits(8);
var recvName = packet.ReadBits(9);
packet.ReadWoWString("Message", msgLen);
packet.ReadWoWString("Receivers Name", recvName);
}