protected virtual bool OnNpcTookDamage(NpcTookDamageEventArgs e)
        {
            Contract.Requires <ArgumentNullException>(e != null);

            try {
                this.NpcTookDamage?.Invoke(this, e);
            } catch (Exception ex) {
                this.ReportEventHandlerException("NpcTookDamage", ex);
            }

            this.WriteHadnlerDebugInfo("NpcTookDamage", e);
            return(e.Handled);
        }
예제 #2
0
        protected virtual bool OnNpcTookDamage(NpcTookDamageEventArgs e)
        {
            if (e == null)
            {
                throw new ArgumentNullException();
            }

            try {
                this.NpcTookDamage?.Invoke(this, e);
            } catch (Exception ex) {
                this.ReportEventHandlerException("NpcTookDamage", ex);
            }

            this.WriteHadnlerDebugInfo("NpcTookDamage", e);
            return(e.Handled);
        }
        protected virtual bool OnNpcTookDamage(NpcTookDamageEventArgs e)
        {
            Contract.Requires<ArgumentNullException>(e != null);

              try {
            this.NpcTookDamage?.Invoke(this, e);
              } catch (Exception ex) {
            this.ReportEventHandlerException("NpcTookDamage", ex);
              }

              return e.Handled;
        }