fix(Core/BWL): Victor Nefarius encounter not resetting properly (#11145)

This commit is contained in:
Nefertumm
2022-03-27 07:53:13 -03:00
committed by GitHub
parent 580c9319e3
commit 3a69d36a99
2 changed files with 14 additions and 0 deletions

View File

@@ -468,6 +468,8 @@ public:
me->SetUInt32Value(UNIT_NPC_FLAGS, 0);
me->SetStandState(UNIT_STAND_STATE_STAND);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE);
// Due to Nefarius despawning himself on Vael, we need to update the guid on instance to prevent unwanted behaviours as encounter not resetting at all.
instance->SetGuidData(DATA_LORD_VICTOR_NEFARIUS, me->GetGUID());
}
}

View File

@@ -357,6 +357,18 @@ public:
return ObjectGuid::Empty;
}
void SetGuidData(uint32 type, ObjectGuid data) override
{
switch (type)
{
case DATA_LORD_VICTOR_NEFARIUS:
victorNefariusGUID = data;
break;
default:
break;
}
}
void OnUnitDeath(Unit* unit) override
{
switch (unit->GetEntry())