Example #1
0
 private void OnDeath(EntityDeathEventArgs e)
 {
     foreach (EventListener el in Plugins)
     {
         if (el.Event == Event.EntityDeath)
         {
             IEntityListener l = el.Listener as IEntityListener;
             l.OnDeath(e);
         }
     }
 }
Example #2
0
        internal virtual void HandleDeath(EntityBase killedBy = null, string deathBy = "")
        {
            //Event
            EntityDeathEventArgs e = new EntityDeathEventArgs(this, killedBy);
            Server.PluginManager.CallEvent(Event.EntityDeath, e);
            if (e.EventCanceled) return;
            killedBy = e.KilledBy as EntityBase;
            //End Event

            // TODO: Stats/achievements handled in each mob class??? (within DoDeath)
            //if (hitBy != null)
            //{
            //    // TODO: Stats/Achievement hook or something
            //}

            SendUpdateOnDeath();

            // Spawn goodies / perform achievements etc..
            DoDeath(killedBy);
        }
 public void OnDeath(EntityDeathEventArgs e)
 {
 }