/// <summary> /// Lanza un evento /// </summary> protected void RaiseEvent(ActionEventArgs.ActionType intAction, string strMessage) { if (ActionProcess != null) { ActionProcess(this, new ActionEventArgs(intAction, Source, strMessage)); } }
public void AddActionEvent(ActionEventArgs NewEvent) { if (m_eActionType == ActionEventArgs.ActionType.Unknown) { m_eActionType = NewEvent.Action; } m_AbilityQueue.Enqueue(NewEvent); if (!NewEvent.FailedAttempt) { if (m_iMinimumQuantity == null || NewEvent.Quantity < m_iMinimumQuantity) { m_iMinimumQuantity = NewEvent.Quantity; } if (m_iMaximumQuantity == null || NewEvent.Quantity > m_iMaximumQuantity) { m_iMaximumQuantity = NewEvent.Quantity; } if ((NewEvent.Attributes & ActionEventArgs.AttributeFlags.Critical) != 0) { m_uiTotalCriticalSuccesses++; } m_uiTotalSuccesses++; m_iTotalQuantity += NewEvent.Quantity; m_fAverageQuantity = (double)m_iTotalQuantity / (double)m_uiTotalSuccesses; } return; }