TrinityCore
Loading...
Searching...
No Matches
ConditionMgr.cpp File Reference
#include "ConditionMgr.h"
#include "AchievementMgr.h"
#include "AreaTrigger.h"
#include "AreaTriggerDataStore.h"
#include "BattlePetMgr.h"
#include "BattlegroundScript.h"
#include "CollectionMgr.h"
#include "Containers.h"
#include "ConversationDataStore.h"
#include "DB2Stores.h"
#include "DatabaseEnv.h"
#include "GameEventMgr.h"
#include "GameObject.h"
#include "GameTime.h"
#include "Group.h"
#include "InstanceScenario.h"
#include "InstanceScript.h"
#include "Item.h"
#include "LFGMgr.h"
#include "LanguageMgr.h"
#include "Log.h"
#include "LootMgr.h"
#include "Map.h"
#include "ObjectAccessor.h"
#include "ObjectMgr.h"
#include "Pet.h"
#include "PhasingHandler.h"
#include "Player.h"
#include "PlayerChoice.h"
#include "RaceMask.h"
#include "RealmList.h"
#include "ReputationMgr.h"
#include "ScriptMgr.h"
#include "Spell.h"
#include "SpellAuraEffects.h"
#include "SpellAuras.h"
#include "SpellMgr.h"
#include "World.h"
#include "WorldSession.h"
#include "WorldStateMgr.h"
#include "WowTime.h"
#include <random>
+ Include dependency graph for ConditionMgr.cpp:

Go to the source code of this file.

Functions

static bool MeetsGroupStatusCondition (Player const *player, GroupStatusCondition status)
 
bool PlayerConditionCompare (int32 comparisonType, int32 value1, int32 value2)
 
template<std::size_t N>
bool PlayerConditionLogic (uint32 logic, std::bitset< N > &results)
 
template<typename T , std::size_t N, typename... ExtraParams, Trinity::invocable_r< bool, Player const *, T, typename ExtraParams::value_type... > Predicate>
static std::bitset< N > GetPlayerConditionSingleResult (Predicate predicate, Player const *player, std::array< T, N > const &conditions, ExtraParams const &... params)
 
int32 EvalSingleValue (ByteBuffer &buffer, Map const *map)
 
int32 EvalValue (ByteBuffer &buffer, Map const *map)
 
bool EvalRelOp (ByteBuffer &buffer, Map const *map)
 
int32 GetUnitConditionVariable (Unit const *unit, Unit const *otherUnit, UnitConditionVariable variable, int32 value)
 

Variables

static constexpr int32(*const WorldStateExpressionFunctions [WSE_FUNCTION_MAX])(Map const *, uint32, uint32)
 

Function Documentation

◆ EvalRelOp()

bool EvalRelOp ( ByteBuffer &  buffer,
Map const *  map 
)

◆ EvalSingleValue()

int32 EvalSingleValue ( ByteBuffer &  buffer,
Map const *  map 
)

◆ EvalValue()

int32 EvalValue ( ByteBuffer &  buffer,
Map const *  map 
)

Definition at line 3675 of file ConditionMgr.cpp.

References Division, EvalSingleValue(), Multiplication, None, ByteBuffer::read(), Remainder, Substraction, and Sum.

Referenced by EvalRelOp().

◆ GetPlayerConditionSingleResult()

template<typename T , std::size_t N, typename... ExtraParams, Trinity::invocable_r< bool, Player const *, T, typename ExtraParams::value_type... > Predicate>
static std::bitset< N > GetPlayerConditionSingleResult ( Predicate  predicate,
Player const *  player,
std::array< T, N > const &  conditions,
ExtraParams const &...  params 
)
inlinestatic

Definition at line 2846 of file ConditionMgr.cpp.

References params.

Referenced by ConditionMgr::IsPlayerMeetingCondition().

◆ GetUnitConditionVariable()

int32 GetUnitConditionVariable ( Unit const *  unit,
Unit const *  otherUnit,
UnitConditionVariable  variable,
int32  value 
)

Definition at line 3762 of file ConditionMgr.cpp.

References AFLAG_NEGATIVE, BASE_ATTACK, CanAssist, CanAttack, Class, ComboPoints, Creature, CreatureType, CURRENT_GENERIC_SPELL, Damage, DamageArcanePct, DamageFirePct, DamageFrostPct, DamageHolyPct, DamageMagicPct, DamageNaturePct, DamagePhysicalPct, DamageShadowPct, DamageTotalPct, SpellInfo::Dispel, EnergyPct, Aura::GetApplicationOfTarget(), Unit::getAttackers(), Unit::GetAuraApplication(), Unit::GetAuraEffectsByType(), AuraEffect::GetBase(), AuraApplication::GetBase(), Unit::GetChannelSpellId(), Unit::GetCharmedGUID(), Unit::GetCharmerGUID(), Unit::GetCharmerOrOwnerGUID(), Unit::GetClass(), Unit::GetCombatReach(), Unit::GetCreatorGUID(), Unit::GetCreatureType(), Unit::GetCritterGUID(), Unit::GetCurrentSpell(), AuraApplication::GetEffectMask(), Object::GetEntry(), Position::GetExactDist(), Position::GetExactDistSq(), ChrSpecializationEntry::GetFlags(), AuraApplication::GetFlags(), Unit::GetGender(), BaseEntity::GetGUID(), Unit::GetHealth(), Unit::GetHealthPct(), Unit::GetLevel(), Unit::GetMinionGUID(), Unit::GetMountDisplayId(), Unit::GetPower(), Unit::GetPowerPct(), Player::GetPrimarySpecializationEntry(), Unit::GetRace(), WorldObject::GetReactionTo(), ChrSpecializationEntry::GetRole(), SpellInfo::GetSchoolMask(), Aura::GetSpellInfo(), SpellInfo::GetSpellMechanicMaskByEffectMask(), Unit::GetTarget(), ThreatManager::GetThreatListSize(), Unit::GetThreatManager(), ObjectAccessor::GetUnit(), Unit::GetVirtualItemId(), Player::GetWeaponForAttack(), HasAura, Unit::HasAura(), Unit::HasAuraType(), HasCritter, HasHarmfulAuraCanceledByDamage, HasHarmfulAuraDispelType, HasHarmfulAuraEffect, HasHarmfulAuraMechanic, HasHarmfulAuraSchool, HasHarmfulAuraSpell, HasHarmfulAuraWithPeriodicDamage, HasHelpfulAuraDispelType, HasHelpfulAuraEffect, HasHelpfulAuraMechanic, HasHelpfulAuraSchool, HasHelpfulAuraSpell, Creature::HasLabel(), Unit::HasNegativeAuraWithInterruptFlag(), HasPet, Unit::HasSpell(), HasTotemInSlot1, HasTotemInSlot2, HasTotemInSlot3, HasTotemInSlot4, HasTotemInSlot5, Unit::HasUnitFlag(), Unit::HasUnitMovementFlag(), HasWeapon, Healer, Health, HealthPct, InCombat, InMeleeRange, IsAttackingMe, IsCasting, IsCastingSpell, IsChanneling, IsChannelingSpell, BaseEntity::IsCreature(), IsDying, ObjectGuid::IsEmpty(), IsEnemy, IsFlying, Unit::IsFlying(), IsHovering, Unit::IsHovering(), IsImmuneToAreaOfEffect, Unit::IsInCombat(), IsInterruptible, IsMaster, IsMeleeAttacking, IsMounted, IsMoving, IsMyPet, IsMySummon, IsMyTarget, IsPlayer, BaseEntity::IsPlayer(), IsPlayerControlledNPC, IsRangedAttacking, IsSelf, IsSpecHealer, IsSpecMelee, IsSpecRanged, IsSpecTank, IsSummoner, IsTarget, WorldObject::IsValidAssistTarget(), WorldObject::IsValidAttackTarget(), Label, Level, LevelWithinContentTuning, Unit::m_SummonSlot, ManaPct, Melee, MOVEMENTFLAG_BACKWARD, MOVEMENTFLAG_FORWARD, MOVEMENTFLAG_STRAFE_LEFT, MOVEMENTFLAG_STRAFE_RIGHT, NumberOfAttackers, NumberOfEnemies, NumberOfFriends, NumberOfMeleeAttackers, NumberOfRangedAttackers, OFF_ATTACK, PathFailCount, POWER_COMBO_POINTS, POWER_ENERGY, POWER_MANA, POWER_RAGE, PursuitTime, Race, RagePct, Range, Ranged, REP_HOSTILE, sDB2Manager, Sex, SPELL_AURA_PERIODIC_DAMAGE, SpellKnown, StringID, SUMMON_SLOT_TOTEM, SUMMON_SLOT_TOTEM_2, SUMMON_SLOT_TOTEM_3, SUMMON_SLOT_TOTEM_4, Tank, ThreatArcanePct, ThreatFirePct, ThreatFrostPct, ThreatHolyPct, ThreatMagicPct, ThreatNaturePct, ThreatPhysicalPct, ThreatShadowPct, ThreatTotalPct, Object::ToCreature(), Object::ToPlayer(), TOTAL_AURAS, UI64LIT, and UNIT_FLAG_PLAYER_CONTROLLED.

Referenced by ConditionMgr::IsUnitMeetingCondition().

◆ MeetsGroupStatusCondition()

static bool MeetsGroupStatusCondition ( Player const *  player,
GroupStatusCondition  status 
)
static

◆ PlayerConditionCompare()

bool PlayerConditionCompare ( int32  comparisonType,
int32  value1,
int32  value2 
)
inline

Definition at line 2798 of file ConditionMgr.cpp.

Referenced by ConditionMgr::IsPlayerMeetingCondition().

◆ PlayerConditionLogic()

template<std::size_t N>
bool PlayerConditionLogic ( uint32  logic,
std::bitset< N > &  results 
)
inline

Definition at line 2821 of file ConditionMgr.cpp.

Referenced by ConditionMgr::IsPlayerMeetingCondition().

Variable Documentation

◆ WorldStateExpressionFunctions

constexpr int32(*const WorldStateExpressionFunctions[WSE_FUNCTION_MAX])(Map const *, uint32, uint32) ( Map const *  ,
uint32  ,
uint32   
)
staticconstexpr

Definition at line 3382 of file ConditionMgr.cpp.