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


C# Packet.ReadString方法代碼示例

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


在下文中一共展示了Packet.ReadString方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: ReadMovementUpdateBlock


//.........這裏部分代碼省略.........
                    packet.ReadInt32();
                }

                packet.ReadXORByte(guid1, 4);
                packet.ReadSingle("Swim Back Speed", index);
                moveInfo.Position.Z = packet.ReadSingle();
                packet.ReadXORByte(guid1, 3);
            }

            if (isSceneObject)
            {
                // need update
            }

            if (hasGameObjectPosition)
            {
                packet.ReadSByte("GO Transport Seat", index);

                if (hasGOTransportTime2)
                    packet.ReadUInt32("GO Transport Time 2", index);

                packet.ParseBitStream(goTransportGuid, 4, 3);

                if (hasGOTransportTime2)
                    packet.ReadUInt32("GO Transport Time 3", index);

                packet.ParseBitStream(goTransportGuid, 7, 6, 5, 0);
                moveInfo.TransportOffset.Z = packet.ReadSingle();
                moveInfo.TransportOffset.X = packet.ReadSingle();
                packet.ReadUInt32("GO Transport Time", index);
                moveInfo.TransportOffset.O = packet.ReadSingle();
                packet.ReadXORByte(goTransportGuid, 1);
                moveInfo.TransportOffset.Y = packet.ReadSingle();
                packet.ReadXORByte(goTransportGuid, 2);

                moveInfo.TransportGuid = new Guid(BitConverter.ToUInt64(goTransportGuid, 0));
                packet.WriteLine("[{0}] GO Transport GUID {1}", index, moveInfo.TransportGuid);
                packet.WriteLine("[{0}] GO Transport Position: {1}", index, moveInfo.TransportOffset);
            }

            if (hasVehicleData)
            {
                // need update
            }

            if (hasAttackingTarget)
            {
                packet.ParseBitStream(attackingTargetGuid, 1, 3, 5, 4, 7, 6, 2, 0);
                packet.WriteGuid("Attacking GUID", attackingTargetGuid, index);
            }

            if (hasGameObjectRotation)
            {
                packet.ReadPackedQuaternion("GameObject Rotation", index);
            }

            if (hasAnimKits)
            {
                // need update
            }

            if (hasStationaryPosition)
            {
                moveInfo.Position.X = packet.ReadSingle();
                moveInfo.Position.Z = packet.ReadSingle();
                moveInfo.Position.Y = packet.ReadSingle();
                moveInfo.Orientation = packet.ReadSingle("Stationary Orientation", index);
                packet.WriteLine("[{0}] Stationary Position: {1}", index, moveInfo.Position);
            }

            if (transport)
            {
                // need update
            }

            if (living && moveInfo.HasSplineData && hasFullSpline && splineType == SplineType.FacingTarget)
            {
                var facingTargetGuid = new byte[8];
                facingTargetGuid = packet.StartBitStream(5, 0, 2, 4, 1, 3, 6, 7);
                packet.ParseBitStream(facingTargetGuid, 5, 0, 4, 6, 3, 2, 1, 7);
                packet.WriteGuid("Facing Target GUID", facingTargetGuid, index);
            }

            if (byte32A)
                packet.ReadString();

            if (byte414)
                packet.ReadInt32();

            if (byte2A4)
                packet.ReadInt32();

            if (byte428)
            {
                for (uint l_I = 0; l_I < dword418; l_I++)
                    packet.ReadInt32();
            }

            return moveInfo;
        }
開發者ID:Walkum,項目名稱:WowPacketParser_Skyfire,代碼行數:101,代碼來源:UpdateHandler.cs


注:本文中的WowPacketParser.Misc.Packet.ReadString方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。