private void HandlePlayerFled(object sender, FledEventArgs e) { if (e.OldX == this.x && e.OldY == this.y && e.OldZ == this.z) { this.writeToClient(e.Name + " panics and flees " + e.Direction + ".\r\n"); } }
protected virtual void OnNPCFled(FledEventArgs e) { EventHandler<FledEventArgs> handler = this.NPCFled; if (handler != null) { handler(this, e); } }
private void HandleNPCFled(object sender, FledEventArgs e) { if (e.OldX == this.x && e.OldY == this.y && e.OldZ == this.z) { this.writeToClient(e.Name + " panics and flees " + e.Direction + ".\r\n"); this.combatTarget = null; this.inCombat = false; } }