當前位置: 首頁>>代碼示例>>C#>>正文


C# BitPack.WriteTransportGuidBytes方法代碼示例

本文整理匯總了C#中BitPack.WriteTransportGuidBytes方法的典型用法代碼示例。如果您正苦於以下問題:C# BitPack.WriteTransportGuidBytes方法的具體用法?C# BitPack.WriteTransportGuidBytes怎麽用?C# BitPack.WriteTransportGuidBytes使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在BitPack的用法示例。


在下文中一共展示了BitPack.WriteTransportGuidBytes方法的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.WriteTransportGuidBytes方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。