TrinityCore
Loading...
Searching...
No Matches
ConditionMgr Class Reference

#include <ConditionMgr.h>

Classes

struct  ConditionTypeInfo
 

Public Member Functions

 ConditionMgr (ConditionMgr const &)=delete
 
 ConditionMgr (ConditionMgr &&)=delete
 
ConditionMgroperator= (ConditionMgr const &)=delete
 
ConditionMgroperator= (ConditionMgr &&)=delete
 
void LoadConditions (bool isReload=false)
 
bool isConditionTypeValid (Condition *cond) const
 
uint32 GetSearcherTypeMaskForConditionList (ConditionContainer const &conditions) const
 
bool IsObjectMeetToConditions (WorldObject const *object, ConditionContainer const &conditions) const
 
bool IsObjectMeetToConditions (WorldObject const *object1, WorldObject const *object2, ConditionContainer const &conditions) const
 
bool IsObjectMeetToConditions (ConditionSourceInfo &sourceInfo, ConditionContainer const &conditions) const
 
bool IsObjectMeetingNotGroupedConditions (ConditionSourceType sourceType, uint32 entry, ConditionSourceInfo &sourceInfo) const
 
bool IsObjectMeetingNotGroupedConditions (ConditionSourceType sourceType, uint32 entry, WorldObject const *target0, WorldObject const *target1=nullptr, WorldObject const *target2=nullptr) const
 
bool IsMapMeetingNotGroupedConditions (ConditionSourceType sourceType, uint32 entry, Map const *map) const
 
bool HasConditionsForNotGroupedEntry (ConditionSourceType sourceType, uint32 entry) const
 
bool IsObjectMeetingSpellClickConditions (uint32 creatureId, uint32 spellId, WorldObject const *clicker, WorldObject const *target) const
 
bool HasConditionsForSpellClickEvent (uint32 creatureId, uint32 spellId) const
 
bool IsObjectMeetingVehicleSpellConditions (uint32 creatureId, uint32 spellId, Player const *player, Unit const *vehicle) const
 
bool IsObjectMeetingSmartEventConditions (int64 entryOrGuid, uint32 eventId, uint32 sourceType, Unit const *unit, WorldObject const *baseObject) const
 
bool IsObjectMeetingVendorItemConditions (uint32 creatureId, uint32 itemId, Player const *player, Creature const *vendor) const
 
bool IsObjectMeetingPlayerChoiceResponseConditions (uint32 playerChoiceId, int32 playerChoiceResponseId, Player const *player) const
 
bool IsSpellUsedInSpellClickConditions (uint32 spellId) const
 
ConditionContainer const * GetConditionsForAreaTrigger (uint32 areaTriggerId, bool isServerSide) const
 
bool IsObjectMeetingTrainerSpellConditions (uint32 trainerId, uint32 spellId, Player *player) const
 
bool IsObjectMeetingVisibilityByObjectIdConditions (WorldObject const *obj, WorldObject const *seer) const
 

Static Public Member Functions

static ConditionMgrinstance ()
 
static bool CanHaveSourceGroupSet (ConditionSourceType sourceType)
 
static bool CanHaveSourceIdSet (ConditionSourceType sourceType)
 
static bool CanHaveConditionType (ConditionSourceType sourceType, ConditionTypes conditionType)
 
static uint32 GetPlayerConditionLfgValue (Player const *player, PlayerConditionLfgStatus status)
 
static bool IsPlayerMeetingCondition (Player const *player, uint32 conditionId)
 
static bool IsPlayerMeetingCondition (Player const *player, PlayerConditionEntry const *condition)
 
static bool IsMeetingWorldStateExpression (Map const *map, WorldStateExpressionEntry const *expression)
 
static bool IsUnitMeetingCondition (Unit const *unit, Unit const *otherUnit, UnitConditionEntry const *condition)
 

Static Public Attributes

static char const *const StaticSourceTypeData [CONDITION_SOURCE_TYPE_MAX_DB_ALLOWED]
 
static ConditionTypeInfo const StaticConditionTypeData [CONDITION_MAX]
 

Private Member Functions

 ConditionMgr ()
 
 ~ConditionMgr ()
 
bool isSourceTypeValid (Condition *cond) const
 
void addToLootTemplate (ConditionId const &id, std::shared_ptr< std::vector< Condition > > conditions, LootTemplate *loot) const
 
void addToGossipMenus (ConditionId const &id, std::shared_ptr< std::vector< Condition > > conditions) const
 
void addToGossipMenuItems (ConditionId const &id, std::shared_ptr< std::vector< Condition > > conditions) const
 
void addToSpellImplicitTargetConditions (Condition const &cond) const
 
void addToPhases (ConditionId const &id, std::shared_ptr< std::vector< Condition > > conditions) const
 
void addToGraveyardData (ConditionId const &id, std::shared_ptr< std::vector< Condition > > conditions) const
 
bool IsObjectMeetToConditionList (ConditionSourceInfo &sourceInfo, ConditionContainer const &conditions) const
 
void Clean ()
 

Static Private Member Functions

static void LogUselessConditionValue (Condition const *cond, uint8 index, uint32 value)
 
static void LogUselessConditionValue (Condition const *cond, uint8 index, std::string const &value)
 

Private Attributes

ConditionEntriesByTypeArray ConditionStore
 
std::unordered_set< uint32SpellsUsedInSpellClickConditions
 

Detailed Description

Definition at line 304 of file ConditionMgr.h.

Constructor & Destructor Documentation

◆ ConditionMgr() [1/3]

ConditionMgr::ConditionMgr ( )
privatedefault

◆ ~ConditionMgr()

ConditionMgr::~ConditionMgr ( )
private

Definition at line 978 of file ConditionMgr.cpp.

+ Here is the call graph for this function:

◆ ConditionMgr() [2/3]

ConditionMgr::ConditionMgr ( ConditionMgr const &  )
delete

◆ ConditionMgr() [3/3]

ConditionMgr::ConditionMgr ( ConditionMgr &&  )
delete

Member Function Documentation

◆ addToGossipMenuItems()

void ConditionMgr::addToGossipMenuItems ( ConditionId const &  id,
std::shared_ptr< std::vector< Condition > >  conditions 
) const
private

Definition at line 1559 of file ConditionMgr.cpp.

+ Here is the caller graph for this function:

◆ addToGossipMenus()

void ConditionMgr::addToGossipMenus ( ConditionId const &  id,
std::shared_ptr< std::vector< Condition > >  conditions 
) const
private

Definition at line 1542 of file ConditionMgr.cpp.

+ Here is the caller graph for this function:

◆ addToGraveyardData()

void ConditionMgr::addToGraveyardData ( ConditionId const &  id,
std::shared_ptr< std::vector< Condition > >  conditions 
) const
private

Definition at line 1727 of file ConditionMgr.cpp.

+ Here is the caller graph for this function:

◆ addToLootTemplate()

void ConditionMgr::addToLootTemplate ( ConditionId const &  id,
std::shared_ptr< std::vector< Condition > >  conditions,
LootTemplate loot 
) const
private

Definition at line 1526 of file ConditionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addToPhases()

void ConditionMgr::addToPhases ( ConditionId const &  id,
std::shared_ptr< std::vector< Condition > >  conditions 
) const
private

Definition at line 1685 of file ConditionMgr.cpp.

+ Here is the caller graph for this function:

◆ addToSpellImplicitTargetConditions()

void ConditionMgr::addToSpellImplicitTargetConditions ( Condition const &  cond) const
private

Definition at line 1575 of file ConditionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CanHaveConditionType()

bool ConditionMgr::CanHaveConditionType ( ConditionSourceType  sourceType,
ConditionTypes  conditionType 
)
static

Definition at line 1124 of file ConditionMgr.cpp.

◆ CanHaveSourceGroupSet()

bool ConditionMgr::CanHaveSourceGroupSet ( ConditionSourceType  sourceType)
static

Definition at line 1089 of file ConditionMgr.cpp.

+ Here is the caller graph for this function:

◆ CanHaveSourceIdSet()

bool ConditionMgr::CanHaveSourceIdSet ( ConditionSourceType  sourceType)
static

Definition at line 1119 of file ConditionMgr.cpp.

+ Here is the caller graph for this function:

◆ Clean()

void ConditionMgr::Clean ( )
private

Definition at line 2754 of file ConditionMgr.cpp.

+ Here is the caller graph for this function:

◆ GetConditionsForAreaTrigger()

ConditionContainer const * ConditionMgr::GetConditionsForAreaTrigger ( uint32  areaTriggerId,
bool  isServerSide 
) const

Definition at line 1260 of file ConditionMgr.cpp.

◆ GetPlayerConditionLfgValue()

uint32 ConditionMgr::GetPlayerConditionLfgValue ( Player const *  player,
PlayerConditionLfgStatus  status 
)
static

Definition at line 2822 of file ConditionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetSearcherTypeMaskForConditionList()

uint32 ConditionMgr::GetSearcherTypeMaskForConditionList ( ConditionContainer const &  conditions) const

Definition at line 983 of file ConditionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HasConditionsForNotGroupedEntry()

bool ConditionMgr::HasConditionsForNotGroupedEntry ( ConditionSourceType  sourceType,
uint32  entry 
) const

Definition at line 1177 of file ConditionMgr.cpp.

◆ HasConditionsForSpellClickEvent()

bool ConditionMgr::HasConditionsForSpellClickEvent ( uint32  creatureId,
uint32  spellId 
) const

Definition at line 1197 of file ConditionMgr.cpp.

◆ instance()

ConditionMgr * ConditionMgr::instance ( )
static

Definition at line 1290 of file ConditionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isConditionTypeValid()

bool ConditionMgr::isConditionTypeValid ( Condition cond) const

Definition at line 2148 of file ConditionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsMapMeetingNotGroupedConditions()

bool ConditionMgr::IsMapMeetingNotGroupedConditions ( ConditionSourceType  sourceType,
uint32  entry,
Map const *  map 
) const

Definition at line 1171 of file ConditionMgr.cpp.

+ Here is the call graph for this function:

◆ IsMeetingWorldStateExpression()

bool ConditionMgr::IsMeetingWorldStateExpression ( Map const *  map,
WorldStateExpressionEntry const *  expression 
)
static

Definition at line 3708 of file ConditionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsObjectMeetingNotGroupedConditions() [1/2]

bool ConditionMgr::IsObjectMeetingNotGroupedConditions ( ConditionSourceType  sourceType,
uint32  entry,
ConditionSourceInfo sourceInfo 
) const

Definition at line 1150 of file ConditionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsObjectMeetingNotGroupedConditions() [2/2]

bool ConditionMgr::IsObjectMeetingNotGroupedConditions ( ConditionSourceType  sourceType,
uint32  entry,
WorldObject const *  target0,
WorldObject const *  target1 = nullptr,
WorldObject const *  target2 = nullptr 
) const

Definition at line 1165 of file ConditionMgr.cpp.

+ Here is the call graph for this function:

◆ IsObjectMeetingPlayerChoiceResponseConditions()

bool ConditionMgr::IsObjectMeetingPlayerChoiceResponseConditions ( uint32  playerChoiceId,
int32  playerChoiceResponseId,
Player const *  player 
) const

Definition at line 1244 of file ConditionMgr.cpp.

+ Here is the call graph for this function:

◆ IsObjectMeetingSmartEventConditions()

bool ConditionMgr::IsObjectMeetingSmartEventConditions ( int64  entryOrGuid,
uint32  eventId,
uint32  sourceType,
Unit const *  unit,
WorldObject const *  baseObject 
) const

Definition at line 1220 of file ConditionMgr.cpp.

+ Here is the call graph for this function:

◆ IsObjectMeetingSpellClickConditions()

bool ConditionMgr::IsObjectMeetingSpellClickConditions ( uint32  creatureId,
uint32  spellId,
WorldObject const *  clicker,
WorldObject const *  target 
) const

Definition at line 1185 of file ConditionMgr.cpp.

+ Here is the call graph for this function:

◆ IsObjectMeetingTrainerSpellConditions()

bool ConditionMgr::IsObjectMeetingTrainerSpellConditions ( uint32  trainerId,
uint32  spellId,
Player player 
) const

Definition at line 1268 of file ConditionMgr.cpp.

+ Here is the call graph for this function:

◆ IsObjectMeetingVehicleSpellConditions()

bool ConditionMgr::IsObjectMeetingVehicleSpellConditions ( uint32  creatureId,
uint32  spellId,
Player const *  player,
Unit const *  vehicle 
) const

Definition at line 1208 of file ConditionMgr.cpp.

+ Here is the call graph for this function:

◆ IsObjectMeetingVendorItemConditions()

bool ConditionMgr::IsObjectMeetingVendorItemConditions ( uint32  creatureId,
uint32  itemId,
Player const *  player,
Creature const *  vendor 
) const

Definition at line 1232 of file ConditionMgr.cpp.

+ Here is the call graph for this function:

◆ IsObjectMeetingVisibilityByObjectIdConditions()

bool ConditionMgr::IsObjectMeetingVisibilityByObjectIdConditions ( WorldObject const *  obj,
WorldObject const *  seer 
) const

Definition at line 1279 of file ConditionMgr.cpp.

+ Here is the call graph for this function:

◆ IsObjectMeetToConditionList()

bool ConditionMgr::IsObjectMeetToConditionList ( ConditionSourceInfo sourceInfo,
ConditionContainer const &  conditions 
) const
private

Find ElseGroup in ElseGroupStore

If another condition in this group was unmatched before this, don't bother checking (the group is false anyway)

Definition at line 1021 of file ConditionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsObjectMeetToConditions() [1/3]

bool ConditionMgr::IsObjectMeetToConditions ( ConditionSourceInfo sourceInfo,
ConditionContainer const &  conditions 
) const

Definition at line 1080 of file ConditionMgr.cpp.

+ Here is the call graph for this function:

◆ IsObjectMeetToConditions() [2/3]

bool ConditionMgr::IsObjectMeetToConditions ( WorldObject const *  object,
ConditionContainer const &  conditions 
) const

Definition at line 1068 of file ConditionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsObjectMeetToConditions() [3/3]

bool ConditionMgr::IsObjectMeetToConditions ( WorldObject const *  object1,
WorldObject const *  object2,
ConditionContainer const &  conditions 
) const

Definition at line 1074 of file ConditionMgr.cpp.

+ Here is the call graph for this function:

◆ IsPlayerMeetingCondition() [1/2]

bool ConditionMgr::IsPlayerMeetingCondition ( Player const *  player,
PlayerConditionEntry const *  condition 
)
static

Definition at line 2881 of file ConditionMgr.cpp.

+ Here is the call graph for this function:

◆ IsPlayerMeetingCondition() [2/2]

bool ConditionMgr::IsPlayerMeetingCondition ( Player const *  player,
uint32  conditionId 
)
static

Definition at line 2867 of file ConditionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isSourceTypeValid()

bool ConditionMgr::isSourceTypeValid ( Condition cond) const
private

Definition at line 1739 of file ConditionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsSpellUsedInSpellClickConditions()

bool ConditionMgr::IsSpellUsedInSpellClickConditions ( uint32  spellId) const

Definition at line 1255 of file ConditionMgr.cpp.

◆ IsUnitMeetingCondition()

bool ConditionMgr::IsUnitMeetingCondition ( Unit const *  unit,
Unit const *  otherUnit,
UnitConditionEntry const *  condition 
)
static

Definition at line 4016 of file ConditionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadConditions()

void ConditionMgr::LoadConditions ( bool  isReload = false)

Definition at line 1296 of file ConditionMgr.cpp.

+ Here is the call graph for this function:

◆ LogUselessConditionValue() [1/2]

void ConditionMgr::LogUselessConditionValue ( Condition const *  cond,
uint8  index,
std::string const &  value 
)
staticprivate

Definition at line 2749 of file ConditionMgr.cpp.

◆ LogUselessConditionValue() [2/2]

void ConditionMgr::LogUselessConditionValue ( Condition const *  cond,
uint8  index,
uint32  value 
)
staticprivate

Definition at line 2744 of file ConditionMgr.cpp.

+ Here is the caller graph for this function:

◆ operator=() [1/2]

ConditionMgr & ConditionMgr::operator= ( ConditionMgr &&  )
delete

◆ operator=() [2/2]

ConditionMgr & ConditionMgr::operator= ( ConditionMgr const &  )
delete

Member Data Documentation

◆ ConditionStore

ConditionEntriesByTypeArray ConditionMgr::ConditionStore
private

Definition at line 377 of file ConditionMgr.h.

◆ SpellsUsedInSpellClickConditions

std::unordered_set<uint32> ConditionMgr::SpellsUsedInSpellClickConditions
private

Definition at line 379 of file ConditionMgr.h.

◆ StaticConditionTypeData

ConditionMgr::ConditionTypeInfo const ConditionMgr::StaticConditionTypeData
static

Definition at line 102 of file ConditionMgr.h.

◆ StaticSourceTypeData

char const *const ConditionMgr::StaticSourceTypeData
static

Definition at line 61 of file ConditionMgr.h.


The documentation for this class was generated from the following files: