Ejemplo n.º 1
0
        public void ReceiveSpellData(SpellbookTypes sbType, ulong sbBitfield)
        {
            var entityUpdated = false;

            if (BookType != sbType)
            {
                BookType      = sbType;
                entityUpdated = true;
            }
            if (_spellsBitfield != sbBitfield)
            {
                _spellsBitfield = sbBitfield;
                entityUpdated   = true;
            }
            if (entityUpdated)
            {
                _onUpdated?.Invoke(this);
            }
        }
Ejemplo n.º 2
0
        public static int GetOffsetFromSpellBookType(SpellbookTypes spellbooktype)
        {
            switch (spellbooktype)
            {
            case SpellbookTypes.Magic: return(1);

            case SpellbookTypes.Necromancer: return(101);

            case SpellbookTypes.Chivalry: return(201);

            case SpellbookTypes.Bushido: return(401);

            case SpellbookTypes.Ninjitsu: return(501);

            case SpellbookTypes.Spellweaving: return(601);

            default: return(1);
            }
        }
Ejemplo n.º 3
0
        public SpellbookData(Serial serial, ushort itemID, ushort bookTypePacketID, ulong spellBitFields)
        {
            Serial         = serial;
            ItemID         = itemID;
            SpellsBitfield = spellBitFields;
            switch (bookTypePacketID)
            {
            case 1: BookType = SpellbookTypes.Magic; break;

            case 101: BookType = SpellbookTypes.Necromancer; break;

            case 201: BookType = SpellbookTypes.Chivalry; break;

            case 401: BookType = SpellbookTypes.Bushido; break;

            case 501: BookType = SpellbookTypes.Ninjitsu; break;

            case 601: BookType = SpellbookTypes.Spellweaving; break;

            default: BookType = SpellbookTypes.Unknown; return;
            }
        }
Ejemplo n.º 4
0
 public SpellBook(Serial serial, Map map)
     : base(serial, map)
 {
     BookType        = SpellbookTypes.Unknown;
     _spellsBitfield = 0;
 }