Ejemplo n.º 1
0
 public static void InvokeCastSpellRequest(CastSpellRequestEventArgs e)
 {
     if (CastSpellRequest != null)
     {
         CastSpellRequest(e);
     }
 }
Ejemplo n.º 2
0
 public static void InvokeCastSpellRequest(CastSpellRequestEventArgs e)
 {
     if (EventSink.CastSpellRequest != null)
     {
         EventSink.CastSpellRequest.Invoke(e);
     }
 }
Ejemplo n.º 3
0
		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!
			}
		}
Ejemplo n.º 4
0
		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);
			}
		}
Ejemplo n.º 5
0
 public static void InvokeCastSpellRequest( CastSpellRequestEventArgs e )
 {
     if ( CastSpellRequest != null )
         CastSpellRequest( e );
 }
Ejemplo n.º 6
0
 public static void InvokeCastSpellRequest(CastSpellRequestEventArgs e)
 {
     CastSpellRequest?.Invoke(e);
 }
Ejemplo n.º 7
0
		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));
					}
				}
			}
		}