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


C# BitPack.WriteTransportGuidMask方法代码示例

本文整理汇总了C#中BitPack.WriteTransportGuidMask方法的典型用法代码示例。如果您正苦于以下问题:C# BitPack.WriteTransportGuidMask方法的具体用法?C# BitPack.WriteTransportGuidMask怎么用?C# BitPack.WriteTransportGuidMask使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BitPack的用法示例。


在下文中一共展示了BitPack.WriteTransportGuidMask方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: HandleMoveTeleport

        public static void HandleMoveTeleport(ref WorldClass session, Vector4 vector)
        {
            bool IsTransport = false;
            bool Unknown = false;

            PacketWriter moveTeleport = new PacketWriter(JAMCMessage.MoveTeleport);
            BitPack BitPack = new BitPack(moveTeleport, session.Character.Guid);

            moveTeleport.WriteUInt32(0);
            moveTeleport.WriteFloat(vector.X);
            moveTeleport.WriteFloat(vector.Y);
            moveTeleport.WriteFloat(vector.Z);
            moveTeleport.WriteFloat(vector.W);

            BitPack.WriteGuidMask(3, 1, 7);
            BitPack.Write(Unknown);
            BitPack.WriteGuidMask(6);

            // Unknown bits
            if (Unknown)
            {
                BitPack.Write(false);
                BitPack.Write(false);
            }

            BitPack.WriteGuidMask(0, 4);

            BitPack.Write(IsTransport);
            BitPack.WriteGuidMask(2);

            // Transport guid
            if (IsTransport)
                BitPack.WriteTransportGuidMask(7, 5, 2, 1, 0, 4, 3, 6);

            BitPack.WriteGuidMask(5);

            BitPack.Flush();

            if (IsTransport)
                BitPack.WriteTransportGuidBytes(1, 5, 7, 0, 3, 4, 6, 2);

            BitPack.WriteGuidBytes(3);

            if (Unknown)
                moveTeleport.WriteUInt8(0);

            BitPack.WriteGuidBytes(2, 1, 7, 5, 6, 4, 0);

            session.Send(moveTeleport);
        }
开发者ID:boredtodeath,项目名称:Arctium,代码行数:50,代码来源:MoveHandler.cs

示例2: HandleMoveTeleport

        public static void HandleMoveTeleport(ref WorldClass session, Vector4 vector)
        {
            bool IsTransport = false;
            bool Unknown = false;

            PacketWriter moveTeleport = new PacketWriter(ServerMessage.MoveTeleport);
            BitPack BitPack = new BitPack(moveTeleport, session.Character.Guid);

            BitPack.WriteGuidMask(7);
            BitPack.Write(Unknown);
            BitPack.WriteGuidMask(2, 0);

            if (Unknown)
            {
                BitPack.Write(0);
                BitPack.Write(0);
            }

            BitPack.Write(IsTransport);

            if (IsTransport)
                BitPack.WriteTransportGuidMask(4, 3, 5, 7, 0, 2, 6, 1);

            BitPack.WriteGuidMask(5, 1, 3, 6, 4);

            BitPack.Flush();

            BitPack.WriteGuidBytes(0);

            if (IsTransport)
                BitPack.WriteTransportGuidBytes(7, 6, 0, 2, 3, 1, 5, 4);

            BitPack.WriteGuidBytes(6, 1);

            moveTeleport.WriteUInt32(0);

            BitPack.WriteGuidBytes(7, 5);

            moveTeleport.WriteFloat(vector.X);

            BitPack.WriteGuidBytes(4, 3, 2);

            moveTeleport.WriteFloat(vector.Y);
            moveTeleport.WriteFloat(vector.O);
            moveTeleport.WriteFloat(vector.Z);

            if (Unknown)
                moveTeleport.WriteUInt8(0);

            session.Send(ref moveTeleport);
        }
开发者ID:rodrigoalv,项目名称:Arctium-WoW,代码行数:51,代码来源:MoveHandler.cs

示例3: HandleMoveTeleport

        public static void HandleMoveTeleport(ref WorldClass session, Vector4 vector)
        {
            bool isTransport = false;
            bool unknown = false;

            PacketWriter moveTeleport = new PacketWriter(ServerMessage.MoveTeleport);
            BitPack BitPack = new BitPack(moveTeleport, session.Character.Guid);

            moveTeleport.WriteFloat(vector.Y);
            moveTeleport.WriteFloat(vector.O);
            moveTeleport.WriteFloat(vector.Z);
            moveTeleport.WriteUInt32(0);
            moveTeleport.WriteFloat(vector.X);

            BitPack.WriteGuidMask(5, 4, 6, 7, 3, 0);
            BitPack.Write(isTransport);

            if (isTransport)
                BitPack.WriteTransportGuidMask(6, 4, 2, 5, 3, 0, 7, 1);

            BitPack.Write(unknown);
            BitPack.WriteGuidMask(1);

            if (unknown)
            {
                BitPack.Write(0);
                BitPack.Write(0);
            }

            BitPack.WriteGuidMask(2);

            BitPack.Flush();

            BitPack.WriteGuidBytes(2, 5);

            if (isTransport)
                BitPack.WriteTransportGuidBytes(2, 1, 4, 0, 6, 5, 7, 3);

            BitPack.WriteGuidBytes(0, 4);

            if (unknown)
                moveTeleport.WriteUInt8(0);

            BitPack.WriteGuidBytes(3, 6, 1, 7);

            session.Send(ref moveTeleport);
        }
开发者ID:Nowhereman23,项目名称:Arctium-WoW,代码行数:47,代码来源:MoveHandler.cs


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