private void OnDeath(EntityDeathEventArgs e) { foreach (EventListener el in Plugins) { if (el.Event == Event.EntityDeath) { IEntityListener l = el.Listener as IEntityListener; l.OnDeath(e); } } }
public static bool EntityDeath(TemplateObject entity, ref byte amount) { // TODO: causes? EntityDeathEventArgs evt = new EntityDeathEventArgs(); evt.Entity = entity; evt.Amount = new NumberTag(amount); UnturnedFreneticEvents.OnEntityDeath.Fire(evt); amount = (byte)evt.Amount.Internal; return(evt.Cancelled); }
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) { }