fix(Core): Crashfix. (#13113)

Fixes #13111
This commit is contained in:
UltraNix
2022-09-25 15:40:37 +02:00
committed by GitHub
parent 87861a86c1
commit 984a389d37

View File

@@ -2089,7 +2089,7 @@ void GameObject::CastSpell(Unit* target, uint32 spellId)
trigger->SetUnitFlag(UNIT_FLAG_PLAYER_CONTROLLED);
if (owner->IsFFAPvP())
{
if (!HasByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP))
if (!trigger->HasByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP))
{
sScriptMgr->OnFfaPvpStateUpdate(trigger, true);
trigger->SetByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP);