Ejemplo n.º 1
0
 /// <summary>
 /// Remove a status from a client, firing the appropriate OnEnd events and removing the icon from the status bar.
 /// </summary>
 /// <param name="status">The status to remove.</param>
 /// <param name="onEnd">Whether or not to run the onEnd event for the status removal.</param>
 private void _removeStatus(ICreatureStatus status, bool onEnd = true)
 {
     if (onEnd)
     {
         status.OnEnd();
     }
     if (this is User)
     {
         (this as User).SendStatusUpdate(status, true);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Remove a status from a client, firing the appropriate OnEnd events and removing the icon from the status bar.
 /// </summary>
 /// <param name="status">The status to remove.</param>
 /// <param name="onEnd">Whether or not to run the onEnd event for the status removal.</param>
 private void _removeStatus(ICreatureStatus status, bool onEnd = true)
 {
     if (onEnd)
     {
         if (status.Expired)
         {
             status.OnExpire();
         }
         else
         {
             status.OnEnd();
         }
     }
     if (this is User)
     {
         (this as User).SendStatusUpdate(status, true);
     }
     if (this is Monster)
     {
         Game.World.RemoveStatusCheck(this);
     }
 }