|
Project SkyFire Core
SkyFire 5.4.8 server core API documentation
|
#include "Define.h"#include "Errors.h"#include "Platform/Singleton.h"#include <list>#include <map>#include "SharedDefines.h"Go to the source code of this file.
Classes | |
| struct | Condition |
| class | ConditionMgr |
| struct | ConditionSourceInfo |
Macros | |
| #define | sConditionMgr Skyfire::Singleton<ConditionMgr, Skyfire::NullMutex>::instance() |
Typedefs | |
| typedef std::map< ConditionSourceType, ConditionTypeContainer > | ConditionContainer |
| typedef std::list< Condition * > | ConditionList |
| typedef std::map< uint32, ConditionList > | ConditionReferenceContainer |
| typedef std::map< uint32, ConditionList > | ConditionTypeContainer |
| typedef std::map< uint32, ConditionTypeContainer > | CreatureSpellConditionContainer |
| typedef std::map< uint32, ConditionTypeContainer > | NpcVendorConditionContainer |
| typedef std::map< std::pair< int32, uint32 >, ConditionTypeContainer > | SmartEventConditionContainer |
| #define sConditionMgr Skyfire::Singleton<ConditionMgr, Skyfire::NullMutex>::instance() |
Definition at line 260 of file ConditionMgr.h.
Referenced by LootItem::AllowedForPlayer(), Player::CanSeeSpellClickOn(), Spell::CheckCast(), VehicleAI::CheckConditions(), WorldSession::getDialogStatus(), Player::GetGossipTextId(), Spell::GetSearcherTypeMask(), reload_commandscript::HandleReloadAllLootCommand(), reload_commandscript::HandleReloadConditions(), reload_commandscript::HandleReloadGossipMenuCommand(), reload_commandscript::HandleReloadGossipMenuOptionCommand(), reload_commandscript::HandleReloadLootTemplatesCreatureCommand(), reload_commandscript::HandleReloadLootTemplatesDisenchantCommand(), reload_commandscript::HandleReloadLootTemplatesFishingCommand(), reload_commandscript::HandleReloadLootTemplatesGameobjectCommand(), reload_commandscript::HandleReloadLootTemplatesItemCommand(), reload_commandscript::HandleReloadLootTemplatesMailCommand(), reload_commandscript::HandleReloadLootTemplatesMillingCommand(), reload_commandscript::HandleReloadLootTemplatesPickpocketingCommand(), reload_commandscript::HandleReloadLootTemplatesProspectingCommand(), reload_commandscript::HandleReloadLootTemplatesReferenceCommand(), reload_commandscript::HandleReloadLootTemplatesSkinningCommand(), reload_commandscript::HandleReloadLootTemplatesSpellCommand(), Unit::HandleSpellClick(), Aura::IsProcTriggeredOnEvent(), VehicleAI::LoadConditions(), Skyfire::WorldObjectSpellTargetCheck::operator()(), Player::PrepareGossipMenu(), Unit::ProcDamageAndSpellFor(), SmartScript::ProcessEventsFor(), SmartScript::ProcessTimedAction(), WorldObject::RebuildTerrainSwaps(), WorldObject::RebuildWorldMapAreaSwaps(), Player::SatisfyQuestConditions(), WorldSession::SendListInventory(), World::SetInitialWorldSettings(), WorldObject::SetPhased(), WorldObject::UpdateAreaPhase(), and Player::VehicleSpellInitialize().
| typedef std::map<ConditionSourceType, ConditionTypeContainer> ConditionContainer |
Definition at line 207 of file ConditionMgr.h.
| typedef std::list<Condition*> ConditionList |
Definition at line 205 of file ConditionMgr.h.
| typedef std::map<uint32, ConditionList> ConditionReferenceContainer |
Definition at line 212 of file ConditionMgr.h.
| typedef std::map<uint32, ConditionList> ConditionTypeContainer |
Definition at line 206 of file ConditionMgr.h.
| typedef std::map<uint32, ConditionTypeContainer> CreatureSpellConditionContainer |
Definition at line 208 of file ConditionMgr.h.
| typedef std::map<uint32, ConditionTypeContainer> NpcVendorConditionContainer |
Definition at line 209 of file ConditionMgr.h.
| typedef std::map<std::pair<int32, uint32 >, ConditionTypeContainer> SmartEventConditionContainer |
Definition at line 210 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 94 of file ConditionMgr.h.
| enum ConditionTypes |
Definition at line 22 of file ConditionMgr.h.
| enum InstanceInfo |
| Enumerator | |
|---|---|
| INSTANCE_INFO_DATA | |
| INSTANCE_INFO_DATA64 | |
| INSTANCE_INFO_BOSS_STATE | |
Definition at line 137 of file ConditionMgr.h.
| enum MaxConditionTargets |
| Enumerator | |
|---|---|
| MAX_CONDITION_TARGETS | |
Definition at line 144 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 126 of file ConditionMgr.h.