Permalink
Browse files

Fixed reseting of Moira after Emperor Dagran is dead.

  • Loading branch information...
1 parent fd3f9f1 commit 7fa4752ccd9b8c277c0e77101995a60aefed25bb @Taumer Taumer committed Mar 7, 2012
@@ -54,6 +54,7 @@ enum eTypes
DATA_THRONE_DOOR = 24,
DATA_SF_BRAZIER_N = 25,
- DATA_SF_BRAZIER_S = 26
+ DATA_SF_BRAZIER_S = 26,
+ DATA_MOIRA = 27,
};
#endif
@@ -24,6 +24,7 @@ SDCategory: Blackrock Depths
EndScriptData */
#include "ScriptPCH.h"
+#include "blackrock_depths.h"
enum Yells
{
@@ -49,8 +50,12 @@ class boss_emperor_dagran_thaurissan : public CreatureScript
struct boss_draganthaurissanAI : public ScriptedAI
{
- boss_draganthaurissanAI(Creature *c) : ScriptedAI(c) {}
+ boss_draganthaurissanAI(Creature *c) : ScriptedAI(c)
+ {
+ instance = me->GetInstanceScript();
+ }
+ InstanceScript* instance;
uint32 HandOfThaurissan_Timer;
uint32 AvatarOfFlame_Timer;
//uint32 Counter;
@@ -73,6 +78,15 @@ class boss_emperor_dagran_thaurissan : public CreatureScript
DoScriptText(SAY_SLAY, me);
}
+ void JustDied(Unit* /*who*/)
+ {
+ if (Creature* Moira = ObjectAccessor::GetCreature(*me, instance ? instance->GetData64(DATA_MOIRA) : 0))
+ {
+ Moira->AI()->EnterEvadeMode();
+ Moira->setFaction(35);
+ }
+ }
+
void UpdateAI(uint32 const diff)
{
//Return since we have no target
@@ -42,6 +42,7 @@ enum eEnums
NPC_GLOOMREL = 9037,
NPC_DOOMREL = 9039,
NPC_MAGMUS = 9938,
+ NPC_MOIRA = 8929,
GO_ARENA1 = 161525,
GO_ARENA2 = 161522,
@@ -87,6 +88,7 @@ class instance_blackrock_depths : public InstanceMapScript
uint64 EmperorGUID;
uint64 PhalanxGUID;
uint64 MagmusGUID;
+ uint64 MoiraGUID;
uint64 GoArena1GUID;
uint64 GoArena2GUID;
@@ -124,6 +126,7 @@ class instance_blackrock_depths : public InstanceMapScript
EmperorGUID = 0;
PhalanxGUID = 0;
MagmusGUID = 0;
+ MoiraGUID = 0;
GoArena1GUID = 0;
GoArena2GUID = 0;
@@ -163,6 +166,7 @@ class instance_blackrock_depths : public InstanceMapScript
{
case NPC_EMPEROR: EmperorGUID = creature->GetGUID(); break;
case NPC_PHALANX: PhalanxGUID = creature->GetGUID(); break;
+ case NPC_MOIRA: MoiraGUID = creature->GetGUID(); break;
case NPC_DOOMREL: TombBossGUIDs[0] = creature->GetGUID(); break;
case NPC_DOPEREL: TombBossGUIDs[1] = creature->GetGUID(); break;
case NPC_HATEREL: TombBossGUIDs[2] = creature->GetGUID(); break;
@@ -308,6 +312,8 @@ class instance_blackrock_depths : public InstanceMapScript
return EmperorGUID;
case DATA_PHALANX:
return PhalanxGUID;
+ case DATA_MOIRA:
+ return MoiraGUID;
case DATA_ARENA1:
return GoArena1GUID;
case DATA_ARENA2:

0 comments on commit 7fa4752

Please sign in to comment.