fix(Scripts/Gundrak): Eck should spawn when the Ruin Dweller formatio… (#23114)
This commit is contained in:
@@ -0,0 +1,8 @@
|
|||||||
|
--
|
||||||
|
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = -127203);
|
||||||
|
|
||||||
|
DELETE FROM `creature_formations` WHERE `leaderGUID` = 127203;
|
||||||
|
INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`, `point_1`, `point_2`) VALUES
|
||||||
|
(127203, 127203, 0, 0, 3, 0, 0),
|
||||||
|
(127203, 127201, 0, 0, 3, 0, 0),
|
||||||
|
(127203, 127202, 0, 0, 3, 0, 0);
|
||||||
@@ -30,16 +30,21 @@ enum Data
|
|||||||
DATA_MOORABI = 1,
|
DATA_MOORABI = 1,
|
||||||
DATA_DRAKKARI_COLOSSUS = 2,
|
DATA_DRAKKARI_COLOSSUS = 2,
|
||||||
DATA_GAL_DARAH = 3,
|
DATA_GAL_DARAH = 3,
|
||||||
DATA_ECK_THE_FEROCIOUS_INIT = 4,
|
DATA_ECK_THE_FEROCIOUS = 4,
|
||||||
DATA_ECK_THE_FEROCIOUS = 5,
|
MAX_ENCOUNTERS = 5
|
||||||
MAX_ENCOUNTERS = 6
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Creatures
|
enum Creatures
|
||||||
{
|
{
|
||||||
|
NPC_RUINS_DWELLER = 29920,
|
||||||
NPC_ECK_THE_FEROCIOUS = 29932
|
NPC_ECK_THE_FEROCIOUS = 29932
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum GDTexts
|
||||||
|
{
|
||||||
|
EMOTE_SUMMON_ECK = 0
|
||||||
|
};
|
||||||
|
|
||||||
enum GameObjects
|
enum GameObjects
|
||||||
{
|
{
|
||||||
GO_ALTAR_OF_SLAD_RAN = 192518,
|
GO_ALTAR_OF_SLAD_RAN = 192518,
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "CreatureGroups.h"
|
||||||
#include "InstanceMapScript.h"
|
#include "InstanceMapScript.h"
|
||||||
#include "ScriptedCreature.h"
|
#include "ScriptedCreature.h"
|
||||||
#include "gundrak.h"
|
#include "gundrak.h"
|
||||||
@@ -137,13 +138,6 @@ public:
|
|||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case NPC_ECK_THE_FEROCIOUS:
|
|
||||||
if (GetBossState(DATA_ECK_THE_FEROCIOUS_INIT) != DONE)
|
|
||||||
{
|
|
||||||
SetBossState(DATA_ECK_THE_FEROCIOUS_INIT, NOT_STARTED);
|
|
||||||
SetBossState(DATA_ECK_THE_FEROCIOUS_INIT, DONE);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case GO_ALTAR_OF_SLAD_RAN:
|
case GO_ALTAR_OF_SLAD_RAN:
|
||||||
if (GameObject* statue = instance->GetGameObject(_bridgeGUIDs[0]))
|
if (GameObject* statue = instance->GetGameObject(_bridgeGUIDs[0]))
|
||||||
statue->SetGoState(GO_STATE_READY);
|
statue->SetGoState(GO_STATE_READY);
|
||||||
@@ -194,19 +188,36 @@ public:
|
|||||||
if (GameObject* altar = instance->GetGameObject(_drakkariAltarGUID))
|
if (GameObject* altar = instance->GetGameObject(_drakkariAltarGUID))
|
||||||
altar->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
altar->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||||
break;
|
break;
|
||||||
case DATA_ECK_THE_FEROCIOUS_INIT:
|
|
||||||
{
|
|
||||||
Position pos = {1624.70f, 891.43f, 95.08f, 1.2f};
|
|
||||||
if (instance->IsHeroic())
|
|
||||||
instance->SummonCreature(NPC_ECK_THE_FEROCIOUS, pos);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OnUnitDeath(Unit* unit) override
|
||||||
|
{
|
||||||
|
if (!instance->IsHeroic() || !unit->EntryEquals(NPC_RUINS_DWELLER) || IsBossDone(DATA_ECK_THE_FEROCIOUS))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (Creature* dweller = unit->ToCreature())
|
||||||
|
if (CreatureGroup* formation = dweller->GetFormation())
|
||||||
|
{
|
||||||
|
scheduler.CancelAll();
|
||||||
|
scheduler.Schedule(1s, [this, dweller, formation](TaskContext /*context*/)
|
||||||
|
{
|
||||||
|
if (!formation->IsAnyMemberAlive())
|
||||||
|
{
|
||||||
|
if (dweller)
|
||||||
|
dweller->AI()->Talk(EMOTE_SUMMON_ECK);
|
||||||
|
|
||||||
|
instance->SummonCreature(NPC_ECK_THE_FEROCIOUS, { 1624.70f, 891.43f, 95.08f, 1.2f });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Update(uint32 diff) override
|
void Update(uint32 diff) override
|
||||||
{
|
{
|
||||||
|
scheduler.Update(diff);
|
||||||
|
|
||||||
if (!_activateTimer)
|
if (!_activateTimer)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user