TrinityCore
Loading...
Searching...
No Matches
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 *object, ConditionContainer const &conditions) const
 
bool IsObjectMeetToConditions (WorldObject *object1, WorldObject *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 *target0, WorldObject *target1=nullptr, WorldObject *target2=nullptr) const
 
bool HasConditionsForNotGroupedEntry (ConditionSourceType sourceType, uint32 entry) const
 
bool IsObjectMeetingSpellClickConditions (uint32 creatureId, uint32 spellId, WorldObject *clicker, WorldObject *target) const
 
ConditionContainer const * GetConditionsForSpellClickEvent (uint32 creatureId, uint32 spellId) const
 
bool IsObjectMeetingVehicleSpellConditions (uint32 creatureId, uint32 spellId, Player *player, Unit *vehicle) const
 
bool IsObjectMeetingSmartEventConditions (int32 entryOrGuid, uint32 eventId, uint32 sourceType, Unit *unit, WorldObject *baseObject) const
 
bool IsObjectMeetingVendorItemConditions (uint32 creatureId, uint32 itemId, Player *player, Creature *vendor) const
 
bool IsSpellUsedInSpellClickConditions (uint32 spellId) const
 

Static Public Member Functions

static ConditionMgrinstance ()
 
static bool CanHaveSourceGroupSet (ConditionSourceType sourceType)
 
static bool CanHaveSourceIdSet (ConditionSourceType sourceType)
 

Static Public Attributes

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

Private Member Functions

 ConditionMgr ()
 
 ~ConditionMgr ()
 
bool isSourceTypeValid (Condition *cond) const
 
bool addToLootTemplate (Condition *cond, LootTemplate *loot) const
 
bool addToGossipMenus (Condition *cond) const
 
bool addToGossipMenuItems (Condition *cond) const
 
bool addToSpellImplicitTargetConditions (Condition *cond) 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

std::vector< Condition * > AllocatedMemoryStore
 
ConditionEntriesByTypeArray ConditionStore
 
ConditionReferenceContainer ConditionReferenceStore
 
ConditionEntriesByCreatureIdMap VehicleSpellConditionStore
 
ConditionEntriesByCreatureIdMap SpellClickEventConditionStore
 
ConditionEntriesByCreatureIdMap NpcVendorConditionContainerStore
 
SmartEventConditionContainer SmartEventConditionStore
 
std::unordered_set< uint32SpellsUsedInSpellClickConditions
 

Detailed Description

Definition at line 257 of file ConditionMgr.h.

Constructor & Destructor Documentation

◆ ConditionMgr()

ConditionMgr::ConditionMgr ( )
private

Definition at line 809 of file ConditionMgr.cpp.

◆ ~ConditionMgr()

ConditionMgr::~ConditionMgr ( )
private

Definition at line 811 of file ConditionMgr.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ addToGossipMenuItems()

bool ConditionMgr::addToGossipMenuItems ( Condition cond) const
private

Definition at line 1363 of file ConditionMgr.cpp.

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

◆ addToGossipMenus()

bool ConditionMgr::addToGossipMenus ( Condition cond) const
private

Definition at line 1343 of file ConditionMgr.cpp.

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

◆ addToLootTemplate()

bool ConditionMgr::addToLootTemplate ( Condition cond,
LootTemplate loot 
) const
private

Definition at line 1328 of file ConditionMgr.cpp.

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

◆ addToSpellImplicitTargetConditions()

bool ConditionMgr::addToSpellImplicitTargetConditions ( Condition cond) const
private

Definition at line 1382 of file ConditionMgr.cpp.

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

◆ CanHaveSourceGroupSet()

bool ConditionMgr::CanHaveSourceGroupSet ( ConditionSourceType  sourceType)
static

Definition at line 923 of file ConditionMgr.cpp.

+ Here is the caller graph for this function:

◆ CanHaveSourceIdSet()

bool ConditionMgr::CanHaveSourceIdSet ( ConditionSourceType  sourceType)
static

Definition at line 946 of file ConditionMgr.cpp.

+ Here is the caller graph for this function:

◆ Clean()

void ConditionMgr::Clean ( )
private

Definition at line 2443 of file ConditionMgr.cpp.

+ Here is the caller graph for this function:

◆ GetConditionsForSpellClickEvent()

ConditionContainer const * ConditionMgr::GetConditionsForSpellClickEvent ( uint32  creatureId,
uint32  spellId 
) const

Definition at line 997 of file ConditionMgr.cpp.

◆ GetSearcherTypeMaskForConditionList()

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

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

◆ instance()

ConditionMgr * ConditionMgr::instance ( )
static

Definition at line 1065 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 1890 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 951 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 target0,
WorldObject target1 = nullptr,
WorldObject target2 = nullptr 
) const

Definition at line 966 of file ConditionMgr.cpp.

+ Here is the call graph for this function:

◆ IsObjectMeetingSmartEventConditions()

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

Definition at line 1028 of file ConditionMgr.cpp.

+ Here is the call graph for this function:

◆ IsObjectMeetingSpellClickConditions()

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

Definition at line 981 of file ConditionMgr.cpp.

+ Here is the call graph for this function:

◆ IsObjectMeetingVehicleSpellConditions()

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

Definition at line 1012 of file ConditionMgr.cpp.

+ Here is the call graph for this function:

◆ IsObjectMeetingVendorItemConditions()

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

Definition at line 1044 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 not found, add an entry in the store and set to true (placeholder)

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

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

+ Here is the call graph for this function:

◆ IsObjectMeetToConditions() [2/3]

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

Definition at line 902 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 object1,
WorldObject object2,
ConditionContainer const &  conditions 
) const

Definition at line 908 of file ConditionMgr.cpp.

+ Here is the call graph for this function:

◆ isSourceTypeValid()

bool ConditionMgr::isSourceTypeValid ( Condition cond) const
private

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

◆ LoadConditions()

void ConditionMgr::LoadConditions ( bool  isReload = false)

TODO: PAIR_32 ?

Definition at line 1071 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 2438 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 2433 of file ConditionMgr.cpp.

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

Member Data Documentation

◆ AllocatedMemoryStore

std::vector<Condition*> ConditionMgr::AllocatedMemoryStore
private

Definition at line 309 of file ConditionMgr.h.

◆ ConditionReferenceStore

ConditionReferenceContainer ConditionMgr::ConditionReferenceStore
private

Definition at line 312 of file ConditionMgr.h.

◆ ConditionStore

ConditionEntriesByTypeArray ConditionMgr::ConditionStore
private

Definition at line 311 of file ConditionMgr.h.

◆ NpcVendorConditionContainerStore

ConditionEntriesByCreatureIdMap ConditionMgr::NpcVendorConditionContainerStore
private

Definition at line 315 of file ConditionMgr.h.

◆ SmartEventConditionStore

SmartEventConditionContainer ConditionMgr::SmartEventConditionStore
private

Definition at line 316 of file ConditionMgr.h.

◆ SpellClickEventConditionStore

ConditionEntriesByCreatureIdMap ConditionMgr::SpellClickEventConditionStore
private

Definition at line 314 of file ConditionMgr.h.

◆ SpellsUsedInSpellClickConditions

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

Definition at line 318 of file ConditionMgr.h.

◆ StaticConditionTypeData

ConditionMgr::ConditionTypeInfo const ConditionMgr::StaticConditionTypeData
static

Definition at line 68 of file ConditionMgr.h.

◆ StaticSourceTypeData

char const *const ConditionMgr::StaticSourceTypeData
static
Initial value:
=
{
"None",
"Creature Loot",
"Disenchant Loot",
"Fishing Loot",
"GameObject Loot",
"Item Loot",
"Mail Loot",
"Milling Loot",
"Pickpocketing Loot",
"Prospecting Loot",
"Reference Loot",
"Skinning Loot",
"Spell Loot",
"Spell Impl. Target",
"Gossip Menu",
"Gossip Menu Option",
"Creature Vehicle",
"Spell Expl. Target",
"Spell Click Event",
"Quest Accept",
"Quest Show Mark",
"Vehicle Spell",
"SmartScript",
"Npc Vendor",
"Spell Proc",
"Terrain Swap",
"Phase"
}

Definition at line 37 of file ConditionMgr.h.

◆ VehicleSpellConditionStore

ConditionEntriesByCreatureIdMap ConditionMgr::VehicleSpellConditionStore
private

Definition at line 313 of file ConditionMgr.h.


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