当前位置: 首页>>代码示例>>C#>>正文


C# Packet.ReadVector3方法代码示例

本文整理汇总了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");
            }
        }
开发者ID:TrinityCore,项目名称:WowPacketParser,代码行数:34,代码来源:AreaTriggerHandler.cs

示例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);
            }
        }
开发者ID:Chaplain,项目名称:WowPacketParser,代码行数:59,代码来源:CharacterHandler.cs

示例3: HandleBindPointUpdate

        public static void HandleBindPointUpdate(Packet packet)
        {
            packet.ReadVector3("Position");

            packet.ReadEntryWithName<Int32>(StoreNameType.Map, "Map ID");

            packet.ReadInt32("Zone ID");
        }
开发者ID:CarlosX,项目名称:WowPacketParser,代码行数:8,代码来源:MovementHandler.cs

示例4: HandleCorpseLocation

 public static void HandleCorpseLocation(Packet packet)
 {
     packet.ReadBit("Valid");
     packet.ReadInt32("ActualMapID");
     packet.ReadVector3("Position");
     packet.ReadInt32("MapID");
     packet.ReadPackedGuid128("Transport");
 }
开发者ID:Oboltys,项目名称:WowPacketParser,代码行数:8,代码来源:CorpseHandler.cs

示例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");
 }
开发者ID:rob3ns,项目名称:PacketSniffer,代码行数:9,代码来源:PetHandler.cs

示例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);
        }
开发者ID:killradio,项目名称:WowPacketParser,代码行数:9,代码来源:AreaTriggerHandler.cs

示例7: HandlePetAction

        public static void HandlePetAction(Packet packet)
        {
            packet.ReadPackedGuid128("PetGUID");

            ReadPetAction(packet, "Action");

            packet.ReadPackedGuid128("TargetGUID");
            packet.ReadVector3("ActionPosition");
        }
开发者ID:TrinityCore,项目名称:WowPacketParser,代码行数:9,代码来源:PetHandler.cs

示例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..
 }
开发者ID:CarlosX,项目名称:WowPacketParser,代码行数:10,代码来源:TicketHandler.cs

示例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");
 }
开发者ID:Oboltys,项目名称:WowPacketParser,代码行数:10,代码来源:PetHandler.cs

示例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");
 }
开发者ID:Chaplain,项目名称:WowPacketParser,代码行数:10,代码来源:PetHandler.cs

示例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);
        }
开发者ID:cyberbrest,项目名称:WowPacketParser,代码行数:14,代码来源:MovementHandler.cs

示例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");
        }
开发者ID:Nihilianth,项目名称:WowPacketParser,代码行数:15,代码来源:CorpseHandler.cs

示例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");
        }
开发者ID:Oboltys,项目名称:WowPacketParser,代码行数:15,代码来源:CorpseHandler.cs

示例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);
        }
开发者ID:TrinityCore,项目名称:WowPacketParser,代码行数:17,代码来源:SceneHandler.cs

示例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");
        }
开发者ID:Supabad,项目名称:WowPacketParser,代码行数:18,代码来源:CorpseHandler.cs


注:本文中的WowPacketParser.Misc.Packet.ReadVector3方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。