![]() |
TrinityCore
|
#include "Define.h"#include "Hash.h"#include <array>#include <string>#include <unordered_map>#include <unordered_set>#include <vector>
Include dependency graph for ConditionMgr.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Classes | |
| struct | ConditionSourceInfo |
| struct | Condition |
| class | ConditionMgr |
| struct | ConditionMgr::ConditionTypeInfo |
Macros | |
| #define | sConditionMgr ConditionMgr::instance() |
Typedefs | |
| typedef std::vector< Condition * > | ConditionContainer |
| typedef std::unordered_map< uint32, ConditionContainer > | ConditionsByEntryMap |
| typedef std::array< ConditionsByEntryMap, CONDITION_SOURCE_TYPE_MAX > | ConditionEntriesByTypeArray |
| typedef std::unordered_map< uint32, ConditionsByEntryMap > | ConditionEntriesByCreatureIdMap |
| typedef std::unordered_map< std::pair< int32, uint32 >, ConditionsByEntryMap > | SmartEventConditionContainer |
| typedef std::unordered_map< uint32, ConditionContainer > | ConditionReferenceContainer |
| #define sConditionMgr ConditionMgr::instance() |
Definition at line 321 of file ConditionMgr.h.
| typedef std::vector<Condition*> ConditionContainer |
Definition at line 250 of file ConditionMgr.h.
| typedef std::unordered_map<uint32, ConditionsByEntryMap> ConditionEntriesByCreatureIdMap |
Definition at line 253 of file ConditionMgr.h.
| typedef std::array<ConditionsByEntryMap, CONDITION_SOURCE_TYPE_MAX> ConditionEntriesByTypeArray |
Definition at line 252 of file ConditionMgr.h.
| typedef std::unordered_map<uint32, ConditionContainer> ConditionReferenceContainer |
Definition at line 255 of file ConditionMgr.h.
| typedef std::unordered_map<uint32 , ConditionContainer> ConditionsByEntryMap |
Definition at line 251 of file ConditionMgr.h.
| typedef std::unordered_map<std::pair<int32, uint32 >, ConditionsByEntryMap> SmartEventConditionContainer |
Definition at line 254 of file ConditionMgr.h.
| enum ConditionSourceType |
Documentation on implementing a new ConditionSourceType: Step 1: Check for the lowest free ID. Look for CONDITION_SOURCE_TYPE_UNUSED_XX in the enum. Then define the new source type.
Step 2: Determine and map the parameters for the new condition type.
Step 3: Add a case block to ConditionMgr::isSourceTypeValid with the new condition type and validate the parameters.
Step 4: If your condition can be grouped (determined in step 2), add a rule for it in ConditionMgr::CanHaveSourceGroupSet, following the example of the existing types.
Step 5: Define the maximum available condition targets in ConditionMgr::GetMaxAvailableConditionTargets.
The following steps only apply if your condition can be grouped:
Step 6: Determine how you are going to store your conditions. You need to add a new storage container for it in ConditionMgr class, along with a function like: ConditionList GetConditionsForXXXYourNewSourceTypeXXX(parameters...)
The above function should be placed in upper level (practical) code that actually checks the conditions.
Step 7: Implement loading for your source type in ConditionMgr::LoadConditions.
Step 8: Implement memory cleaning for your source type in ConditionMgr::Clean.
Definition at line 128 of file ConditionMgr.h.
| enum ConditionTypes |
Definition at line 36 of file ConditionMgr.h.
| enum InstanceInfo |
| Enumerator | |
|---|---|
| INSTANCE_INFO_DATA | |
| INSTANCE_INFO_GUID_DATA | |
| INSTANCE_INFO_BOSS_STATE | |
| INSTANCE_INFO_DATA64 | |
Definition at line 178 of file ConditionMgr.h.
| enum MaxConditionTargets |
| Enumerator | |
|---|---|
| MAX_CONDITION_TARGETS | |
Definition at line 186 of file ConditionMgr.h.
| enum RelationType |
| Enumerator | |
|---|---|
| RELATION_SELF | |
| RELATION_IN_PARTY | |
| RELATION_IN_RAID_OR_PARTY | |
| RELATION_OWNED_BY | |
| RELATION_PASSENGER_OF | |
| RELATION_CREATED_BY | |
| RELATION_MAX | |
Definition at line 167 of file ConditionMgr.h.