本文整理汇总了C#中WowPacketParser.Misc.Packet.ReadInt32方法的典型用法代码示例。如果您正苦于以下问题:C# Packet.ReadInt32方法的具体用法?C# Packet.ReadInt32怎么用?C# Packet.ReadInt32使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WowPacketParser.Misc.Packet
的用法示例。
在下文中一共展示了Packet.ReadInt32方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HandleGameTimeUpdate
public static void HandleGameTimeUpdate(Packet packet)
{
packet.ReadPackedTime("ServerTime");
packet.ReadPackedTime("GameTime");
packet.ReadInt32("ServerTimeHolidayOffset");
packet.ReadInt32("GameTimeHolidayOffset");
}
示例2: HandleAchievementEarned
public static void HandleAchievementEarned(Packet packet)
{
packet.ReadPackedGuid("Player GUID");
packet.ReadInt32("Achievement");
packet.ReadPackedTime("Time");
packet.ReadInt32("Unk Int32");
}
示例3: Handle13516
public static void Handle13516(Packet packet)
{
packet.ReadByte("Unk");
packet.ReadInt32("Unk");
packet.ReadSingle("Unk");
packet.ReadInt32("Unk");
}
示例4: HandleAddCalendarEvent
public static void HandleAddCalendarEvent(Packet packet)
{
packet.ReadCString("Title");
packet.ReadCString("Description");
packet.ReadEnum<CalendarEventType>("Event Type", TypeCode.Byte);
packet.ReadEnum<CalendarRepeatType>("Repeat Type", TypeCode.Byte);
packet.ReadInt32("Max Invites");
packet.ReadEntryWithName<Int32>(StoreNameType.LFGDungeon, "Dungeon ID");
packet.ReadPackedTime("Event Time");
packet.ReadPackedTime("Unk PackedTime");
var flags = packet.ReadEnum<CalendarFlag>("Event Flags", TypeCode.Int32);
if ((flags & CalendarFlag.GuildAnnouncement) != 0)
return;
var count = packet.ReadInt32("Invite Count");
for (var i = 0; i < count; i++)
{
packet.ReadPackedGuid("Creator GUID");
packet.ReadEnum<CalendarEventStatus>("Status", TypeCode.Byte);
packet.ReadEnum<CalendarModerationRank>("Moderation Rank", TypeCode.Byte);
}
}
示例5: HandleGuildAchievementData
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);
}
}
示例6: HandleBattlePayDistributionAssignToTarget
public static void HandleBattlePayDistributionAssignToTarget(Packet packet)
{
packet.ReadInt32("ClientToken");
packet.ReadInt64("DistributionID");
packet.ReadPackedGuid128("TargetCharacter");
packet.ReadInt32("ProductChoice");
}
示例7: HandleGuildPartyStateResponse
public static void HandleGuildPartyStateResponse(Packet packet)
{
packet.ReadSingle("Guild XP multiplier");
packet.ReadInt32("Int10");
packet.ReadInt32("Int14");
packet.ReadBit("Is guild group");
}
示例8: HandleServerUpdateAccountData
public static void HandleServerUpdateAccountData(Packet packet)
{
var guid = new byte[8];
packet.ReadBitsE<AccountDataType>("Data Type", 3);
packet.StartBitStream(guid, 5, 1, 3, 7, 0, 4, 2, 6);
packet.ReadXORBytes(guid, 3, 1, 5);
var decompCount = packet.ReadInt32();
var compCount = packet.ReadInt32();
var pkt = packet.Inflate(compCount, decompCount, false);
var data = pkt.ReadWoWString(decompCount);
pkt.ClosePacket(false);
packet.AddValue("Account Data", data);
packet.ReadXORBytes(guid, 7, 4, 0, 6, 2);
packet.ReadTime("Login Time");
packet.WriteGuid("GUID", guid);
}
示例9: HandleSpellHealLog
public static void HandleSpellHealLog(Packet packet)
{
packet.ReadPackedGuid128("TargetGUID");
packet.ReadPackedGuid128("CasterGUID");
packet.ReadInt32<SpellId>("SpellID");
packet.ReadInt32("Health");
packet.ReadInt32("OverHeal");
packet.ReadInt32("Absorbed");
packet.ResetBitReader();
packet.ReadBit("Crit");
var hasCritRollMade = packet.ReadBit("HasCritRollMade");
var hasCritRollNeeded = packet.ReadBit("HasCritRollNeeded");
var hasLogData = packet.ReadBit("HasLogData");
var hasSandboxScaling = packet.ReadBit("HasLogData");
if (hasCritRollMade)
packet.ReadSingle("CritRollMade");
if (hasCritRollNeeded)
packet.ReadSingle("CritRollNeeded");
if (hasLogData)
SpellHandler.ReadSpellCastLogData(packet);
if (hasSandboxScaling)
ReadSandboxScalingData(packet, "SandboxScalingData");
}
示例10: HandlePetSpells
public static void HandlePetSpells(Packet packet)
{
packet.ReadPackedGuid128("PetGUID");
packet.ReadInt16("CreatureFamily");
packet.ReadInt16("Specialization");
packet.ReadInt32("TimeLimit");
ReadPetFlags(packet, "PetModeAndOrders");
const int maxCreatureSpells = 10;
for (var i = 0; i < maxCreatureSpells; i++) // Read pet / vehicle spell ids
V6_0_2_19033.Parsers.PetHandler.ReadPetAction(packet, "ActionButtons", i);
var actionsCount = packet.ReadInt32("ActionsCount");
var cooldownsCount = packet.ReadUInt32("CooldownsCount");
var spellHistoryCount = packet.ReadUInt32("SpellHistoryCount");
for (int i = 0; i < actionsCount; i++)
V6_0_2_19033.Parsers.PetHandler.ReadPetAction(packet, i, "Actions");
for (int i = 0; i < cooldownsCount; i++)
V6_0_2_19033.Parsers.PetHandler.ReadPetSpellCooldownData(packet, i, "PetSpellCooldown");
for (int i = 0; i < spellHistoryCount; i++)
V6_0_2_19033.Parsers.PetHandler.ReadPetSpellHistoryData(packet, i, "PetSpellHistory");
}
示例11: HandleContactList
public static void HandleContactList(Packet packet)
{
packet.ReadEnum<ContactListFlag>("List Flags", TypeCode.Int32);
var count = packet.ReadInt32("Count");
for (var i = 0; i < count; i++)
{
packet.ReadGuid("GUID");
packet.ReadInt32("Unk int1");
packet.ReadInt32("Unk int2");
var flag = packet.ReadEnum<ContactEntryFlag>("Flags", TypeCode.Int32);
packet.ReadCString("Note");
if (!flag.HasAnyFlag(ContactEntryFlag.Friend))
continue;
var status = packet.ReadEnum<ContactStatus>("Status", TypeCode.Byte);
if (status == 0) // required any flag
continue;
packet.ReadEntry<Int32>(StoreNameType.Area, "Area");
packet.ReadInt32("Level");
packet.ReadEnum<Class>("Class", TypeCode.Int32);
}
// still needed?
if (packet.CanRead())
CoreParsers.WardenHandler.ReadCheatCheckDecryptionBlock(ref packet);
}
示例12: 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);
}
示例13: HandleGroupInvite
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);
}
示例14: HandleArchaeologySyrveryCast
public static void HandleArchaeologySyrveryCast(Packet packet)
{
packet.ReadInt32("unk24"); // 24
packet.ReadInt32("unk20"); // 20
packet.ReadInt32("unk16"); // 16
packet.ReadBit("unk28"); // 28
}
示例15: HandleAlterAppearance
public static void HandleAlterAppearance(Packet packet)
{
packet.ReadInt32("Hair Style");
packet.ReadInt32("Hair Color");
packet.ReadInt32("Facial Hair");
packet.ReadInt32("Skin Color");
}