Skip to content

Commit 5ff7657

Browse files
Ulduarxfurry
authored andcommitted
[s2835] Fix trash mobs cleaning for M'uru on encounter fail or complete
Signed-off-by: Xfurry <xfurry@scriptdev2.com> (based on commit SD2[3110] - 9593341) Signed-off-by: Xfurry <xfurry@scriptdev2.com>
1 parent bcf05ab commit 5ff7657

File tree

4 files changed

+23
-3
lines changed

4 files changed

+23
-3
lines changed

scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ enum
6363

6464
// Muru npcs
6565
NPC_VOID_SENTINEL_SUMMONER = 25782,
66-
NPC_VOID_SENTINEL = 25772, // scripted in Acid
67-
NPC_DARK_FIEND = 25744,
6866

6967
// darkness spells
7068
SPELL_VOID_ZONE_VISUAL = 46265,

scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,12 @@ void instance_sunwell_plateau::OnCreatureCreate(Creature* pCreature)
125125
if (pCreature->GetPositionY() < 523.0f)
126126
m_lBackdoorTriggersList.push_back(pCreature->GetObjectGuid());
127127
break;
128+
case NPC_BERSERKER:
129+
case NPC_FURY_MAGE:
130+
case NPC_DARK_FIEND:
131+
case NPC_VOID_SENTINEL:
132+
m_lMuruTrashGuidList.push_back(pCreature->GetObjectGuid());
133+
return;
128134
}
129135
}
130136

@@ -233,6 +239,17 @@ void instance_sunwell_plateau::SetData(uint32 uiType, uint32 uiData)
233239
DoUseDoorOrButton(GO_MURU_EXIT_GATE);
234240
else if (uiData == IN_PROGRESS)
235241
m_uiMuruBerserkTimer = 10 * MINUTE * IN_MILLISECONDS;
242+
if (uiData == FAIL || uiData == DONE)
243+
{
244+
// clear all the trash mobs
245+
for (GuidList::const_iterator itr = m_lMuruTrashGuidList.begin(); itr != m_lMuruTrashGuidList.end(); ++itr)
246+
{
247+
if (Creature* pTrash = instance->GetCreature(*itr))
248+
pTrash->ForcedDespawn();
249+
}
250+
251+
m_lMuruTrashGuidList.clear();
252+
}
236253
break;
237254
case TYPE_KILJAEDEN:
238255
m_auiEncounter[uiType] = uiData;

scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ enum
3131
NPC_SACROLASH = 25165,
3232
NPC_MURU = 25741,
3333
NPC_ENTROPIUS = 25840,
34+
NPC_BERSERKER = 25798, // muru trash mobs - scripted in Acid
35+
NPC_FURY_MAGE = 25799,
36+
NPC_DARK_FIEND = 25744,
37+
NPC_VOID_SENTINEL = 25772,
3438
NPC_DECEIVER = 25588,
3539
NPC_KILJAEDEN = 25315,
3640
NPC_KILJAEDEN_CONTROLLER = 25608, // kiljaeden event controller
@@ -151,5 +155,6 @@ class instance_sunwell_plateau : public ScriptedInstance, private DialogueHelper
151155
GuidList m_lAllFlightTriggersList;
152156
GuidList m_lBackdoorTriggersList;
153157
GuidList m_lDeceiversGuidList;
158+
GuidList m_lMuruTrashGuidList;
154159
};
155160
#endif

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 "s2834"
3+
#define SD2_REVISION_NR "s2835"
44
#endif // __SD2_REVISION_NR_H__

0 commit comments

Comments
 (0)