Scripts/Auchindoun: Fix a super edge case crash bug with GM far teleports during Blackheart's charm phase. Follow-up to d80d7c6.

(cherry picked from commit 165bc02889)
This commit is contained in:
Treeston
2017-08-21 16:44:33 +02:00
committed by Shauren
parent 43f76c8cdd
commit 88a61fa9d6

View File

@@ -59,6 +59,8 @@ class BlackheartCharmedPlayerAI : public SimpleCharmedPlayerAI
void OnCharmed(bool apply) override
{
SimpleCharmedPlayerAI::OnCharmed(apply);
if (!me->GetMap()->IsDungeon())
return;
if (Creature* blackheart = ObjectAccessor::GetCreature(*me, me->GetInstanceScript()->GetGuidData(DATA_BLACKHEART_THE_INCITER)))
{
blackheart->AI()->SetData(0, apply);