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
committerGitHub <noreply@github.com>2024-03-27 21:38:08 +0100
commit4913d027bf3b8231b925be3f203feac590bb3607 (patch)
tree830f91b8f86fe9fa653ff6d41be256f850140dbf /src/server/game/Spells/SpellInfo.cpp
parent1f855ef56336c6a7fd74898e9c9beba77828c69b (diff)
Core/Conditions: Added CONDITION_SOURCE_TYPE_PLAYER_CONDITION (#29832)
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 6f86e41ac45..5f2713ae508 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -4364,9 +4364,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))
@@ -4930,8 +4929,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