TrinityCore
Loading...
Searching...
No Matches
Condition Struct Reference

#include <ConditionMgr.h>

Public Member Functions

 Condition ()
 
bool Meets (ConditionSourceInfo &sourceInfo) const
 
uint32 GetSearcherTypeMaskForCondition () const
 
bool isLoaded () const
 
uint32 GetMaxAvailableConditionTargets () const
 
std::string ToString (bool ext=false) const
 

Public Attributes

ConditionSourceType SourceType
 
uint32 SourceGroup
 
int32 SourceEntry
 
uint32 SourceId
 
uint32 ElseGroup
 
ConditionTypes ConditionType
 
uint32 ConditionValue1
 
uint32 ConditionValue2
 
uint32 ConditionValue3
 
std::string ConditionStringValue1
 
uint32 ErrorType
 
uint32 ErrorTextId
 
uint32 ReferenceId
 
uint32 ScriptId
 
uint8 ConditionTarget
 
bool NegativeCondition
 

Detailed Description

Definition at line 214 of file ConditionMgr.h.

Constructor & Destructor Documentation

◆ Condition()

Condition::Condition ( )
inline

Definition at line 233 of file ConditionMgr.h.

References CONDITION_NONE, and CONDITION_SOURCE_TYPE_NONE.

Member Function Documentation

◆ GetMaxAvailableConditionTargets()

◆ GetSearcherTypeMaskForCondition()

uint32 Condition::GetSearcherTypeMaskForCondition ( ) const

Definition at line 592 of file ConditionMgr.cpp.

References ABORT_MSG, CONDITION_ACHIEVEMENT, CONDITION_ACTIVE_EVENT, CONDITION_ALIVE, CONDITION_AREAID, CONDITION_AURA, 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_LEVEL, CONDITION_MAPID, CONDITION_NEAR_CREATURE, CONDITION_NEAR_GAMEOBJECT, CONDITION_NONE, CONDITION_OBJECT_ENTRY_GUID, CONDITION_PET_TYPE, CONDITION_PHASEMASK, 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_SKILL, CONDITION_SPAWNMASK, CONDITION_SPELL, CONDITION_STAND_STATE, CONDITION_STRING_ID, CONDITION_TAXI, CONDITION_TEAM, CONDITION_TITLE, CONDITION_TYPE_MASK, CONDITION_UNIT_STATE, CONDITION_WORLD_STATE, CONDITION_ZONEID, ConditionType, ConditionValue1, GRID_MAP_TYPE_MASK_ALL, GRID_MAP_TYPE_MASK_CORPSE, GRID_MAP_TYPE_MASK_CREATURE, GRID_MAP_TYPE_MASK_GAMEOBJECT, GRID_MAP_TYPE_MASK_PLAYER, NegativeCondition, TYPEID_CORPSE, TYPEID_GAMEOBJECT, TYPEID_PLAYER, TYPEID_UNIT, TYPEMASK_CORPSE, TYPEMASK_GAMEOBJECT, TYPEMASK_PLAYER, and TYPEMASK_UNIT.

◆ isLoaded()

bool Condition::isLoaded ( ) const
inline

Definition at line 254 of file ConditionMgr.h.

References CONDITION_NONE.

Referenced by LootTemplate::addConditionItem().

◆ Meets()

bool Condition::Meets ( ConditionSourceInfo &  sourceInfo) const

Definition at line 155 of file ConditionMgr.cpp.

References ASSERT, ASSERT_NOTNULL, CompareValues(), CONDITION_ACHIEVEMENT, CONDITION_ACTIVE_EVENT, CONDITION_ALIVE, CONDITION_AREAID, CONDITION_AURA, 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_LEVEL, CONDITION_MAPID, CONDITION_NEAR_CREATURE, CONDITION_NEAR_GAMEOBJECT, CONDITION_NONE, CONDITION_OBJECT_ENTRY_GUID, CONDITION_PET_TYPE, CONDITION_PHASEMASK, 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_SKILL, CONDITION_SPAWNMASK, CONDITION_SPELL, CONDITION_STAND_STATE, CONDITION_STRING_ID, CONDITION_TAXI, CONDITION_TEAM, CONDITION_TITLE, CONDITION_TYPE_MASK, CONDITION_UNIT_STATE, CONDITION_WORLD_STATE, CONDITION_ZONEID, ConditionStringValue1, ConditionTarget, ConditionType, ConditionValue1, ConditionValue2, ConditionValue3, Unit::GetCreatorGUID(), WorldObject::GetDistance(), Player::GetDrunkenstateByValue(), Object::GetGUID(), Unit::GetOwnerGUID(), Quest::GetQuestId(), WorldObject::GetReactionTo(), Object::GetTypeId(), INSTANCE_INFO_BOSS_STATE, INSTANCE_INFO_DATA, INSTANCE_INFO_DATA64, INSTANCE_INFO_GUID_DATA, Map::IsDungeon(), Unit::IsInPartyWith(), Unit::IsInRaidWith(), Unit::IsOnVehicle(), MAX_CONDITION_TARGETS, MAX_QUEST_LOG_SIZE, ConditionSourceInfo::mConditionTargets, MeetsGroupStatusCondition(), ConditionSourceInfo::mLastFailedCondition, NegativeCondition, QUEST_STATUS_COMPLETE, QUEST_STATUS_FAILED, QUEST_STATUS_INCOMPLETE, QUEST_STATUS_NONE, QUEST_STATUS_REWARDED, RELATION_CREATED_BY, RELATION_IN_PARTY, RELATION_IN_RAID_OR_PARTY, RELATION_OWNED_BY, RELATION_PASSENGER_OF, RELATION_SELF, sAchievementMgr, sAchievementStore, sFactionStore, sGameEventMgr, sObjectMgr, sScriptMgr, sWorld, TC_LOG_DEBUG, Object::ToCreature(), Object::ToGameObject(), Object::ToPlayer(), ToString(), Object::ToUnit(), TYPEID_GAMEOBJECT, and TYPEID_UNIT.

◆ ToString()

Member Data Documentation

◆ ConditionStringValue1

std::string Condition::ConditionStringValue1

◆ ConditionTarget

◆ ConditionType

◆ ConditionValue1

◆ ConditionValue2

uint32 Condition::ConditionValue2

◆ ConditionValue3

uint32 Condition::ConditionValue3

◆ ElseGroup

uint32 Condition::ElseGroup

Definition at line 220 of file ConditionMgr.h.

Referenced by ConditionMgr::LoadConditions().

◆ ErrorTextId

uint32 Condition::ErrorTextId

Definition at line 227 of file ConditionMgr.h.

Referenced by Spell::CheckCast(), and ConditionMgr::LoadConditions().

◆ ErrorType

uint32 Condition::ErrorType

Definition at line 226 of file ConditionMgr.h.

Referenced by Spell::CheckCast(), and ConditionMgr::LoadConditions().

◆ NegativeCondition

bool Condition::NegativeCondition

◆ ReferenceId

uint32 Condition::ReferenceId

Definition at line 228 of file ConditionMgr.h.

Referenced by ConditionMgr::LoadConditions().

◆ ScriptId

uint32 Condition::ScriptId

Definition at line 229 of file ConditionMgr.h.

Referenced by ConditionMgr::LoadConditions(), and ScriptMgr::OnConditionCheck().

◆ SourceEntry

◆ SourceGroup

◆ SourceId

uint32 Condition::SourceId

Definition at line 219 of file ConditionMgr.h.

Referenced by ConditionMgr::LoadConditions(), and ToString().

◆ SourceType


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