![]() |
TrinityCore
|
#include "Common.h"
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() |
| typedef std::vector<Condition*> ConditionContainer |
| typedef std::unordered_map<uint32, ConditionsByEntryMap> ConditionEntriesByCreatureIdMap |
| typedef std::array<ConditionsByEntryMap, CONDITION_SOURCE_TYPE_MAX> ConditionEntriesByTypeArray |
| typedef std::unordered_map<uint32, ConditionContainer> ConditionReferenceContainer |
| typedef std::unordered_map<uint32 , ConditionContainer> ConditionsByEntryMap |
| typedef std::unordered_map<std::pair<int32, uint32 >, ConditionsByEntryMap> SmartEventConditionContainer |
| 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.
| 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.
| enum InstanceInfo |
| enum MaxConditionTargets |
| enum RelationType |
| Enumerator | |
|---|---|
| RELATION_SELF | |
| RELATION_IN_PARTY | |
| RELATION_IN_RAID_OR_PARTY | |
| RELATION_OWNED_BY | |
| RELATION_PASSENGER_OF | |
| RELATION_CREATED_BY | |
| RELATION_MAX | |
1.8.8