Find() public static method

public static Find ( Server.Mobile from, int spellID ) : Spellbook
from Server.Mobile
spellID int
return Spellbook
        private static void EventSink_OpenSpellbookRequest(OpenSpellbookRequestEventArgs e)
        {
            Mobile from = e.Mobile;

            if (!Multis.DesignContext.Check(from))
            {
                return;                 // They are customizing
            }
            SpellbookType type;

            switch (e.Type)
            {
            default:
            case 1: type = SpellbookType.Regular; break;

            case 2: type = SpellbookType.Necromancer; break;

            case 3: type = SpellbookType.Paladin; break;

            case 4: type = SpellbookType.Ninja; break;

            case 5: type = SpellbookType.Samurai; break;

            case 6: type = SpellbookType.Arcanist; break;
            }

            Spellbook book = Spellbook.Find(from, -1, type);

            if (book != null)
            {
                book.DisplayTo(from);
            }
        }
Esempio n. 2
0
        private static void EventSink_OpenSpellbookRequest(OpenSpellbookRequestEventArgs e)
        {
            Mobile from = e.Mobile;

            SpellbookType type;

            switch (e.Type)
            {
            default:
            case 1: type = SpellbookType.Regular; break;

            case 2: type = SpellbookType.Necromancer; break;

            case 3: type = SpellbookType.Paladin; break;

            case 4: type = SpellbookType.Ninja; break;

            case 5: type = SpellbookType.Samurai; break;

            case 6: type = SpellbookType.Arcanist; break;
            }

            Spellbook book = Spellbook.Find(from, -1, type);

            if (book != null)
            {
                book.DisplayTo(from);
            }
        }
Esempio n. 3
0
        public static bool HasSpell(Mobile from, int spellID)
        {
            Spellbook book = Spellbook.Find(from, spellID);

            return(book != null && book.HasSpell(spellID));
        }
Esempio n. 4
0
        private static void EventSink_OpenSpellbookRequest(OpenSpellbookRequestEventArgs e)
        {
            Mobile from = e.Mobile;

            Spellbook.Find(from, -1, SpellbookType.Regular).DisplayTo(from);
        }