本文整理汇总了C#中WowPacketParser.Misc.Packet.ReadVector3方法的典型用法代码示例。如果您正苦于以下问题:C# Packet.ReadVector3方法的具体用法?C# Packet.ReadVector3怎么用?C# Packet.ReadVector3使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WowPacketParser.Misc.Packet
的用法示例。
在下文中一共展示了Packet.ReadVector3方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HandleAreaTriggerReShape
public static void HandleAreaTriggerReShape(Packet packet)
{
packet.ReadPackedGuid128("TriggerGUID");
packet.ResetBitReader();
var hasAreaTriggerSpline = packet.ReadBit("HasAreaTriggerSpline");
var hasAreaTriggerUnkType = packet.ReadBit("HasAreaTriggerUnkType");
if (hasAreaTriggerSpline)
ReadAreaTriggerSpline(packet);
if (hasAreaTriggerUnkType)
{
packet.ResetBitReader();
var unk1 = packet.ReadBit("AreaTriggerUnk1");
var hasCenter = packet.ReadBit("HasCenter");
packet.ReadBit("Unk bit 703 1");
packet.ReadBit("Unk bit 703 2");
packet.ReadUInt32("Unk UInt 1");
packet.ReadInt32("Unk Int 1");
packet.ReadUInt32("Unk UInt 2");
packet.ReadSingle("Radius");
packet.ReadSingle("BlendFromRadius");
packet.ReadSingle("InitialAngel");
packet.ReadSingle("ZOffset");
if (unk1)
packet.ReadPackedGuid128("AreaTriggerUnkGUID");
if (hasCenter)
packet.ReadVector3("Center");
}
}
示例2: HandleCharEnum
public static void HandleCharEnum(Packet packet)
{
var count = packet.ReadByte("Count");
for (var i = 0; i < count; i++)
{
var guid = packet.ReadGuid("GUID");
var name = packet.ReadCString("Name");
var race = packet.ReadEnum<Race>("Race", TypeCode.Byte);
var clss = packet.ReadEnum<Class>("Class", TypeCode.Byte);
packet.ReadEnum<Gender>("Gender", TypeCode.Byte);
packet.ReadByte("Skin");
packet.ReadByte("Face");
packet.ReadByte("Hair Style");
packet.ReadByte("Hair Color");
packet.ReadByte("Facial Hair");
var level = packet.ReadByte("Level");
var zone = packet.ReadEntryWithName<UInt32>(StoreNameType.Zone, "Zone Id");
var mapId = packet.ReadEntryWithName<Int32>(StoreNameType.Map, "Map Id");
var pos = packet.ReadVector3("Position");
packet.ReadInt32("Guild Id");
packet.ReadEnum<CharacterFlag>("Character Flags", TypeCode.Int32);
if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_0_2_9056))
packet.ReadEnum<CustomizationFlag>("Customization Flags", TypeCode.Int32);
var firstLogin = packet.ReadBoolean("First Login");
packet.ReadInt32("Pet Display Id");
packet.ReadInt32("Pet Level");
packet.ReadEnum<CreatureFamily>("Pet Family", TypeCode.Int32);
for (var j = 0; j < 19; j++)
{
packet.ReadInt32("Equip Display Id");
packet.ReadEnum<InventoryType>("Equip Inventory Type", TypeCode.Byte);
packet.ReadInt32("Equip Aura Id");
}
int bagCount = ClientVersion.AddedInVersion(ClientVersionBuild.V3_3_3_11685) ? 4 : 1;
for (var j = 0; j < bagCount; j++)
{
packet.ReadInt32("Bag Display Id");
packet.ReadEnum<InventoryType>("Bag Inventory Type", TypeCode.Byte);
packet.ReadInt32("Bag Aura Id");
}
if (firstLogin)
{
var startPos = new StartPosition {Map = mapId, Position = pos, Zone = zone};
packet.SniffFileInfo.Storage.StartPositions.TryAdd(new Tuple<Race, Class>(race, clss), startPos);
}
var playerInfo = new Player {Race = race, Class = clss, Name = name, FirstLogin = firstLogin, Level = level};
packet.SniffFileInfo.Storage.Objects.AddOrUpdate(guid, playerInfo);
}
}
示例3: HandleBindPointUpdate
public static void HandleBindPointUpdate(Packet packet)
{
packet.ReadVector3("Position");
packet.ReadEntryWithName<Int32>(StoreNameType.Map, "Map ID");
packet.ReadInt32("Zone ID");
}
示例4: HandleCorpseLocation
public static void HandleCorpseLocation(Packet packet)
{
packet.ReadBit("Valid");
packet.ReadInt32("ActualMapID");
packet.ReadVector3("Position");
packet.ReadInt32("MapID");
packet.ReadPackedGuid128("Transport");
}
示例5: HandlePetAction
public static void HandlePetAction(Packet packet)
{
packet.ReadPackedGuid128("PetGUID");
var action = (uint)packet.ReadUInt16() + (packet.ReadByte() << 16);
packet.AddValue("Action", action);
packet.ReadByte("Slot");
packet.ReadPackedGuid128("TargetGUID");
packet.ReadVector3("ActionPosition");
}
示例6: ReadAreaTriggerSpline
public static void ReadAreaTriggerSpline(Packet packet, params object[] indexes)
{
packet.ReadInt32("TimeToTarget", indexes);
packet.ReadInt32("ElapsedTimeForMovement", indexes);
var int8 = packet.ReadInt32("VerticesCount", indexes);
for (var i = 0; i < int8; ++i)
packet.ReadVector3("Points", indexes, i);
}
示例7: HandlePetAction
public static void HandlePetAction(Packet packet)
{
packet.ReadPackedGuid128("PetGUID");
ReadPetAction(packet, "Action");
packet.ReadPackedGuid128("TargetGUID");
packet.ReadVector3("ActionPosition");
}
示例8: HandleGMTicketCreate
public static void HandleGMTicketCreate(Packet packet)
{
packet.ReadEntryWithName<Int32>(StoreNameType.Map, "Map ID");
var vector = packet.ReadVector3();
packet.Writer.WriteLine("Position: {0}", vector);
packet.ReadCString("Text");
packet.ReadUInt32("Unk UInt32 1");
packet.ReadBoolean("Need Response");
// FIXME: 3.3.3a has many more data here..
}
示例9: HandlePetAction
public static void HandlePetAction(Packet packet)
{
packet.ReadGuid("GUID");
var action = (uint)packet.ReadUInt16() + (packet.ReadByte() << 16);
packet.AddValue("Action", action);
packet.ReadByteE<ActionButtonType>("Type");
packet.ReadGuid("GUID");
if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_0_6_13596))
packet.ReadVector3("Position");
}
示例10: HandlePetAction
public static void HandlePetAction(Packet packet)
{
packet.ReadGuid("GUID");
var action = (uint)packet.ReadUInt16() + (packet.ReadByte() << 16);
packet.WriteLine("Action: {0}", action);
packet.ReadEnum<ActionButtonType>("Type", TypeCode.Byte);
packet.ReadGuid("GUID");
if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_2_2_14545))
packet.ReadVector3("Position");
}
示例11: HandleMoveApplyMovementForce
public static void HandleMoveApplyMovementForce(Packet packet)
{
packet.ReadPackedGuid128("MoverGUID");
packet.ReadInt32("SequenceIndex");
packet.ReadPackedGuid128("TriggerGUID");
packet.ReadVector3("Direction");
packet.ReadInt32("TransportID");
packet.ReadSingle("Facing");
packet.ResetBitReader();
packet.ReadBits("Reason", 2);
}
示例12: HandleCorpseQuery
public static void HandleCorpseQuery(Packet packet)
{
if (packet.Direction == Direction.ClientToServer)
return;
if (!packet.ReadBoolean("Corpse Found"))
return;
packet.ReadEntryWithName<Int32>(StoreNameType.Map, "Map ID");
packet.ReadVector3("Corpse Position");
packet.ReadEntryWithName<Int32>(StoreNameType.Map, "Corpse Map ID");
if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_2_2_10482))
packet.ReadInt32("Corpse Low GUID");
}
示例13: HandleCorpseQuery
public static void HandleCorpseQuery(Packet packet)
{
if (packet.Direction == Direction.ClientToServer)
return;
if (!packet.ReadBool("Corpse Found"))
return;
packet.ReadInt32<MapId>("Map ID");
packet.ReadVector3("Corpse Position");
packet.ReadInt32<MapId>("Corpse Map ID");
if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_2_2_10482))
packet.ReadInt32("Corpse Low GUID");
}
示例14: HandlePlayScene
public static void HandlePlayScene(Packet packet)
{
var sceneId = packet.ReadInt32("SceneID");
SceneTemplate scene = new SceneTemplate
{
SceneID = (uint)sceneId
};
scene.Flags = (uint)packet.ReadInt32("PlaybackFlags");
packet.ReadInt32("SceneInstanceID");
scene.ScriptPackageID = (uint)packet.ReadInt32("SceneScriptPackageID");
packet.ReadPackedGuid128("TransportGUID");
packet.ReadVector3("Pos");
packet.ReadSingle("Facing");
Storage.Scenes.Add(scene, packet.TimeSpan);
}
示例15: HandleCorpseQuery
public static void HandleCorpseQuery(Packet packet)
{
if (packet.Direction == Direction.ClientToServer)
return;
var found = packet.ReadBoolean("Corpse Found");
if (!found)
return;
packet.ReadEntryWithName<Int32>(StoreNameType.Map, "Map ID");
packet.ReadVector3("Corpse Position");
packet.ReadEntryWithName<Int32>(StoreNameType.Map, "Corpse Map ID");
packet.ReadInt32("Corpse Low GUID");
}