aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellInfo.cpp
diff options
context:
space:
mode:
authorMeji <alvaro.megias@outlook.com>2024-03-27 21:38:08 +0100
committerfunjoker <funjoker109@gmail.com>2024-03-28 20:36:23 +0100
commit46b35d308213586c75653be2b9d92d0f0029c738 (patch)
tree8059773be097703004ccff41412898fb3283088f /src/server/game/Spells/SpellInfo.cpp
parent8589ece4f4b7450a10174970c68896cf9d376166 (diff)
Core/Conditions: Added CONDITION_SOURCE_TYPE_PLAYER_CONDITION (#29832)
(cherry picked from commit 4913d027bf3b8231b925be3f203feac590bb3607)
Diffstat (limited to 'src/server/game/Spells/SpellInfo.cpp')
-rw-r--r--src/server/game/Spells/SpellInfo.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index a34444b8fd9..4cc681a03fb 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -4325,9 +4325,8 @@ uint32 SpellInfo::GetSpellXSpellVisualId(WorldObject const* caster /*= nullptr*/
{
for (SpellXSpellVisualEntry const* visual : _visuals)
{
- if (PlayerConditionEntry const* playerCondition = sPlayerConditionStore.LookupEntry(visual->CasterPlayerConditionID))
- if (!caster || !caster->IsPlayer() || !ConditionMgr::IsPlayerMeetingCondition(caster->ToPlayer(), playerCondition))
- continue;
+ if (!caster || !caster->IsPlayer() || !ConditionMgr::IsPlayerMeetingCondition(caster->ToPlayer(), visual->CasterPlayerConditionID))
+ continue;
if (UnitConditionEntry const* unitCondition = sUnitConditionStore.LookupEntry(visual->CasterUnitConditionID))
if (!caster || !caster->IsUnit() || !ConditionMgr::IsUnitMeetingCondition(caster->ToUnit(), Object::ToUnit(viewer), unitCondition))
@@ -4891,8 +4890,7 @@ bool SpellInfo::MeetsFutureSpellPlayerCondition(Player const* player) const
if (ShowFutureSpellPlayerConditionID == 0)
return false;
- PlayerConditionEntry const* playerCondition = sPlayerConditionStore.LookupEntry(ShowFutureSpellPlayerConditionID);
- return !playerCondition || ConditionMgr::IsPlayerMeetingCondition(player, playerCondition);
+ return ConditionMgr::IsPlayerMeetingCondition(player, ShowFutureSpellPlayerConditionID);
}
bool SpellInfo::HasLabel(uint32 labelId) const