本文整理匯總了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);
}
}