本文整理汇总了C#中UltimaXNA.Core.Network.PacketReader.ReadUInt32方法的典型用法代码示例。如果您正苦于以下问题:C# PacketReader.ReadUInt32方法的具体用法?C# PacketReader.ReadUInt32怎么用?C# PacketReader.ReadUInt32使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UltimaXNA.Core.Network.PacketReader
的用法示例。
在下文中一共展示了PacketReader.ReadUInt32方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SpellBookContentsInfo
public SpellBookContentsInfo(PacketReader reader)
{
ushort unknown = reader.ReadUInt16(); // always 1
Serial serial = reader.ReadInt32();
ushort itemID = reader.ReadUInt16();
ushort spellbookType = reader.ReadUInt16(); // 1==regular, 101=necro, 201=paladin, 401=bushido, 501=ninjitsu, 601=spellweaving
ulong spellBitfields = reader.ReadUInt32() + (((ulong)reader.ReadUInt32()) << 32); // first bit of first byte = spell #1, second bit of first byte = spell #2, first bit of second byte = spell #8, etc
Spellbook = new SpellbookData(serial, itemID, spellbookType, spellBitfields);
}
示例2: SupportedFeaturesPacket
public SupportedFeaturesPacket(PacketReader reader)
: base(0xB9, "Enable Features")
{
if (reader.Buffer.Length == 3)
Flags = (FeatureFlags)reader.ReadUInt16();
else if (reader.Buffer.Length == 5)
Flags = (FeatureFlags)reader.ReadUInt32();
else
{
Flags = (FeatureFlags)reader.ReadUInt16();
Tracer.Error("Bad feature flag size in SupportedFeaturesPacket; expected 16 or 32 bit features, received {0} bits.", (reader.Buffer.Length - 1) * 8);
}
}