Beispiel #1
0
 public static void InvokePoisonCured(PoisonCuredEventArgs e)
 {
     if (PoisonCured != null)
     {
         PoisonCured(e);
     }
 }
Beispiel #2
0
        private static void EventSink_PoisonCured( PoisonCuredEventArgs e )
        {
            int newResistLevel = Math.Min( e.Poison.Level + 1, 4 );

            if ( m_Table.ContainsKey( e.Mobile ) )
            {
                var context = m_Table[e.Mobile];

                if ( context.ResistanceLevel < newResistLevel )
                {
                    context.ResistanceLevel = newResistLevel;

                    var decayTimer = context.DecayTimer;

                    if ( decayTimer != null )
                        decayTimer.Stop();

                    decayTimer = new DecayTimer( e.Mobile );
                    decayTimer.Start();

                    context.DecayTimer = decayTimer;
                }
            }
            else
            {
                var decayTimer = new DecayTimer( e.Mobile );
                decayTimer.Start();

                var context = new PoisonResistanceContext( e.Mobile, newResistLevel, decayTimer );
                m_Table[e.Mobile] = context;
            }
        }
Beispiel #3
0
 public void InvokePoisonCured( PoisonCuredEventArgs e )
 {
     if ( PoisonCured != null )
         PoisonCured( e );
 }