fix(Core/Spells): Fixed LoS problems with hunter traps. (#12348)

* fix(Core/Spells): Fixed LoS problems with hunter traps.

Fixes #12332

* missing
This commit is contained in:
UltraNix
2022-07-10 20:18:36 +02:00
committed by GitHub
parent 40e28f2492
commit 12a07ff91f
4 changed files with 26 additions and 14 deletions

View File

@@ -2055,12 +2055,12 @@ void GameObject::CastSpell(Unit* target, uint32 spellId)
if (!spellInfo)
return;
bool self = false;
bool self = true;
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
{
if (spellInfo->Effects[i].TargetA.GetReferenceType() == TARGET_REFERENCE_TYPE_CASTER && !spellInfo->Effects[i].TargetB.GetTarget())
if (spellInfo->Effects[i].TargetA.GetReferenceType() != TARGET_REFERENCE_TYPE_CASTER || spellInfo->Effects[i].TargetB.GetTarget())
{
self = true;
self = false;
break;
}
}