I would like to make players fizzle spell if they speak while casting, can someone give me a hand?

Fixed check last post
 
Last edited:
go to PlayerMobile and look for OnSpeech around line 5826

I think these edits should work

Code:
public override void OnSpeech(SpeechEventArgs e)
        {
            if (SpeechLog.Enabled && NetState != null)
            {
                if (m_SpeechLog == null)
                {
                    m_SpeechLog = new SpeechLog();
                }

                m_SpeechLog.Add(e.Mobile, e.Speech);
            }
           
            //Added section
            if (e.Mobile.Spell != null)
            {
                DoFizzle();
            }
            //
        }
 
Code:
public override void OnSpeech( SpeechEventArgs e )
        {
            if ( SpeechLog.Enabled && NetState != null )
            {
                if ( m_SpeechLog == null )
                    m_SpeechLog = new SpeechLog();

                m_SpeechLog.Add( e.Mobile, e.Speech );
            }
         
             //Added section spell fizzle
            if (e.Mobile.Spell != null)
            {
                DoFizzle();
            }
            //
        }



Errors:
+ Mobiles/PlayerMobile.cs:
CS0103: Line 5500: The name 'DoFizzle' does not exist in the current context

this worked:



Code:
if (e.Mobile.Spell != null && e.Mobile.Spell.IsCasting)
            {
            ((Spell) Spell).DoFizzle();
            }
 
Last edited:
Back