![]() |
TrinityCore
|
#include "Define.h"#include "Hash.h"#include "StringFormatFwd.h"#include <array>#include <memory>#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 | ConditionId |
| struct | std::hash< ConditionId > |
| struct | Condition |
| struct | fmt::formatter< Condition, char, void > |
| class | ConditionMgr |
| struct | ConditionMgr::ConditionTypeInfo |
| struct | ConditionsReference |
Macros | |
| #define | sConditionMgr ConditionMgr::instance() |
Typedefs | |
| typedef std::vector< Condition > | ConditionContainer |
| typedef std::unordered_map< ConditionId, std::shared_ptr< ConditionContainer > > | ConditionsByEntryMap |
| typedef std::array< ConditionsByEntryMap, CONDITION_SOURCE_TYPE_MAX > | ConditionEntriesByTypeArray |
| #define sConditionMgr ConditionMgr::instance() |
Definition at line 382 of file ConditionMgr.h.
| typedef std::vector<Condition> ConditionContainer |
Definition at line 300 of file ConditionMgr.h.
| typedef std::array<ConditionsByEntryMap, CONDITION_SOURCE_TYPE_MAX> ConditionEntriesByTypeArray |
Definition at line 302 of file ConditionMgr.h.
| typedef std::unordered_map<ConditionId, std::shared_ptr<ConditionContainer> > ConditionsByEntryMap |
Definition at line 301 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 source 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.
Step 6: Define ConditionSourceType Name in ConditionMgr::StaticSourceTypeData.
The following steps only apply if your condition can be grouped:
Step 7: 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 8: Implement loading for your source type in ConditionMgr::LoadConditions.
Step 9: Implement memory cleaning for your source type in ConditionMgr::Clean.
Definition at line 154 of file ConditionMgr.h.
| enum ConditionTypes |
Documentation on implementing a new ConditionType: Step 1: Check for the lowest free ID. Look for CONDITION_UNUSED_XX in the enum. Then define the new condition type.
Step 2: Determine and map the parameters for the new condition type.
Step 3: Add a case block to ConditionMgr::isConditionTypeValid with the new condition type and validate the parameters.
Step 4: Define the maximum available condition targets in ConditionMgr::GetMaxAvailableConditionTargets.
Step 5: Define the grid searcher mask in Condition::GetSearcherTypeMaskForCondition.
Step 6: Add a case block to ConditionMgr::Meets with the new condition type.
Step 7: Define condition name and expected condition values in ConditionMgr::StaticConditionTypeData.
Definition at line 60 of file ConditionMgr.h.
| enum InstanceInfo |
| Enumerator | |
|---|---|
| INSTANCE_INFO_DATA | |
| INSTANCE_INFO_GUID_DATA | |
| INSTANCE_INFO_BOSS_STATE | |
| INSTANCE_INFO_DATA64 | |
Definition at line 210 of file ConditionMgr.h.
| enum MaxConditionTargets |
| Enumerator | |
|---|---|
| MAX_CONDITION_TARGETS | |
Definition at line 218 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 199 of file ConditionMgr.h.