本文整理汇总了C#中WowPacketParser.Misc.Packet.ReadPackedGuid方法的典型用法代码示例。如果您正苦于以下问题:C# Packet.ReadPackedGuid方法的具体用法?C# Packet.ReadPackedGuid怎么用?C# Packet.ReadPackedGuid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WowPacketParser.Misc.Packet
的用法示例。
在下文中一共展示了Packet.ReadPackedGuid方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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);
}
}
示例2: HandleAchievementEarned
public static void HandleAchievementEarned(Packet packet)
{
packet.ReadPackedGuid("Player GUID");
packet.ReadInt32("Achievement");
packet.ReadPackedTime("Time");
packet.ReadInt32("Unk Int32");
}
示例3: HandleEnchantmentLog
public static void HandleEnchantmentLog(Packet packet)
{
packet.ReadPackedGuid("Target");
packet.ReadPackedGuid("Caster");
packet.ReadEntryWithName<Int32>(StoreNameType.Item, "Item Entry");
packet.ReadUInt32("Enchantment ID?");
}
示例4: HandleChangeSeatsOnControlledVehicle
public static void HandleChangeSeatsOnControlledVehicle(Packet packet)
{
packet.ReadPackedGuid("Vehicle GUID");
// FIXME: 3.3.3a has some data here
packet.ReadPackedGuid("Accesory GUID");
packet.ReadByte("Seat");
}
示例5: 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");
}
}
示例6: HandleAuraCastLog
public static void HandleAuraCastLog(Packet packet)
{
packet.ReadPackedGuid("Target GUID");
packet.ReadPackedGuid("Caster GUID");
packet.ReadEntryWithName<Int32>(StoreNameType.Spell, "Spell ID");
packet.ReadUInt32("Count");
var aura = packet.ReadEnum<AuraType>("Aura Type", TypeCode.UInt32);
switch (aura)
{
case AuraType.PeriodicDamage:
case AuraType.PeriodicDamagePercent:
{
packet.ReadUInt32("Damage");
if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_0_2_9056))
packet.ReadUInt32("Over damage");
packet.ReadUInt32("Spell Proto");
packet.ReadUInt32("Absorb");
packet.ReadUInt32("Resist");
if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_1_2_9901))
packet.ReadByte("Critical");
break;
}
case AuraType.PeriodicHeal:
case AuraType.ObsModHealth:
{
packet.ReadUInt32("Damage");
if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_0_2_9056))
packet.ReadUInt32("Over damage");
if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_3_3_11685)) // no idea when this was added exactly
packet.ReadUInt32("Absorb");
if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_1_2_9901))
packet.ReadByte("Critical");
break;
}
case AuraType.ObsModPower:
case AuraType.PeriodicEnergize:
{
packet.ReadEnum<PowerType>("Power type", TypeCode.Int32);
packet.ReadUInt32("Amount");
break;
}
case AuraType.PeriodicManaLeech:
{
packet.ReadEnum<PowerType>("Power type", TypeCode.Int32);
packet.ReadUInt32("Amount");
packet.ReadSingle("Gain multiplier");
break;
}
}
}
示例7: HandleUpdateObject
public static void HandleUpdateObject(Packet packet)
{
uint map = MovementHandler.CurrentMapId;
if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_0_1_13164))
map = packet.ReadUInt16("Map");
var count = packet.ReadUInt32("Count");
if (ClientVersion.RemovedInVersion(ClientVersionBuild.V3_0_2_9056))
packet.ReadBoolean("Has Transport");
for (var i = 0; i < count; i++)
{
var type = packet.ReadByte();
var typeString = ClientVersion.AddedInVersion(ClientType.Cataclysm) ? ((UpdateTypeCataclysm)type).ToString() : ((UpdateType)type).ToString();
packet.WriteLine("[" + i + "] UpdateType: " + typeString);
switch (typeString)
{
case "Values":
{
var guid = packet.ReadPackedGuid("GUID", i);
WoWObject obj;
var updates = ReadValuesUpdateBlock(ref packet, guid.GetObjectType(), i, false);
if (Storage.Objects.TryGetValue(guid, out obj))
{
if (obj.ChangedUpdateFieldsList == null)
obj.ChangedUpdateFieldsList = new List<Dictionary<int, UpdateField>>();
obj.ChangedUpdateFieldsList.Add(updates);
}
break;
}
case "Movement":
{
var guid = ClientVersion.AddedInVersion(ClientVersionBuild.V3_1_2_9901) ? packet.ReadPackedGuid("GUID", i) : packet.ReadGuid("GUID", i);
ReadMovementUpdateBlock(ref packet, guid, i);
// Should we update Storage.Object?
break;
}
case "CreateObject1":
case "CreateObject2": // Might != CreateObject1 on Cata
{
var guid = packet.ReadPackedGuid("GUID", i);
ReadCreateObjectBlock(ref packet, guid, map, i);
break;
}
case "FarObjects":
case "NearObjects":
case "DestroyObjects":
{
ReadObjectsBlock(ref packet, i);
break;
}
}
}
}
示例8: HandleDestructibleBuildingDamage
public static void HandleDestructibleBuildingDamage(Packet packet)
{
packet.ReadPackedGuid("GO GUID");
packet.ReadPackedGuid("Vehicle GUID");
packet.ReadPackedGuid("Player GUID");
packet.ReadInt32("Damage");
packet.ReadInt32<SpellId>("Spell ID");
}
示例9: HandleDestructibleBuildingDamage
public static void HandleDestructibleBuildingDamage(Packet packet)
{
packet.ReadPackedGuid("GO GUID");
packet.ReadPackedGuid("Vehicle GUID:");
packet.ReadPackedGuid("Player GUID");
packet.ReadInt32("Damage");
packet.ReadEntryWithName<Int32>(StoreNameType.Spell, "Spell ID");
}
示例10: HandleAttackerStateUpdate
public static void HandleAttackerStateUpdate(Packet packet)
{
var hitInfo = packet.ReadEnum<SpellHitInfo>("HitInfo", TypeCode.Int32);
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);
}
var victimStateTypeCode = ClientVersion.AddedInVersion(ClientVersionBuild.V3_0_3_9183) ? TypeCode.Byte : TypeCode.Int32;
packet.ReadEnum<VictimStates>("VictimState", victimStateTypeCode);
packet.ReadInt32("Unk Attacker State 0");
packet.ReadEntryWithName<Int32>(StoreNameType.Spell, "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");
packet.ReadSingle("Unk Attacker State 3");
packet.ReadSingle("Unk Attacker State 3");
packet.ReadSingle("Unk Attacker State 3");
packet.ReadSingle("Unk Attacker State 3");
packet.ReadSingle("Unk Attacker State 3");
packet.ReadSingle("Unk Attacker State 3");
packet.ReadSingle("Unk Attacker State 3");
packet.ReadSingle("Unk Attacker State 3");
packet.ReadSingle("Unk Attacker State 3");
packet.ReadSingle("Unk Attacker State 3");
packet.ReadInt32("Unk Attacker State 3");
packet.ReadInt32("Unk Attacker State 3");
packet.ReadInt32("Unk Attacker State 3");
}
}
示例11: HandleAttackerStateUpdate406
public static void HandleAttackerStateUpdate406(Packet packet)
{
var hitInfo = packet.ReadEnum<SpellHitInfo>("HitInfo", TypeCode.Int32);
packet.ReadPackedGuid("AttackerGUID");
packet.ReadPackedGuid("TargetGUID");
packet.ReadInt32("Damage");
packet.ReadInt32("OverDamage");
var subDmgCount = packet.ReadByte("Count");
for (var i = 0; i < subDmgCount; ++i)
{
packet.ReadInt32("SchoolMask", i);
packet.ReadSingle("Float Damage", i);
packet.ReadInt32("Int Damage", i);
}
if (hitInfo.HasAnyFlag(SpellHitInfo.HITINFO_PARTIAL_ABSORB | SpellHitInfo.HITINFO_FULL_ABSORB))
for (var i = 0; i < subDmgCount; ++i)
packet.ReadInt32("Damage Absorbed", i);
if (hitInfo.HasAnyFlag(SpellHitInfo.HITINFO_PARTIAL_RESIST | SpellHitInfo.HITINFO_FULL_RESIST))
for (var i = 0; i < subDmgCount; ++i)
packet.ReadInt32("Damage Resisted", i);
packet.ReadEnum<VictimStates>("VictimState", TypeCode.Byte);
packet.ReadInt32("Unk Attacker State 0");
packet.ReadEntryWithName<Int32>(StoreNameType.Spell, "Melee Spell ID ");
if (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");
}
if (ClientVersion.AddedInVersion(ClientVersionBuild.V5_1_0_16309))
if (hitInfo.HasAnyFlag(SpellHitInfo.HITINFO_BLOCK | SpellHitInfo.HITINFO_UNK12))
packet.ReadSingle("Unk Float");
}
示例12: HandleChangeSeatsOnControlledVehicle
public static void HandleChangeSeatsOnControlledVehicle(Packet packet)
{
var guid = packet.ReadPackedGuid("Vehicle GUID");
if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_3_3a_11723))
MovementHandler.ReadMovementInfo(ref packet, guid);
packet.ReadPackedGuid("Accessory GUID");
packet.ReadByte("Seat");
}
示例13: ReadSetInfo
public static void ReadSetInfo(Packet packet)
{
packet.ReadPackedGuid("Set ID");
packet.ReadInt32("Index");
packet.ReadCString("Set Name");
packet.ReadCString("Set Icon");
for (var j = 0; j < NumSlots; j++)
packet.ReadPackedGuid("Item GUID " + j);
}
示例14: HandleInspectResultsUpdate
public static void HandleInspectResultsUpdate(Packet packet)
{
if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_3_4_15595)) // confirmed for 4.3.4
packet.ReadPackedGuid("GUID");
else if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_0_6a_13623))
packet.ReadGuid("GUID");
else
packet.ReadPackedGuid("GUID");
ReadInspectPart(ref packet);
}
示例15: HandleCriteriaUpdate
public static void HandleCriteriaUpdate(Packet packet)
{
packet.ReadInt32("Criteria ID");
packet.ReadPackedGuid("Criteria Counter");
packet.ReadPackedGuid("Player GUID");
packet.ReadInt32("Unk Int32");
packet.ReadPackedTime("Time");
for (var i = 0; i < 2; i++)
packet.ReadInt32("Timer " + i);
}