FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[s2819] Update Dire Maul Tribute Run event · scriptdev2/scriptdev2-tbc@5807636 · GitHub

Commit 5807636

Browse files
committed
[s2819] Update Dire Maul Tribute Run event
The other part of the event is handled by DB-Scripts Based on the work of @Tobschinski (based on commit SD2[3078] - 01fb50b) Signed-off-by: Xfurry <xfurry@scriptdev2.com>
1 parent dcffa50 commit 5807636

5 files changed

Lines changed: 31 additions & 9 deletions

File tree

‎scripts/kalimdor/dire_maul/dire_maul.h‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,14 @@ enum
7979
SAY_FREE_IMMOLTHAR = -1429000,
8080
SAY_KILL_IMMOLTHAR = -1429001,
8181
SAY_IRONBARK_REDEEM = -1429002,
82+
SAY_CHORUSH_KING_DEAD = -1429003,
8283

8384
FACTION_HOSTILE = 14,
84-
SPELL_KING_OF_GORDOK = 22799,
85+
FACTION_FRIENDLY = 35,
8586
};
8687

88+
static const float afMizzleSpawnLoc[4] = {683.296f, 484.384f, 29.544f, 0.0174f};
89+
8790
class instance_dire_maul : public ScriptedInstance
8891
{
8992
public:

‎scripts/kalimdor/dire_maul/instance_dire_maul.cpp‎

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ void instance_dire_maul::OnCreatureCreate(Creature* pCreature)
7575
// North
7676
case NPC_CHORUSH:
7777
case NPC_KING_GORDOK:
78-
case NPC_MIZZLE_THE_CRAFTY:
78+
case NPC_CAPTAIN_KROMCRUSH:
7979
break;
8080

8181
default:
@@ -243,12 +243,26 @@ void instance_dire_maul::SetData(uint32 uiType, uint32 uiData)
243243
m_auiEncounter[uiType] = uiData;
244244
if (uiData == DONE)
245245
{
246-
// Apply Aura to players in the map
247-
Map::PlayerList const& players = instance->GetPlayers();
248-
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
246+
// change faction to certian ogres
247+
if (Creature* pOgre = GetSingleCreatureFromStorage(NPC_CAPTAIN_KROMCRUSH))
248+
pOgre->SetFactionTemporary(FACTION_FRIENDLY, TEMPFACTION_RESTORE_RESPAWN);
249+
250+
if (Creature* pOgre = GetSingleCreatureFromStorage(NPC_CHORUSH))
249251
{
250-
if (Player* pPlayer = itr->getSource())
251-
pPlayer->CastSpell(pPlayer, SPELL_KING_OF_GORDOK, true);
252+
// Chorush evades and yells on king death (if alive)
253+
if (pOgre->isAlive())
254+
{
255+
DoScriptText(SAY_CHORUSH_KING_DEAD, pOgre);
256+
pOgre->SetFactionTemporary(FACTION_FRIENDLY, TEMPFACTION_RESTORE_RESPAWN);
257+
pOgre->AI()->EnterEvadeMode();
258+
}
259+
260+
// start WP movement for Mizzle; event handled by movement and gossip dbscripts
261+
if (Creature* pMizzle = pOgre->SummonCreature(NPC_MIZZLE_THE_CRAFTY, afMizzleSpawnLoc[0], afMizzleSpawnLoc[1], afMizzleSpawnLoc[2], afMizzleSpawnLoc[3], TEMPSUMMON_DEAD_DESPAWN, 0, true))
262+
{
263+
pMizzle->SetWalk(false);
264+
pMizzle->GetMotionMaster()->MoveWaypoint();
265+
}
252266
}
253267
}
254268
break;

‎sd2_revision_nr.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#ifndef __SD2_REVISION_NR_H__
22
#define __SD2_REVISION_NR_H__
3-
#define SD2_REVISION_NR "s2818"
3+
#define SD2_REVISION_NR "s2819"
44
#endif // __SD2_REVISION_NR_H__

‎sql/scriptdev2_script_full.sql‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1514,7 +1514,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen
15141514
(-1429000,'The demon is loose! Quickly we must restrain him!',0,6,0,0,'highborne summoner SAY_FREE_IMMOLTHAR'),
15151515
(-1429001,'Who dares disrupt the sanctity of Eldre\'Thalas? Face me, cowards!',0,6,0,0,'prince tortheldrin SAY_KILL_IMMOLTHAR'),
15161516

1517-
(-1429002,'At last... Freed from his cursed grasp!',0,6,0,0,'old ironbark SAY_IRONBARK_REDEEM');
1517+
(-1429002,'At last... Freed from his cursed grasp!',0,6,0,0,'old ironbark SAY_IRONBARK_REDEEM'),
1518+
1519+
(-1429003,'The king is dead - OH NOES! Summon Mizzle da Crafty! He knows what to do next!',0,1,0,0,'cho\'rush SAY_KING_DEAD');
15181520

15191521
-- -1 469 000 BLACKWING LAIR
15201522
INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES

‎sql/updates/r2819_scriptdev2.sql‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
DELETE FROM script_texts WHERE entry=-1429003;
2+
INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES
3+
(-1429003,'The king is dead - OH NOES! Summon Mizzle da Crafty! He knows what to do next!',0,1,0,0,'cho\'rush SAY_KING_DEAD');

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL