TrinityCore
ConditionMgr Class Reference

#include <ConditionMgr.h>

Classes

struct  ConditionTypeInfo
 

Public Member Functions

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 IsSpellUsedInSpellClickConditions (uint32 spellId) const
 
ConditionContainer const * GetConditionsForAreaTrigger (uint32 areaTriggerId, bool isServerSide) const
 
bool IsObjectMeetingTrainerSpellConditions (uint32 trainerId, uint32 spellId, Player *player) const
 
bool IsObjectMeetingVisibilityByObjectIdConditions (uint32 objectType, uint32 entry, 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, 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_view value)
 

Private Attributes

ConditionEntriesByTypeArray ConditionStore
 
std::unordered_set< uint32SpellsUsedInSpellClickConditions
 

Detailed Description

Definition at line 294 of file ConditionMgr.h.

Constructor & Destructor Documentation

◆ ConditionMgr()

ConditionMgr::ConditionMgr ( )
private

Definition at line 950 of file ConditionMgr.cpp.

◆ ~ConditionMgr()

ConditionMgr::~ConditionMgr ( )
private

Definition at line 952 of file ConditionMgr.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ addToGossipMenuItems()

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

Definition at line 1483 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 1466 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 1651 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 1450 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 1609 of file ConditionMgr.cpp.

+ Here is the caller graph for this function:

◆ addToSpellImplicitTargetConditions()

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

Definition at line 1499 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 1095 of file ConditionMgr.cpp.

◆ CanHaveSourceGroupSet()

bool ConditionMgr::CanHaveSourceGroupSet ( ConditionSourceType  sourceType)
static

Definition at line 1061 of file ConditionMgr.cpp.

+ Here is the caller graph for this function:

◆ CanHaveSourceIdSet()

bool ConditionMgr::CanHaveSourceIdSet ( ConditionSourceType  sourceType)
static

Definition at line 1090 of file ConditionMgr.cpp.

+ Here is the caller graph for this function:

◆ Clean()

void ConditionMgr::Clean ( )
private

Definition at line 2722 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 1220 of file ConditionMgr.cpp.

◆ GetPlayerConditionLfgValue()

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

Definition at line 2780 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 957 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 1148 of file ConditionMgr.cpp.

◆ HasConditionsForSpellClickEvent()

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

Definition at line 1168 of file ConditionMgr.cpp.

◆ instance()

ConditionMgr * ConditionMgr::instance ( )
static

Definition at line 1250 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 2136 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 1142 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 3641 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 1121 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 1136 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 1191 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 1156 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 1228 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 1179 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 1203 of file ConditionMgr.cpp.

+ Here is the call graph for this function:

◆ IsObjectMeetingVisibilityByObjectIdConditions()

bool ConditionMgr::IsObjectMeetingVisibilityByObjectIdConditions ( uint32  objectType,
uint32  entry,
WorldObject const *  seer 
) const

Definition at line 1239 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 997 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 1052 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 1040 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 1046 of file ConditionMgr.cpp.

+ Here is the call graph for this function:

◆ IsPlayerMeetingCondition()

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

Definition at line 2825 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 1663 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 1215 of file ConditionMgr.cpp.

◆ IsUnitMeetingCondition()

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

Definition at line 3946 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 1256 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_view  value 
)
staticprivate

Definition at line 2717 of file ConditionMgr.cpp.

+ Here is the call graph for this function:

◆ LogUselessConditionValue() [2/2]

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

Definition at line 2712 of file ConditionMgr.cpp.

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

Member Data Documentation

◆ ConditionStore

ConditionEntriesByTypeArray ConditionMgr::ConditionStore
private

Definition at line 360 of file ConditionMgr.h.

◆ SpellsUsedInSpellClickConditions

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

Definition at line 362 of file ConditionMgr.h.

◆ StaticConditionTypeData

ConditionMgr::ConditionTypeInfo const ConditionMgr::StaticConditionTypeData
static

Definition at line 343 of file ConditionMgr.h.

◆ StaticSourceTypeData

char const *const ConditionMgr::StaticSourceTypeData
static

Definition at line 342 of file ConditionMgr.h.


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