Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Start Gauntlet Event in Sunwell after Felmyst die. #30

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -49,6 +49,7 @@ instance_sunwell_plateau::instance_sunwell_plateau(Map* pMap) : ScriptedInstance
m_uiKalecRespawnTimer(0),
m_uiMuruBerserkTimer(0),
m_uiKiljaedenYellTimer(90000)
m_bSunwellGauntletStarted(false);
{
Initialize();
}
Expand Down Expand Up @@ -160,6 +161,23 @@ void instance_sunwell_plateau::OnCreatureEvade(Creature* pCreature)
SetData(TYPE_KILJAEDEN, FAIL);
}

void instance_sunwell_plateau::OnCreatureEnterCombat(Creature* pCreature)
{
uint32 uiEntry = pCreature->GetEntry();

if (uiEntry == NPC_SHADOWSWORD_MANAFIEND)
{
// Only for the first try
if (m_bSunwellGauntletStarted)
return;

if (Creature* pCommander = GetSingleCreatureFromStorage(NPC_SHADOWSWORD_COMMANDER))
DoScriptText(SAY_GAUNTLET_START, pCommander);

if (Creature* pGauntlet = pCreature->SummonCreature(NPC_GAUNTLET_IMP, 1697.92f, 502.315f, 86.4882f, 1.65806f, TEMPSUMMON_DEAD_DESPAWN, 0));
m_bSunwellGauntletStarted = true;
}
}
void instance_sunwell_plateau::OnObjectCreate(GameObject* pGo)
{
switch (pGo->GetEntry())
Expand Down
8 changes: 8 additions & 0 deletions scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h
Expand Up @@ -42,6 +42,10 @@ enum
NPC_KALECGOS = 25319, // related to kiljaeden event
NPC_VELEN = 26246,
NPC_LIADRIN = 26247,
NPC_SHADOWSWORD_MANAFIEND = 25483, // Npc trigger start gauntlet event.
NPC_GAUNTLET_IMP = 25848, // Npc Gauntlet Imp after Felmyst.
NPC_SHADOWSWORD_COMMANDER = 25837,


GO_FORCEFIELD = 188421, // kalecgos door + collisions
GO_BOSS_COLLISION_1 = 188523,
Expand All @@ -68,6 +72,8 @@ enum
SAY_ORDER_3 = -1580066,
SAY_ORDER_4 = -1580067,
SAY_ORDER_5 = -1580068,

SAY_GAUNTLET_START = -1580108,

AREATRIGGER_TWINS = 4937,

Expand Down Expand Up @@ -156,5 +162,7 @@ class instance_sunwell_plateau : public ScriptedInstance, private DialogueHelper
GuidList m_lBackdoorTriggersList;
GuidList m_lDeceiversGuidList;
GuidList m_lMuruTrashGuidList;

bool m_bSunwellGauntletStarted;
};
#endif
2 changes: 1 addition & 1 deletion sql/scriptdev2_script_full.sql
Expand Up @@ -3387,7 +3387,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen
(-1580106,'Farewell...!',12523,0,0,1,'velen SAY_OUTRO_12'),

(-1580107,'%s takes a deep breath.',0,3,0,0,'felmyst EMOTE_DEEP_BREATH');

(-1580108,'Bring forth the imps!',0,1,0,0,'Shadowsword Commander SAY_GAUNTLET_START');
-- -1 585 000 MAGISTER'S TERRACE
INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES
(-1585000,'You only waste my time!',12378,1,0,0,'selin SAY_AGGRO'),
Expand Down
3 changes: 3 additions & 0 deletions sql/updates/r3119_scriptdev2.sql
@@ -0,0 +1,3 @@
DELETE FROM script_texts WHERE entry = -1580108;
INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES
(-1580108,'Bring forth the imps!',0,1,0,0,'Shadowsword Commander SAY_GAUNTLET_START');