![]() |
AzerothCore 3.3.5a
OpenSource WoW Emulator
|
Represents a condition that must be met for a player to receive a server mail. More...
#include "ServerMailMgr.h"
Public Member Functions | |
ServerMailCondition ()=default | |
bool | CheckCondition (Player *player) const |
Checks if a player meets this condition. | |
Public Attributes | |
ServerMailConditionType | type = ServerMailConditionType::Invalid |
uint32 | value { 0 } |
uint32 | state { 0 } |
Represents a condition that must be met for a player to receive a server mail.
Each condition has a type (see ServerMailConditionType) and a value associated with the type. For example, for a level condition, the value represents the required player level.
Some condition also have a state associated with the value. For example, for a reputation condition, the state represents the current reputation state, like Exalted.
Conditions are attached to server mail templates and are evaluated when players log in.
|
default |
bool ServerMailCondition::CheckCondition | ( | Player * | player | ) | const |
Checks if a player meets this condition.
Evaluates the condition type and compares the player's attributes to the required value.
player | The player to check. |
References Achievement, Class, Faction, Unit::getClassMask(), Unit::GetLevel(), Player::GetQuestStatus(), Unit::getRaceMask(), Player::GetReputationRank(), Player::GetTeamId(), Player::GetTotalPlayedTime(), Player::HasAchieved(), Level, LOG_ERROR, PlayTime, Quest, Race, Reputation, state, type, and value.
uint32 ServerMailCondition::state { 0 } |
Referenced by CheckCondition(), and ServerMailMgr::LoadMailServerTemplatesConditions().
ServerMailConditionType ServerMailCondition::type = ServerMailConditionType::Invalid |
Referenced by CheckCondition(), and ServerMailMgr::LoadMailServerTemplatesConditions().
uint32 ServerMailCondition::value { 0 } |
Referenced by CheckCondition(), and ServerMailMgr::LoadMailServerTemplatesConditions().