示例#1
0
        /// <summary>
        ///  Helper function used to fire defend events.
        /// </summary>
        /// <param name="e">The defend event arguments.</param>
        /// <param name="clearOnly">Only clear the action, don't fire the event.</param>
        private void OnDefendCompleted(DefendCompletedEventArgs e, bool clearOnly)
        {
            if (InProgressActions.DefendAction != null &&
                e.ActionID == InProgressActions.DefendAction.ActionID)
            {
                InProgressActions.SetDefendAction(null);
            }

            if (!clearOnly && DefendCompleted != null)
            {
                DefendCompleted(this, e);
            }
        }
示例#2
0
        /// <summary>
        ///  Helper function used to fire defend events.
        /// </summary>
        /// <param name="e">The defend event arguments.</param>
        /// <param name="clearOnly">Only clear the action, don't fire the event.</param>
        private void OnDefendCompleted(DefendCompletedEventArgs e, bool clearOnly)
        {
            if (InProgressActions.DefendAction != null &&
                e.ActionID == InProgressActions.DefendAction.ActionID)
            {
                InProgressActions.SetDefendAction(null);
            }

            if (!clearOnly && DefendCompleted != null)
            {
                DefendCompleted(this, e);
            }
        }