public static void InvokeCastSpellRequest(CastSpellRequestEventArgs e) { if (CastSpellRequest != null) { CastSpellRequest(e); } }
public static void InvokeCastSpellRequest(CastSpellRequestEventArgs e) { if (EventSink.CastSpellRequest != null) { EventSink.CastSpellRequest.Invoke(e); } }
private static void EventSink_CastSpellRequest( CastSpellRequestEventArgs e ) { Mobile from = e.Mobile; if ( !Multis.DesignContext.Check( from ) ) return; // They are customizing Spellbook book = e.Spellbook as Spellbook; int spellID = e.SpellID; if ( book == null || !book.HasSpell( spellID ) ) book = Find( from, spellID ); if ( book != null && book.HasSpell( spellID ) ) { Spell spell = SpellRegistry.NewSpell( spellID, from, null ); if ( spell != null ) spell.Cast(); else from.SendLocalizedMessage( 502345 ); // This spell has been temporarily disabled. } else { from.SendLocalizedMessage( 500015 ); // You do not have that spell! } }
private static void OnSpellRequest(CastSpellRequestEventArgs e) { if (!CMOptions.ModuleEnabled || !(e.Mobile is PlayerMobile)) { return; } PlayerMobile user = (PlayerMobile)e.Mobile; if (!States.ContainsKey(user) || States[user].Item1) { _CastBarQueue.Enqueue(user); } }
public static void InvokeCastSpellRequest( CastSpellRequestEventArgs e ) { if ( CastSpellRequest != null ) CastSpellRequest( e ); }
public static void InvokeCastSpellRequest(CastSpellRequestEventArgs e) { CastSpellRequest?.Invoke(e); }
public static void InvokeCastSpellRequest(CastSpellRequestEventArgs e) { if (CastSpellRequest != null) { foreach (CastSpellRequestEventHandler currentDelegate in CastSpellRequest.GetInvocationList()) { try { currentDelegate.Invoke(e); } catch (Exception ex) { // Log an exception EventSink.InvokeLogException(new LogExceptionEventArgs(ex)); } } } }