mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 10:30:27 +00:00
fix(Scripts/RuinsOfAhnQiraj): Andorov does not respawn after being killed (#17788)
This commit is contained in:
@@ -82,10 +82,14 @@ struct boss_kurinnaxx : public BossAI
|
||||
if (killer)
|
||||
{
|
||||
killer->GetMap()->LoadGrid(-9502.80f, 2042.65f); // Ossirian grid
|
||||
killer->GetMap()->LoadGrid(-8538.17f, 1486.09f); // Andorov run path grid
|
||||
|
||||
if (Player* player = killer->GetCharmerOrOwnerPlayerOrPlayerItself())
|
||||
{
|
||||
player->SummonCreature(NPC_ANDOROV, -8538.177f, 1486.0956f, 32.39054f, 3.7638654f, TEMPSUMMON_CORPSE_DESPAWN, 600000000);
|
||||
if (Creature* creature = player->SummonCreature(NPC_ANDOROV, -8538.177f, 1486.0956f, 32.39054f, 3.7638654f, TEMPSUMMON_CORPSE_DESPAWN, 0))
|
||||
{
|
||||
creature->setActive(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -82,11 +82,15 @@ public:
|
||||
|
||||
void OnPlayerEnter(Player* player) override
|
||||
{
|
||||
if (GetBossState(DATA_KURINNAXX) == DONE && GetBossState(DATA_RAJAXX) != DONE)
|
||||
if (GetBossState(DATA_KURINNAXX) == DONE &&
|
||||
GetBossState(DATA_RAJAXX) != DONE &&
|
||||
_rajaxWaveCounter == 0 && // if non-zero, encounter is in progress
|
||||
!_andorovGUID) // cleared if he is dead
|
||||
{
|
||||
if (!_andorovGUID)
|
||||
instance->LoadGrid(-8538.17f, 1486.09f); // Andorov run path grid
|
||||
if (Creature* creature = player->SummonCreature(NPC_ANDOROV, -8538.177f, 1486.0956f, 32.39054f, 3.7638654f, TEMPSUMMON_CORPSE_DESPAWN, 0))
|
||||
{
|
||||
player->SummonCreature(NPC_ANDOROV, -8538.177f, 1486.0956f, 32.39054f, 3.7638654f, TEMPSUMMON_CORPSE_DESPAWN, 600000000);
|
||||
creature->setActive(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -209,6 +213,11 @@ public:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (creature->GetEntry() == NPC_ANDOROV)
|
||||
{
|
||||
_andorovGUID.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user