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; case 7: type = SpellbookType.Druidic; break; } Spellbook book = Spellbook.Find( from, -1, type ); if ( book != null ) book.DisplayTo( from ); }
public static void InvokeOpenSpellbookRequest(OpenSpellbookRequestEventArgs e) { if (OpenSpellbookRequest != null) { OpenSpellbookRequest(e); } }
public static void InvokeOpenSpellbookRequest(OpenSpellbookRequestEventArgs e) { if (EventSink.OpenSpellbookRequest != null) { EventSink.OpenSpellbookRequest.Invoke(e); } }
public static void InvokeOpenSpellbookRequest( OpenSpellbookRequestEventArgs e ) { if ( OpenSpellbookRequest != null ) OpenSpellbookRequest( e ); }
public static void InvokeOpenSpellbookRequest(OpenSpellbookRequestEventArgs e) { OpenSpellbookRequest?.Invoke(e); }
public static void InvokeOpenSpellbookRequest(OpenSpellbookRequestEventArgs e) { if (OpenSpellbookRequest != null) { foreach (OpenSpellbookRequestEventHandler currentDelegate in OpenSpellbookRequest.GetInvocationList()) { try { currentDelegate.Invoke(e); } catch (Exception ex) { // Log an exception EventSink.InvokeLogException(new LogExceptionEventArgs(ex)); } } } }