TrinityCore
Loading...
Searching...
No Matches
ConditionMgr Class Reference

#include <ConditionMgr.h>

Classes

struct  ConditionTypeInfo
 

Public Member Functions

 ConditionMgr (ConditionMgr const &)=delete
 
 ConditionMgr (ConditionMgr &&)=delete
 
ConditionMgr & operator= (ConditionMgr const &)=delete
 
ConditionMgr & operator= (ConditionMgr &&)=delete
 
void LoadConditions (bool isReload=false)
 
bool isConditionTypeValid (Condition *cond) const
 
uint32 GetSearcherTypeMaskForConditionList (ConditionContainer const &conditions) const
 
bool IsObjectMeetToConditions (WorldObject const *object, ConditionContainer const &conditions) const
 
bool IsObjectMeetToConditions (WorldObject const *object1, WorldObject const *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 const *target0, WorldObject const *target1=nullptr, WorldObject const *target2=nullptr) const
 
bool IsMapMeetingNotGroupedConditions (ConditionSourceType sourceType, uint32 entry, Map const *map) const
 
bool HasConditionsForNotGroupedEntry (ConditionSourceType sourceType, uint32 entry) const
 
bool IsObjectMeetingSpellClickConditions (uint32 creatureId, uint32 spellId, WorldObject const *clicker, WorldObject const *target) const
 
bool HasConditionsForSpellClickEvent (uint32 creatureId, uint32 spellId) const
 
bool IsObjectMeetingVehicleSpellConditions (uint32 creatureId, uint32 spellId, Player const *player, Unit const *vehicle) const
 
bool IsObjectMeetingSmartEventConditions (int64 entryOrGuid, uint32 eventId, uint32 sourceType, Unit const *unit, WorldObject const *baseObject) const
 
bool IsObjectMeetingVendorItemConditions (uint32 creatureId, uint32 itemId, Player const *player, Creature const *vendor) const
 
bool IsObjectMeetingPlayerChoiceResponseConditions (uint32 playerChoiceId, int32 playerChoiceResponseId, Player const *player) const
 
bool IsSpellUsedInSpellClickConditions (uint32 spellId) const
 
ConditionContainer const * GetConditionsForAreaTrigger (uint32 areaTriggerId, bool isServerSide) const
 
bool IsObjectMeetingTrainerSpellConditions (uint32 trainerId, uint32 spellId, Player *player) const
 
bool IsObjectMeetingVisibilityByObjectIdConditions (WorldObject const *obj, WorldObject const *seer) const
 

Static Public Member Functions

static ConditionMgr * instance ()
 
static bool CanHaveSourceGroupSet (ConditionSourceType sourceType)
 
static bool CanHaveSourceIdSet (ConditionSourceType sourceType)
 
static bool CanHaveConditionType (ConditionSourceType sourceType, ConditionTypes conditionType)
 
static uint32 GetPlayerConditionLfgValue (Player const *player, PlayerConditionLfgStatus status)
 
static bool IsPlayerMeetingCondition (Player const *player, uint32 conditionId)
 
static bool IsPlayerMeetingCondition (Player const *player, PlayerConditionEntry const *condition)
 
static bool IsMeetingWorldStateExpression (Map const *map, WorldStateExpressionEntry const *expression)
 
static bool IsUnitMeetingCondition (Unit const *unit, Unit const *otherUnit, UnitConditionEntry const *condition)
 

Static Public Attributes

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

Private Member Functions

 ConditionMgr ()
 
 ~ConditionMgr ()
 
bool isSourceTypeValid (Condition *cond) const
 
void addToLootTemplate (ConditionId const &id, std::shared_ptr< std::vector< Condition > > conditions, LootTemplate *loot) const
 
void addToGossipMenus (ConditionId const &id, std::shared_ptr< std::vector< Condition > > conditions) const
 
void addToGossipMenuItems (ConditionId const &id, std::shared_ptr< std::vector< Condition > > conditions) const
 
void addToSpellImplicitTargetConditions (Condition const &cond) const
 
void addToPhases (ConditionId const &id, std::shared_ptr< std::vector< Condition > > conditions) const
 
void addToGraveyardData (ConditionId const &id, std::shared_ptr< std::vector< Condition > > conditions) 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 const &value)
 

Private Attributes

ConditionEntriesByTypeArray ConditionStore
 
std::unordered_set< uint32 > SpellsUsedInSpellClickConditions
 

Detailed Description

Definition at line 314 of file ConditionMgr.h.

Constructor & Destructor Documentation

◆ ConditionMgr() [1/3]

ConditionMgr::ConditionMgr ( )
privatedefault

◆ ~ConditionMgr()

ConditionMgr::~ConditionMgr ( )
private

Definition at line 1007 of file ConditionMgr.cpp.

References Clean().

◆ ConditionMgr() [2/3]

ConditionMgr::ConditionMgr ( ConditionMgr const &  )
delete

◆ ConditionMgr() [3/3]

ConditionMgr::ConditionMgr ( ConditionMgr &&  )
delete

Member Function Documentation

◆ addToGossipMenuItems()

void ConditionMgr::addToGossipMenuItems ( ConditionId const &  id,
std::shared_ptr< std::vector< Condition > >  conditions 
) const
private

Definition at line 1588 of file ConditionMgr.cpp.

References sObjectMgr, and TC_LOG_ERROR.

Referenced by LoadConditions().

◆ addToGossipMenus()

void ConditionMgr::addToGossipMenus ( ConditionId const &  id,
std::shared_ptr< std::vector< Condition > >  conditions 
) const
private

Definition at line 1571 of file ConditionMgr.cpp.

References sObjectMgr.

Referenced by LoadConditions().

◆ addToGraveyardData()

void ConditionMgr::addToGraveyardData ( ConditionId const &  id,
std::shared_ptr< std::vector< Condition > >  conditions 
) const
private

Definition at line 1756 of file ConditionMgr.cpp.

References sObjectMgr, and TC_LOG_ERROR.

Referenced by LoadConditions().

◆ addToLootTemplate()

void ConditionMgr::addToLootTemplate ( ConditionId const &  id,
std::shared_ptr< std::vector< Condition > >  conditions,
LootTemplate *  loot 
) const
private

Definition at line 1555 of file ConditionMgr.cpp.

References LootTemplate::LinkConditions(), and TC_LOG_ERROR.

Referenced by LoadConditions().

◆ addToPhases()

void ConditionMgr::addToPhases ( ConditionId const &  id,
std::shared_ptr< std::vector< Condition > >  conditions 
) const
private

Definition at line 1714 of file ConditionMgr.cpp.

References sObjectMgr, and TC_LOG_ERROR.

Referenced by LoadConditions().

◆ addToSpellImplicitTargetConditions()

void ConditionMgr::addToSpellImplicitTargetConditions ( Condition const &  cond) const
private

◆ CanHaveConditionType()

◆ CanHaveSourceGroupSet()

◆ CanHaveSourceIdSet()

bool ConditionMgr::CanHaveSourceIdSet ( ConditionSourceType  sourceType)
static

Definition at line 1148 of file ConditionMgr.cpp.

References CONDITION_SOURCE_TYPE_SMART_EVENT.

Referenced by LoadConditions().

◆ Clean()

void ConditionMgr::Clean ( )
private

Definition at line 2790 of file ConditionMgr.cpp.

References ConditionStore, and SpellsUsedInSpellClickConditions.

Referenced by LoadConditions(), and ~ConditionMgr().

◆ GetConditionsForAreaTrigger()

ConditionContainer const * ConditionMgr::GetConditionsForAreaTrigger ( uint32  areaTriggerId,
bool  isServerSide 
) const

Definition at line 1289 of file ConditionMgr.cpp.

References CONDITION_SOURCE_TYPE_AREATRIGGER, and ConditionStore.

◆ GetPlayerConditionLfgValue()

◆ GetSearcherTypeMaskForConditionList()

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

◆ HasConditionsForNotGroupedEntry()

bool ConditionMgr::HasConditionsForNotGroupedEntry ( ConditionSourceType  sourceType,
uint32  entry 
) const

◆ HasConditionsForSpellClickEvent()

bool ConditionMgr::HasConditionsForSpellClickEvent ( uint32  creatureId,
uint32  spellId 
) const

◆ instance()

ConditionMgr * ConditionMgr::instance ( )
static

Definition at line 1319 of file ConditionMgr.cpp.

References instance().

Referenced by instance().

◆ isConditionTypeValid()

bool ConditionMgr::isConditionTypeValid ( Condition *  cond) const

Definition at line 2177 of file ConditionMgr.cpp.

References ALLIANCE, QuestObjective::Amount, CLASSMASK_ALL_PLAYABLE, COMP_TYPE_MAX, CONDITION_ACHIEVEMENT, CONDITION_ACTIVE_EVENT, CONDITION_ALIVE, CONDITION_AREAID, CONDITION_AURA, CONDITION_BATTLE_PET_COUNT, CONDITION_CHARMED, CONDITION_CLASS, CONDITION_CREATURE_TYPE, CONDITION_DAILY_QUEST_DONE, CONDITION_DIFFICULTY_ID, CONDITION_DISTANCE_TO, CONDITION_DRUNKENSTATE, CONDITION_GAMEMASTER, CONDITION_GENDER, CONDITION_GROUP_STATUS, CONDITION_HP_PCT, CONDITION_HP_VAL, CONDITION_IN_WATER, CONDITION_INSTANCE_INFO, CONDITION_ITEM, CONDITION_ITEM_EQUIPPED, CONDITION_LABEL, CONDITION_LEVEL, CONDITION_MAPID, CONDITION_NEAR_CREATURE, CONDITION_NEAR_GAMEOBJECT, CONDITION_NONE, CONDITION_OBJECT_ENTRY_GUID, CONDITION_OBJECT_ENTRY_GUID_LEGACY, CONDITION_PET_TYPE, CONDITION_PHASEID, CONDITION_PLAYER_CONDITION, CONDITION_PRIVATE_OBJECT, CONDITION_QUEST_COMPLETE, CONDITION_QUEST_NONE, CONDITION_QUEST_OBJECTIVE_PROGRESS, CONDITION_QUESTREWARDED, CONDITION_QUESTSTATE, CONDITION_QUESTTAKEN, CONDITION_RACE, CONDITION_REACTION_TO, CONDITION_REALM_ACHIEVEMENT, CONDITION_RELATION_TO, CONDITION_REPUTATION_RANK, CONDITION_SCENARIO_STEP, CONDITION_SCENE_IN_PROGRESS, CONDITION_SKILL, CONDITION_SPAWNMASK_DEPRECATED, CONDITION_SPELL, CONDITION_STAND_STATE, CONDITION_STRING_ID, CONDITION_TAXI, CONDITION_TEAM, CONDITION_TERRAIN_SWAP, CONDITION_TITLE, CONDITION_TYPE_MASK, CONDITION_TYPE_MASK_LEGACY, CONDITION_UNIT_STATE, CONDITION_WORLD_STATE, CONDITION_ZONEID, Condition::ConditionStringValue1, Condition::ConditionTarget, Condition::ConditionType, Condition::ConditionValue1, Condition::ConditionValue2, Condition::ConditionValue3, Trinity::Legacy::ConvertLegacyTypeID(), Trinity::Legacy::ConvertLegacyTypeMask(), CREATURE_TYPE_GAS_CLOUD, creatureData, BattlePets::DEFAULT_MAX_BATTLE_PETS_PER_SPECIES, DIFFICULTY_NONE, DRUNKEN_SMASHED, SpellInfo::GetEffect(), SpellInfo::GetEffects(), AreaTableEntry::GetFlags(), Condition::GetMaxAvailableConditionTargets(), WorldStateMgr::GetWorldStateTemplate(), ConditionMgr::ConditionTypeInfo::HasConditionStringValue1, ConditionMgr::ConditionTypeInfo::HasConditionValue1, ConditionMgr::ConditionTypeInfo::HasConditionValue2, ConditionMgr::ConditionTypeInfo::HasConditionValue3, HORDE, INSTANCE_INFO_GUID_DATA, SpellEffectInfo::IsAura(), Trinity::RaceMask< T, N >::IsEmpty(), QuestObjective::IsStoringFlag(), IsSubzone, Player::IsValidGender(), LogUselessConditionValue(), MAX_PET_TYPE, MAX_QUEST_STATUS, Condition::NegativeCondition, NotInGroupOrNotInRaid, AreaTableEntry::ParentAreaID, Trinity::RaceMask< T, N >::RawValue, RELATION_MAX, sAchievementStore, sAreaTableStore, sBattlePetSpeciesStore, sCharTitlesStore, Condition::ScriptId, sDifficultyStore, sFactionStore, sGameEventMgr, sMapStore, sObjectMgr, sPhaseStore, sPlayerConditionStore, sScenarioStepStore, sSceneScriptPackageStore, sSkillLineStore, sSpellMgr, StaticConditionTypeData, sWorld, TC_LOG_ERROR, TYPEID_CORPSE, TYPEID_GAMEOBJECT, TYPEID_PLAYER, TYPEID_UNIT, TYPEMASK_CORPSE, TYPEMASK_GAMEOBJECT, TYPEMASK_PLAYER, TYPEMASK_UNIT, UNIT_STAND_STATE_SUBMERGED, and UNIT_STATE_ALL_STATE_SUPPORTED.

Referenced by LoadConditions().

◆ IsMapMeetingNotGroupedConditions()

bool ConditionMgr::IsMapMeetingNotGroupedConditions ( ConditionSourceType  sourceType,
uint32  entry,
Map const *  map 
) const

Definition at line 1200 of file ConditionMgr.cpp.

References IsObjectMeetingNotGroupedConditions().

◆ IsMeetingWorldStateExpression()

◆ IsObjectMeetingNotGroupedConditions() [1/2]

bool ConditionMgr::IsObjectMeetingNotGroupedConditions ( ConditionSourceType  sourceType,
uint32  entry,
ConditionSourceInfo &  sourceInfo 
) const

◆ IsObjectMeetingNotGroupedConditions() [2/2]

bool ConditionMgr::IsObjectMeetingNotGroupedConditions ( ConditionSourceType  sourceType,
uint32  entry,
WorldObject const *  target0,
WorldObject const *  target1 = nullptr,
WorldObject const *  target2 = nullptr 
) const

Definition at line 1194 of file ConditionMgr.cpp.

References IsObjectMeetingNotGroupedConditions().

◆ IsObjectMeetingPlayerChoiceResponseConditions()

bool ConditionMgr::IsObjectMeetingPlayerChoiceResponseConditions ( uint32  playerChoiceId,
int32  playerChoiceResponseId,
Player const *  player 
) const

◆ IsObjectMeetingSmartEventConditions()

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

◆ IsObjectMeetingSpellClickConditions()

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

◆ IsObjectMeetingTrainerSpellConditions()

bool ConditionMgr::IsObjectMeetingTrainerSpellConditions ( uint32  trainerId,
uint32  spellId,
Player *  player 
) const

◆ IsObjectMeetingVehicleSpellConditions()

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

◆ IsObjectMeetingVendorItemConditions()

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

◆ IsObjectMeetingVisibilityByObjectIdConditions()

bool ConditionMgr::IsObjectMeetingVisibilityByObjectIdConditions ( WorldObject const *  obj,
WorldObject const *  seer 
) const

◆ IsObjectMeetToConditionList()

bool ConditionMgr::IsObjectMeetToConditionList ( ConditionSourceInfo &  sourceInfo,
ConditionContainer const &  conditions 
) const
private

Find ElseGroup in ElseGroupStore

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

Definition at line 1050 of file ConditionMgr.cpp.

References CONDITION_SOURCE_TYPE_REFERENCE_CONDITION, ConditionStore, IsObjectMeetToConditionList(), and TC_LOG_DEBUG.

Referenced by IsObjectMeetToConditionList(), and IsObjectMeetToConditions().

◆ IsObjectMeetToConditions() [1/3]

bool ConditionMgr::IsObjectMeetToConditions ( ConditionSourceInfo &  sourceInfo,
ConditionContainer const &  conditions 
) const

Definition at line 1109 of file ConditionMgr.cpp.

References IsObjectMeetToConditionList(), and TC_LOG_DEBUG.

◆ IsObjectMeetToConditions() [2/3]

◆ IsObjectMeetToConditions() [3/3]

bool ConditionMgr::IsObjectMeetToConditions ( WorldObject const *  object1,
WorldObject const *  object2,
ConditionContainer const &  conditions 
) const

Definition at line 1103 of file ConditionMgr.cpp.

References IsObjectMeetToConditions().

◆ IsPlayerMeetingCondition() [1/2]

bool ConditionMgr::IsPlayerMeetingCondition ( Player const *  player,
PlayerConditionEntry const *  condition 
)
static

Definition at line 2917 of file ConditionMgr.cpp.

References AsUnderlyingType(), PlayerConditionEntry::ChrSpecializationIndex, PlayerConditionEntry::ChrSpecializationRole, PlayerConditionEntry::ClassMask, ComparePowerToMax, CONFIG_EXPANSION, PlayerConditionEntry::ContentTuningID, PlayerConditionEntry::CurrentCompletedQuestID, PlayerConditionEntry::CurrentCompletedQuestLogic, PlayerConditionEntry::CurrentPvpFaction, PlayerConditionEntry::CurrQuestID, PlayerConditionEntry::CurrQuestLogic, Disabled, EQUIPMENT_SLOT_MAINHAND, Player::FindQuestSlot(), PlayerConditionEntry::Gender, Unit::GetClassMask(), WorldSession::GetCollectionMgr(), Unit::GetEffectiveLevel(), PlayerConditionEntry::GetFlags(), ReputationMgr::GetForcedRankIfAny(), Unit::GetGender(), Player::GetItemByPos(), Unit::GetLevel(), WorldObject::GetMap(), GetMaxLevelForExpansion(), Unit::GetMaxPower(), Player::GetNativeGender(), GetPlayerConditionSingleResult(), Unit::GetPower(), Player::GetPrimarySpecialization(), Player::GetQuestStatus(), Unit::GetRace(), Player::GetReputationMgr(), Player::GetReputationRank(), Player::GetSession(), Player::GetSkillValue(), ItemTemplate::GetSubClass(), Player::GetTeamId(), Item::GetTemplate(), Unit::GetUnitMovementFlags(), Unit::HasAuraTypeWithMiscvalue(), Trinity::RaceMask< T, N >::HasRace(), Player::HasSpell(), CollectionMgr::HasToy(), IncludeLevelDelta, INVENTORY_SLOT_BAG_0, InvertContentTuning, IsAtMaxExpansionLevel, Map::IsBattlegroundOrArena(), Trinity::RaceMask< T, N >::IsEmpty(), Player::IsQuestCompletedBitSet(), PlayerConditionEntry::ItemCount, PlayerConditionEntry::ItemFlags, PlayerConditionEntry::ItemID, PlayerConditionEntry::ItemLogic, PlayerConditionEntry::LanguageID, PlayerConditionEntry::LifetimeMaxPVPRank, Player::m_activePlayerData, Player::m_playerData, MAX_QUEST_LOG_SIZE, PlayerConditionEntry::MaxFactionID, PlayerConditionEntry::MaxLanguage, PlayerConditionEntry::MaxReputation, PlayerConditionEntry::MaxSkill, MeetsGroupStatusCondition(), PlayerConditionEntry::MinFactionID, PlayerConditionEntry::MinLanguage, PlayerConditionEntry::MinReputation, PlayerConditionEntry::MinSkill, MOVEMENTFLAG_BACKWARD, MOVEMENTFLAG_DISABLE_GRAVITY, MOVEMENTFLAG_FALLING, MOVEMENTFLAG_FORWARD, MOVEMENTFLAG_LEFT, MOVEMENTFLAG_PITCH_DOWN, MOVEMENTFLAG_PITCH_UP, MOVEMENTFLAG_RIGHT, MOVEMENTFLAG_ROOT, MOVEMENTFLAG_STRAFE_LEFT, MOVEMENTFLAG_STRAFE_RIGHT, MOVEMENTFLAG_SWIMMING, MOVEMENTFLAG_WALKING, PlayerConditionEntry::MovementFlags, PlayerConditionEntry::NativeGender, PlayerConditionEntry::PartyStatus, PlayerConditionCompare(), PlayerConditionLogic(), PlayerConditionEntry::PowerType, PlayerConditionEntry::PowerTypeComp, PlayerConditionEntry::PowerTypeValue, PlayerConditionEntry::PrevQuestID, PlayerConditionEntry::PrevQuestLogic, PlayerConditionEntry::PvpMedal, QUEST_STATUS_COMPLETE, PlayerConditionEntry::RaceMask, PlayerConditionEntry::ReputationLogic, sChrSpecializationStore, sDB2Manager, sFactionStore, PlayerConditionEntry::SkillID, PlayerConditionEntry::SkillLogic, sLanguageMgr, SPELL_AURA_COMPREHEND_LANGUAGE, PlayerConditionEntry::SpellID, PlayerConditionEntry::SpellLogic, sWorld, TEAM_ALLIANCE, UseEffectiveLevel, PlayerConditionEntry::WeaponSubclassMask, and WithinOrAboveRecord.

◆ IsPlayerMeetingCondition() [2/2]

◆ isSourceTypeValid()

bool ConditionMgr::isSourceTypeValid ( Condition *  cond) const
private

Definition at line 1768 of file ConditionMgr.cpp.

References CONDITION_SOURCE_TYPE_AREATRIGGER, CONDITION_SOURCE_TYPE_AREATRIGGER_CLIENT_TRIGGERED, CONDITION_SOURCE_TYPE_CONVERSATION_LINE, CONDITION_SOURCE_TYPE_CREATURE_LOOT_TEMPLATE, CONDITION_SOURCE_TYPE_CREATURE_TEMPLATE_VEHICLE, CONDITION_SOURCE_TYPE_DISENCHANT_LOOT_TEMPLATE, CONDITION_SOURCE_TYPE_FISHING_LOOT_TEMPLATE, CONDITION_SOURCE_TYPE_GAMEOBJECT_LOOT_TEMPLATE, CONDITION_SOURCE_TYPE_GOSSIP_MENU, CONDITION_SOURCE_TYPE_GOSSIP_MENU_OPTION, CONDITION_SOURCE_TYPE_GRAVEYARD, CONDITION_SOURCE_TYPE_ITEM_LOOT_TEMPLATE, CONDITION_SOURCE_TYPE_MAIL_LOOT_TEMPLATE, CONDITION_SOURCE_TYPE_MILLING_LOOT_TEMPLATE, CONDITION_SOURCE_TYPE_NPC_VENDOR, CONDITION_SOURCE_TYPE_OBJECT_ID_VISIBILITY, CONDITION_SOURCE_TYPE_PHASE, CONDITION_SOURCE_TYPE_PICKPOCKETING_LOOT_TEMPLATE, CONDITION_SOURCE_TYPE_PLAYER_CHOICE_RESPONSE, CONDITION_SOURCE_TYPE_PLAYER_CONDITION, CONDITION_SOURCE_TYPE_PROSPECTING_LOOT_TEMPLATE, CONDITION_SOURCE_TYPE_QUEST_AVAILABLE, CONDITION_SOURCE_TYPE_REFERENCE_LOOT_TEMPLATE, CONDITION_SOURCE_TYPE_SKILL_LINE_ABILITY, CONDITION_SOURCE_TYPE_SKINNING_LOOT_TEMPLATE, CONDITION_SOURCE_TYPE_SMART_EVENT, CONDITION_SOURCE_TYPE_SPAWN_GROUP, CONDITION_SOURCE_TYPE_SPELL, CONDITION_SOURCE_TYPE_SPELL_CLICK_EVENT, CONDITION_SOURCE_TYPE_SPELL_IMPLICIT_TARGET, CONDITION_SOURCE_TYPE_SPELL_LOOT_TEMPLATE, CONDITION_SOURCE_TYPE_SPELL_PROC, CONDITION_SOURCE_TYPE_TERRAIN_SWAP, CONDITION_SOURCE_TYPE_TRAINER_SPELL, CONDITION_SOURCE_TYPE_VEHICLE_SPELL, DIFFICULTY_NONE, SpawnGroupTemplateData::flags, SkillLineAbilityEntry::GetAcquireMethod(), SpellInfo::GetEffects(), PlayerChoice::GetResponse(), LootStore::HaveLootFor(), LearnedOrAutomaticCharLevel, LootTemplates_Creature, LootTemplates_Disenchant, LootTemplates_Fishing, LootTemplates_Gameobject, LootTemplates_Item, LootTemplates_Mail, LootTemplates_Milling, LootTemplates_Pickpocketing, LootTemplates_Prospecting, LootTemplates_Reference, LootTemplates_Skinning, LootTemplates_Spell, MAX_EFFECT_MASK, NUM_CLIENT_OBJECT_TYPES, sAreaTableStore, sAreaTriggerDataStore, sAreaTriggerStore, sConversationDataStore, sMapStore, sObjectMgr, Condition::SourceEntry, Condition::SourceGroup, Condition::SourceType, SPAWNGROUP_FLAG_SYSTEM, SPELL_EFFECT_APPLY_AREA_AURA_ENEMY, SPELL_EFFECT_APPLY_AREA_AURA_FRIEND, SPELL_EFFECT_APPLY_AREA_AURA_OWNER, SPELL_EFFECT_APPLY_AREA_AURA_PARTY, SPELL_EFFECT_APPLY_AREA_AURA_PARTY_NONRANDOM, SPELL_EFFECT_APPLY_AREA_AURA_PET, SPELL_EFFECT_APPLY_AREA_AURA_RAID, SPELL_EFFECT_APPLY_AREA_AURA_SUMMONS, SPELL_EFFECT_APPLY_AURA_ON_PET, SPELL_EFFECT_PERSISTENT_AREA_AURA, sSkillLineAbilityStore, sSpellMgr, TARGET_SELECT_CATEGORY_AREA, TARGET_SELECT_CATEGORY_CONE, TARGET_SELECT_CATEGORY_LINE, TARGET_SELECT_CATEGORY_NEARBY, TARGET_SELECT_CATEGORY_TRAJ, TC_LOG_ERROR, TYPEID_GAMEOBJECT, and TYPEID_UNIT.

Referenced by LoadConditions().

◆ IsSpellUsedInSpellClickConditions()

bool ConditionMgr::IsSpellUsedInSpellClickConditions ( uint32  spellId) const

Definition at line 1284 of file ConditionMgr.cpp.

References SpellsUsedInSpellClickConditions.

◆ IsUnitMeetingCondition()

◆ LoadConditions()

void ConditionMgr::LoadConditions ( bool  isReload = false)

Definition at line 1325 of file ConditionMgr.cpp.

References addToGossipMenuItems(), addToGossipMenus(), addToGraveyardData(), addToLootTemplate(), addToPhases(), addToSpellImplicitTargetConditions(), CanHaveSourceGroupSet(), CanHaveSourceIdSet(), Clean(), CONDITION_AURA, CONDITION_PLAYER_CONDITION, CONDITION_SOURCE_TYPE_CREATURE_LOOT_TEMPLATE, CONDITION_SOURCE_TYPE_DISENCHANT_LOOT_TEMPLATE, CONDITION_SOURCE_TYPE_FISHING_LOOT_TEMPLATE, CONDITION_SOURCE_TYPE_GAMEOBJECT_LOOT_TEMPLATE, CONDITION_SOURCE_TYPE_GOSSIP_MENU, CONDITION_SOURCE_TYPE_GOSSIP_MENU_OPTION, CONDITION_SOURCE_TYPE_GRAVEYARD, CONDITION_SOURCE_TYPE_ITEM_LOOT_TEMPLATE, CONDITION_SOURCE_TYPE_MAIL_LOOT_TEMPLATE, CONDITION_SOURCE_TYPE_MILLING_LOOT_TEMPLATE, CONDITION_SOURCE_TYPE_PHASE, CONDITION_SOURCE_TYPE_PICKPOCKETING_LOOT_TEMPLATE, CONDITION_SOURCE_TYPE_PLAYER_CONDITION, CONDITION_SOURCE_TYPE_PROSPECTING_LOOT_TEMPLATE, CONDITION_SOURCE_TYPE_REFERENCE_CONDITION, CONDITION_SOURCE_TYPE_REFERENCE_LOOT_TEMPLATE, CONDITION_SOURCE_TYPE_SKINNING_LOOT_TEMPLATE, CONDITION_SOURCE_TYPE_SPELL, CONDITION_SOURCE_TYPE_SPELL_CLICK_EVENT, CONDITION_SOURCE_TYPE_SPELL_IMPLICIT_TARGET, CONDITION_SOURCE_TYPE_SPELL_LOOT_TEMPLATE, ConditionStore, Condition::ConditionStringValue1, Condition::ConditionTarget, Condition::ConditionType, Condition::ConditionValue1, Condition::ConditionValue2, Condition::ConditionValue3, Condition::ElseGroup, Condition::ErrorTextId, Condition::ErrorType, Field::GetBool(), Field::GetInt32(), LootStore::GetLootForConditionFill(), getMSTime(), Field::GetString(), Field::GetUInt32(), Field::GetUInt8(), isConditionTypeValid(), isSourceTypeValid(), LootTemplates_Creature, LootTemplates_Disenchant, LootTemplates_Fishing, LootTemplates_Gameobject, LootTemplates_Item, LootTemplates_Mail, LootTemplates_Milling, LootTemplates_Pickpocketing, LootTemplates_Prospecting, LootTemplates_Reference, LootTemplates_Skinning, LootTemplates_Spell, Condition::NegativeCondition, Condition::ReferenceId, Condition::ScriptId, sObjectMgr, Condition::SourceEntry, Condition::SourceGroup, Condition::SourceId, Condition::SourceType, SpellsUsedInSpellClickConditions, sSpellMgr, TC_LOG_ERROR, TC_LOG_INFO, and WorldDatabase.

◆ LogUselessConditionValue() [1/2]

void ConditionMgr::LogUselessConditionValue ( Condition const *  cond,
uint8  index,
std::string const &  value 
)
staticprivate

Definition at line 2785 of file ConditionMgr.cpp.

References TC_LOG_ERROR.

◆ LogUselessConditionValue() [2/2]

void ConditionMgr::LogUselessConditionValue ( Condition const *  cond,
uint8  index,
uint32  value 
)
staticprivate

Definition at line 2780 of file ConditionMgr.cpp.

References TC_LOG_ERROR.

Referenced by isConditionTypeValid().

◆ operator=() [1/2]

ConditionMgr & ConditionMgr::operator= ( ConditionMgr &&  )
delete

◆ operator=() [2/2]

ConditionMgr & ConditionMgr::operator= ( ConditionMgr const &  )
delete

Member Data Documentation

◆ ConditionStore

◆ SpellsUsedInSpellClickConditions

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

Definition at line 389 of file ConditionMgr.h.

Referenced by Clean(), IsSpellUsedInSpellClickConditions(), and LoadConditions().

◆ StaticConditionTypeData

ConditionMgr::ConditionTypeInfo const ConditionMgr::StaticConditionTypeData
static

Definition at line 102 of file ConditionMgr.h.

Referenced by isConditionTypeValid().

◆ StaticSourceTypeData

char const *const ConditionMgr::StaticSourceTypeData
static

Definition at line 61 of file ConditionMgr.h.


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