fix(CORE/Raid): Muradin/Saurfang not de-spawning after finishing movement (#3294)

Saurfang and Muradin together with its 3 followers were not de-spawning once reaching the exit portal after the initial RP moment and remain standing in front of the exit portal forever.

Partially Closes https://github.com/azerothcore/azerothcore-wotlk/issues/3246

Co-authored-by: Francesco Borzì <borzifrancesco@gmail.com>
Co-authored-by: Stefano Borzì <stefanoborzi32@gmail.com>
This commit is contained in:
Petric
2020-08-31 16:27:01 +01:00
committed by GitHub
parent 4034a56f87
commit e1e8cc1bf5

View File

@@ -516,7 +516,16 @@ class npc_highlord_tirion_fordring_lh : public CreatureScript
case EVENT_MURADIN_RUN:
case EVENT_SAURFANG_RUN:
if (Creature* factionNPC = ObjectAccessor::GetCreature(*me, _factionNPC))
factionNPC->GetMotionMaster()->MovePath(factionNPC->GetDBTableGUIDLow()*10, false);
{
factionNPC->GetMotionMaster()->MovePath(factionNPC->GetDBTableGUIDLow() * 10, false);
factionNPC->DespawnOrUnsummon(46500);
std::list<Creature*> followers;
factionNPC->GetCreaturesWithEntryInRange(followers, 30, _instance->GetData(DATA_TEAMID_IN_INSTANCE) == TEAM_HORDE ? NPC_KOR_KRON_GENERAL : NPC_ALLIANCE_COMMANDER);
for (Creature* follower : followers)
{
follower->DespawnOrUnsummon(46500);
}
}
me->setActive(false);
_damnedKills = 3;
break;