fix(Scripts/SSC): remove double spawn of Seer Olum and implement correctly (#18364)

* initial

* fix double definition

* finalise

* remove npc flag in script

* handle in reset

likely fathomlord is created before olum so flag removing doesnt work

* put in instance script
This commit is contained in:
Dan
2024-02-20 08:31:14 +01:00
committed by GitHub
parent d94d10aa9f
commit e3c282ec1d
4 changed files with 29 additions and 23 deletions

View File

@@ -0,0 +1,6 @@
-- remove faulty cages with unsniffed posis
DELETE FROM `gameobject` WHERE `id` = 185952 AND `guid` IN (265632, 265651, 265656, 265661, 265685, 265896, 266592, 266807, 267674, 267748, 268069, 268937);
-- add new correct cage from sniff
DELETE FROM `gameobject` WHERE `id` = 185474 AND `guid` = 265632;
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES
(265632, 185474, 548, 0, 0, 1, 1, 451.26233, -544.8354, -7.546607, 4.8345633, 0, 0, 0.7, -0.7, 300, 0, 1, '', 50791, NULL);

View File

@@ -66,20 +66,14 @@ enum Spells
enum Misc
{
MAX_ADVISORS = 2,
NPC_SEER_OLUM = 22820,
GO_CAGE = 185952,
GO_CAGE = 185474
};
const Position advisorsPosition[MAX_ADVISORS] =
{
{ 448.37f, -544.71f, -7.54f, 0.00f },
{ 457.37f, -544.71f, -7.54f, 0.00f }
};
const Position olumWalk = { 456.17194f, -544.31866f, -7.5470476f, 0.00f };
struct boss_fathomlord_karathress : public BossAI
{
boss_fathomlord_karathress(Creature* creature) : BossAI(creature, DATA_FATHOM_LORD_KARATHRESS) { }
boss_fathomlord_karathress(Creature* creature) : BossAI(creature, DATA_FATHOM_LORD_KARATHRESS){ }
void Reset() override
{
@@ -103,16 +97,8 @@ struct boss_fathomlord_karathress : public BossAI
void JustSummoned(Creature* summon) override
{
summons.Summon(summon);
if (summon->GetEntry() == NPC_SEER_OLUM)
{
summon->SetWalk(true);
summon->GetMotionMaster()->MovePoint(0, advisorsPosition[MAX_ADVISORS - 1], false);
}
else
{
summon->Attack(me->GetVictim(), false);
summon->SetInCombatWithZone();
}
summon->Attack(me->GetVictim(), false);
summon->SetInCombatWithZone();
}
void KilledUnit(Unit* /*victim*/) override
@@ -132,10 +118,16 @@ struct boss_fathomlord_karathress : public BossAI
{
Talk(SAY_DEATH);
BossAI::JustDied(killer);
me->SummonCreature(NPC_SEER_OLUM, advisorsPosition[MAX_ADVISORS-2], TEMPSUMMON_TIMED_DESPAWN, 3600000);
if (GameObject* gobject = me->FindNearestGameObject(GO_CAGE, 100.0f))
if (GameObject* cage = me->FindNearestGameObject(GO_CAGE, 100.0f))
{
gobject->SetGoState(GO_STATE_ACTIVE);
cage->SetGoState(GO_STATE_ACTIVE);
}
if (Creature* olum = instance->GetCreature(DATA_SEER_OLUM))
{
olum->SetWalk(true);
olum->GetMotionMaster()->MovePoint(0, olumWalk, false);
olum->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
olum->SetNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
}
}

View File

@@ -37,6 +37,7 @@ ObjectData const creatureData[] =
{ NPC_LEOTHERAS_THE_BLIND, DATA_LEOTHERAS_THE_BLIND },
{ NPC_FATHOM_LORD_KARATHRESS, DATA_FATHOM_LORD_KARATHRESS },
{ NPC_LADY_VASHJ, DATA_LADY_VASHJ },
{ NPC_SEER_OLUM, DATA_SEER_OLUM },
{ 0, 0 }
};
@@ -129,6 +130,10 @@ public:
if (Creature* vashj = GetCreature(DATA_LADY_VASHJ))
vashj->AI()->JustSummoned(creature);
break;
case NPC_SEER_OLUM:
creature->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
creature->RemoveNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
break;
default:
break;
}

View File

@@ -45,7 +45,8 @@ enum DataTypes
DATA_ALIVE_KEEPERS = 22,
DATA_BRIDGE_ACTIVATED = 23,
DATA_ACTIVATE_SHIELD = 24,
DATA_STRANGE_POOL = 25
DATA_STRANGE_POOL = 25,
DATA_SEER_OLUM = 26
};
enum SSNPCs
@@ -61,6 +62,8 @@ enum SSNPCs
NPC_FATHOM_GUARD_TIDALVESS = 21965,
NPC_FATHOM_GUARD_CARIBDIS = 21964,
NPC_SEER_OLUM = 22820,
NPC_COILFANG_SHATTERER = 21301,
NPC_COILFANG_PRIESTESS = 21220,