Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
 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);
     }
 }