mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Spells: Fixed crash in spell visual selection when CasterUnitConditionID is set
This commit is contained in:
@@ -4294,7 +4294,7 @@ uint32 SpellInfo::GetSpellXSpellVisualId(WorldObject const* caster /*= nullptr*/
|
||||
continue;
|
||||
|
||||
if (UnitConditionEntry const* unitCondition = sUnitConditionStore.LookupEntry(visual->CasterUnitConditionID))
|
||||
if (!caster || !caster->IsUnit() || !ConditionMgr::IsUnitMeetingCondition(caster->ToUnit(), viewer->ToUnit(), unitCondition))
|
||||
if (!caster || !caster->IsUnit() || !ConditionMgr::IsUnitMeetingCondition(caster->ToUnit(), Object::ToUnit(viewer), unitCondition))
|
||||
continue;
|
||||
|
||||
return visual->ID;
|
||||
|
||||
Reference in New Issue
Block a user