mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 10:55:43 +00:00
fix(Scripts/SerpentshrineCavern): Despawn Lurker's pool and fix visua… (#18037)
fix(Scripts/SerpentshrineCavern): Despawn Lurker's pool and fix visual issue on death
This commit is contained in:
@@ -79,9 +79,26 @@ struct boss_the_lurker_below : public BossAI
|
||||
void EnterEvadeMode(EvadeReason why) override
|
||||
{
|
||||
BossAI::EnterEvadeMode(why);
|
||||
if (GameObject* pool = instance->GetGameObject(DATA_STRANGE_POOL))
|
||||
{
|
||||
pool->Respawn();
|
||||
}
|
||||
me->DespawnOrUnsummon(2000);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* /*attacker*/, uint32& damage, DamageEffectType /*type*/, SpellSchoolMask /*school*/) override
|
||||
{
|
||||
if (damage >= me->GetHealth())
|
||||
{
|
||||
// Liquid state around his area is working awkwardly and doesn't consider him to be swimming
|
||||
// Therefore he falls to the bottom of the lake when he dies, because he is "flying" in his pool
|
||||
// Removing this prevents him from dropping to the bottom of the lake
|
||||
// There is also a visual issue currently causing him to drop to the bottom of the lake but his body not update clientside
|
||||
// So it looks as if he was floating but he has in fact dropped to the bottom of the lake, and thus becomes unlootable
|
||||
me->SetDisableGravity(false);
|
||||
}
|
||||
}
|
||||
|
||||
void DoAction(int32 action) override
|
||||
{
|
||||
if (action == ACTION_START_EVENT)
|
||||
@@ -228,6 +245,10 @@ public:
|
||||
player->CastSpell(player, SPELL_LURKER_SPAWN_TRIGGER, true);
|
||||
if (Creature* lurker = go->SummonCreature(NPC_THE_LURKER_BELOW, 38.4567f, -417.324f, -18.916666f, 2.94960f, TEMPSUMMON_MANUAL_DESPAWN))
|
||||
lurker->AI()->DoAction(ACTION_START_EVENT);
|
||||
|
||||
go->DespawnOrUnsummon();
|
||||
go->SetRespawnDelay(7 * DAY);
|
||||
go->SaveRespawnTime();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,6 +40,12 @@ ObjectData const creatureData[] =
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
ObjectData const gameObjectData[] =
|
||||
{
|
||||
{ GO_STRANGE_POOL, DATA_STRANGE_POOL },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
MinionData const minionData[] =
|
||||
{
|
||||
{ NPC_FATHOM_GUARD_SHARKKIS, DATA_FATHOM_LORD_KARATHRESS },
|
||||
@@ -69,7 +75,7 @@ public:
|
||||
SetHeaders(DataHeader);
|
||||
SetBossNumber(MAX_ENCOUNTERS);
|
||||
LoadDoorData(doorData);
|
||||
LoadObjectData(creatureData, nullptr);
|
||||
LoadObjectData(creatureData, gameObjectData);
|
||||
LoadMinionData(minionData);
|
||||
LoadBossBoundaries(boundaries);
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ enum DataTypes
|
||||
DATA_ALIVE_KEEPERS = 22,
|
||||
DATA_BRIDGE_ACTIVATED = 23,
|
||||
DATA_ACTIVATE_SHIELD = 24,
|
||||
DATA_STRANGE_POOL = 25
|
||||
};
|
||||
|
||||
enum SSNPCs
|
||||
@@ -77,7 +78,9 @@ enum SSNPCs
|
||||
GO_SHIELD_GENERATOR1 = 185051,
|
||||
GO_SHIELD_GENERATOR2 = 185052,
|
||||
GO_SHIELD_GENERATOR3 = 185053,
|
||||
GO_SHIELD_GENERATOR4 = 185054
|
||||
GO_SHIELD_GENERATOR4 = 185054,
|
||||
|
||||
GO_STRANGE_POOL = 184956
|
||||
};
|
||||
|
||||
enum SSSpells
|
||||
|
||||
Reference in New Issue
Block a user