fix(Core): Crash on Mandokir gaze (#12611)

This commit is contained in:
Nefertumm
2022-08-03 09:06:28 -03:00
committed by GitHub
parent c806c62c62
commit cee21c022a

View File

@@ -719,11 +719,14 @@ public:
{
if (Unit* target = GetTarget())
{
if (Creature* caster = GetCaster()->ToCreature())
if (Unit* caster = GetCaster())
{
if (caster->IsAIEnabled)
if (Creature* cCaster = caster->ToCreature())
{
caster->AI()->SetGUID(target->GetGUID(), ACTION_CHARGE);
if (cCaster->IsAIEnabled)
{
cCaster->AI()->SetGUID(target->GetGUID(), ACTION_CHARGE);
}
}
}
}