protected void OnAttackedAndDodge(AttackedAndDodgeEventArgs e) { EventHandler<AttackedAndDodgeEventArgs> handler = this.AttackedAndDodge; if (handler != null) { handler(this, e); } }
private void HandleAttackedAndDodge(object sender, AttackedAndDodgeEventArgs e) { if (e.X == this.x && e.Y == this.y && e.Z == this.z) { if (e.AttackerName == this.name) { this.writeToClient(e.DefenderName + " dodges your attack.\r\n"); } else { this.writeToClient(e.DefenderName + " dodges " + e.AttackerName + "'s attack.\r\n"); } } }