Ruins of Ahn'Qiraj:
- Rewritten instance script - Kurinnaxx has been rewritten. - Moam has been rewritten. Rest of the bosses is TODO. Also fix yet another typo in my latest commit, lol.
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
-- Fix faction of Sand Trap
|
||||
UPDATE `gameobject_template` SET `faction`=14 WHERE `entry`=180647;
|
||||
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
@@ -15,113 +14,87 @@
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Ayamiss
|
||||
SD%Complete: 50
|
||||
SDComment: VERIFY SCRIPT
|
||||
SDCategory: Ruins of Ahn'Qiraj
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptPCH.h"
|
||||
|
||||
#include "ObjectMgr.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ruins_of_ahnqiraj.h"
|
||||
|
||||
/*
|
||||
To do:
|
||||
make him fly from 70-100%
|
||||
*/
|
||||
|
||||
enum Spells
|
||||
enum eAyamiss
|
||||
{
|
||||
SPELL_STINGERSPRAY = 25749,
|
||||
SPELL_POISONSTINGER = 25748, //only used in phase1
|
||||
SPELL_SUMMONSWARMER = 25844, //might be 25708
|
||||
SPELL_PARALYZE = 23414 //doesnt work correct (core)
|
||||
SPELL_STINGERSPRAY = 25749,
|
||||
SPELL_POISONSTINGER = 25748, //only used in phase1
|
||||
SPELL_PARALYZE = 25725,
|
||||
SPELL_TRASH = 3391,
|
||||
SPELL_FRENZY = 8269,
|
||||
SPELL_LASH = 25852,
|
||||
|
||||
EMOTE_FRENZY = -1000002,
|
||||
|
||||
SPELL_FEED = 25721,
|
||||
};
|
||||
|
||||
class boss_ayamiss : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_ayamiss() : CreatureScript("boss_ayamiss") { }
|
||||
public:
|
||||
boss_ayamiss() : CreatureScript("boss_ayamiss") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
return new boss_ayamissAI (pCreature);
|
||||
}
|
||||
|
||||
struct boss_ayamissAI : public ScriptedAI
|
||||
{
|
||||
boss_ayamissAI(Creature *c) : ScriptedAI(c)
|
||||
struct boss_ayamissAI : public ScriptedAI
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
uint32 STINGERSPRAY_Timer;
|
||||
uint32 POISONSTINGER_Timer;
|
||||
uint32 SUMMONSWARMER_Timer;
|
||||
uint32 phase;
|
||||
|
||||
InstanceScript *pInstance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
STINGERSPRAY_Timer = 30000;
|
||||
POISONSTINGER_Timer = 30000;
|
||||
SUMMONSWARMER_Timer = 60000;
|
||||
phase=1;
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_AYAMISS_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_AYAMISS_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_AYAMISS_EVENT, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//If he is 70% start phase 2
|
||||
if (phase == 1 && !HealthAbovePct(70) && !me->IsNonMeleeSpellCasted(false))
|
||||
boss_ayamissAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
phase=2;
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
//STINGERSPRAY_Timer (only in phase2)
|
||||
if (phase == 2 && STINGERSPRAY_Timer <= diff)
|
||||
uint32 STINGERSPRAY_Timer;
|
||||
uint32 POISONSTINGER_Timer;
|
||||
uint32 SUMMONSWARMER_Timer;
|
||||
uint32 phase;
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_STINGERSPRAY);
|
||||
STINGERSPRAY_Timer = 30000;
|
||||
} else STINGERSPRAY_Timer -= diff;
|
||||
|
||||
//POISONSTINGER_Timer (only in phase1)
|
||||
if (phase == 1 && POISONSTINGER_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_POISONSTINGER);
|
||||
POISONSTINGER_Timer = 30000;
|
||||
} else POISONSTINGER_Timer -= diff;
|
||||
|
||||
//SUMMONSWARMER_Timer (only in phase1)
|
||||
if (SUMMONSWARMER_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SUMMONSWARMER);
|
||||
SUMMONSWARMER_Timer = 60000;
|
||||
} else SUMMONSWARMER_Timer -= diff;
|
||||
phase = 1;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 const diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//If he is 70% start phase 2
|
||||
if (phase == 1 && !HealthAbovePct(70) && !me->IsNonMeleeSpellCasted(false))
|
||||
{
|
||||
phase=2;
|
||||
}
|
||||
|
||||
//STINGERSPRAY_Timer (only in phase2)
|
||||
if (phase == 2 && STINGERSPRAY_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_STINGERSPRAY);
|
||||
STINGERSPRAY_Timer = 30000;
|
||||
} else STINGERSPRAY_Timer -= diff;
|
||||
|
||||
//POISONSTINGER_Timer (only in phase1)
|
||||
if (phase == 1 && POISONSTINGER_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_POISONSTINGER);
|
||||
POISONSTINGER_Timer = 30000;
|
||||
} else POISONSTINGER_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_ayamissAI (creature);
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
void AddSC_boss_ayamiss()
|
||||
|
||||
@@ -33,42 +33,20 @@ enum Yells
|
||||
|
||||
class boss_buru : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_buru() : CreatureScript("boss_buru") { }
|
||||
public:
|
||||
boss_buru() : CreatureScript("boss_buru") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
return new boss_buruAI (pCreature);
|
||||
}
|
||||
|
||||
struct boss_buruAI : public ScriptedAI
|
||||
{
|
||||
boss_buruAI(Creature *c) : ScriptedAI(c)
|
||||
struct boss_buruAI : public ScriptedAI
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
boss_buruAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
InstanceScript *pInstance;
|
||||
|
||||
void Reset()
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_BURU_EVENT, NOT_STARTED);
|
||||
return new boss_buruAI(creature);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_BURU_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_BURU_EVENT, DONE);
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
void AddSC_boss_buru()
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
@@ -16,130 +15,107 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Kurinnaxx
|
||||
SD%Complete: 100
|
||||
SDComment: VERIFY SCRIPT AND SQL
|
||||
SDCategory: Ruins of Ahn'Qiraj
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptPCH.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ruins_of_ahnqiraj.h"
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_MORTALWOUND = 25646,
|
||||
SPELL_SANDTRAP = 25656,
|
||||
SPELL_ENRAGE = 28798,
|
||||
SPELL_SUMMON_PLAYER = 26446,
|
||||
SPELL_TRASH = 3391,
|
||||
SPELL_WIDE_SLASH = 25814
|
||||
SPELL_MORTALWOUND = 25646,
|
||||
SPELL_SANDTRAP = 25648,
|
||||
SPELL_ENRAGE = 26527,
|
||||
SPELL_SUMMON_PLAYER = 26446,
|
||||
SPELL_TRASH = 3391, // Should perhaps be triggered by an aura? Couldn't find any though
|
||||
SPELL_WIDE_SLASH = 25814
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_MORTAL_WOUND = 1,
|
||||
EVENT_SANDTRAP = 2,
|
||||
EVENT_TRASH = 3,
|
||||
EVENT_WIDE_SLASH = 4
|
||||
};
|
||||
|
||||
class boss_kurinnaxx : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_kurinnaxx() : CreatureScript("boss_kurinnaxx") { }
|
||||
public:
|
||||
boss_kurinnaxx() : CreatureScript("boss_kurinnaxx") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
return new boss_kurinnaxxAI (pCreature);
|
||||
}
|
||||
|
||||
struct boss_kurinnaxxAI : public ScriptedAI
|
||||
{
|
||||
boss_kurinnaxxAI(Creature *c) : ScriptedAI(c)
|
||||
struct boss_kurinnaxxAI : public BossAI
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
uint32 uiMortalWoundTimer;
|
||||
uint32 uiSandtrapTimer;
|
||||
uint32 uiWideSlashTimer;
|
||||
uint32 uiSummonPlayerTimer;
|
||||
uint32 uiTrashTimer;
|
||||
bool bIsEnraged;
|
||||
|
||||
InstanceScript* pInstance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
bIsEnraged = false;
|
||||
uiMortalWoundTimer = urand(2000, 7000);
|
||||
uiSandtrapTimer = urand(20000, 30000);
|
||||
uiWideSlashTimer = urand(10000, 15000);
|
||||
uiTrashTimer = urand(20000, 25000);
|
||||
uiSummonPlayerTimer = urand(30000, 40000);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_KURINNAXX_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_KURINNAXX_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_KURINNAXX_EVENT, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//If we are <30% cast enrage
|
||||
if (!bIsEnraged && !HealthAbovePct(30) && !me->IsNonMeleeSpellCasted(false))
|
||||
boss_kurinnaxxAI(Creature* creature) : BossAI(creature, BOSS_KURINNAXX)
|
||||
{
|
||||
bIsEnraged = true;
|
||||
DoCast(me, SPELL_ENRAGE);
|
||||
}
|
||||
|
||||
//Mortal Wound spell
|
||||
if (uiMortalWoundTimer <= diff)
|
||||
void Reset()
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_MORTALWOUND);
|
||||
uiMortalWoundTimer = urand(2000, 7000);
|
||||
} else uiMortalWoundTimer -= diff;
|
||||
_Reset();
|
||||
_enraged = false;
|
||||
events.ScheduleEvent(EVENT_MORTAL_WOUND, 8000);
|
||||
events.ScheduleEvent(EVENT_SANDTRAP, urand(5000,15000));
|
||||
events.ScheduleEvent(EVENT_TRASH, 1000);
|
||||
events.ScheduleEvent(EVENT_WIDE_SLASH, 11000);
|
||||
}
|
||||
|
||||
//Santrap spell
|
||||
if (uiSandtrapTimer <= diff)
|
||||
void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/)
|
||||
{
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, SPELL_SANDTRAP);
|
||||
uiSandtrapTimer = 30000;
|
||||
} else uiSandtrapTimer -= diff;
|
||||
if (!_enraged && HealthBelowPct(30))
|
||||
{
|
||||
DoCast(me, SPELL_ENRAGE);
|
||||
_enraged = true;
|
||||
}
|
||||
}
|
||||
|
||||
//Wide Slash spell
|
||||
if (uiWideSlashTimer <= diff)
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_WIDE_SLASH);
|
||||
uiWideSlashTimer = urand(10000, 15000);
|
||||
} else uiWideSlashTimer -= diff;
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//Trash spell
|
||||
if (uiTrashTimer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_TRASH);
|
||||
uiTrashTimer = urand(20000, 25000);
|
||||
} else uiTrashTimer -= diff;
|
||||
events.Update(diff);
|
||||
|
||||
//Summon Player spell
|
||||
if (uiSummonPlayerTimer <= diff)
|
||||
{
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, SPELL_SUMMON_PLAYER);
|
||||
uiSummonPlayerTimer = urand(30000, 40000);
|
||||
} else uiSummonPlayerTimer -= diff;
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_MORTAL_WOUND:
|
||||
DoCastVictim(SPELL_MORTALWOUND);
|
||||
events.ScheduleEvent(EVENT_MORTAL_WOUND, 8000);
|
||||
break;
|
||||
case EVENT_SANDTRAP:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
target->CastSpell(target, SPELL_SANDTRAP, true);
|
||||
else
|
||||
me->getVictim()->CastSpell(me->getVictim(), SPELL_SANDTRAP, true);
|
||||
events.ScheduleEvent(EVENT_SANDTRAP, urand(5000,15000));
|
||||
break;
|
||||
case EVENT_WIDE_SLASH:
|
||||
DoCast(me, SPELL_WIDE_SLASH);
|
||||
events.ScheduleEvent(EVENT_WIDE_SLASH, 11000);
|
||||
break;
|
||||
case EVENT_TRASH:
|
||||
DoCast(me, SPELL_TRASH);
|
||||
events.ScheduleEvent(EVENT_WIDE_SLASH, 16000);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
private:
|
||||
bool _enraged;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_kurinnaxxAI (creature);
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
void AddSC_boss_kurinnaxx()
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
@@ -16,17 +15,10 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Moam
|
||||
SD%Complete: 90
|
||||
SDComment: TODO: Adjust timer, correct Stone phase buff
|
||||
SDCategory: Ruins of Ahn'Qiraj
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptPCH.h"
|
||||
#include "ruins_of_ahnqiraj.h"
|
||||
|
||||
enum Emotes
|
||||
enum Texts
|
||||
{
|
||||
EMOTE_AGGRO = -1509000,
|
||||
EMOTE_MANA_FULL = -1509001
|
||||
@@ -34,130 +26,158 @@ enum Emotes
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_TRAMPLE = 15550,
|
||||
SPELL_DRAINMANA = 27256, //Doesn't exist ?
|
||||
SPELL_ARCANEERUPTION = 25672,
|
||||
SPELL_SUMMONMANA = 25681, //Summon Mana fiend. It only summons one so exec it three times
|
||||
SPELL_GRDRSLEEP = 24360 //Greater Dreamless Sleep
|
||||
SPELL_TRAMPLE = 15550,
|
||||
SPELL_DRAIN_MANA = 25671,
|
||||
SPELL_ARCANE_ERUPTION = 25672,
|
||||
SPELL_SUMMON_MANA_FIEND_1 = 25681, // TARGET_DEST_CASTER_FRONT
|
||||
SPELL_SUMMON_MANA_FIEND_2 = 25682, // TARGET_DEST_CASTER_LEFT
|
||||
SPELL_SUMMON_MANA_FIEND_3 = 25683, // TARGET_DEST_CASTER_RIGHT
|
||||
SPELL_ENERGIZE = 25685
|
||||
};
|
||||
|
||||
enum Creatures
|
||||
enum Events
|
||||
{
|
||||
CREATURE_MANA_FIEND = 15527
|
||||
EVENT_TRAMPLE = 1,
|
||||
EVENT_DRAIN_MANA = 2,
|
||||
EVENT_STONE_PHASE = 3,
|
||||
EVENT_STONE_PHASE_END = 4,
|
||||
EVENT_WIDE_SLASH = 5,
|
||||
};
|
||||
|
||||
enum CombatPhase
|
||||
enum Actions
|
||||
{
|
||||
NORMAL,
|
||||
STONE
|
||||
ACTION_STONE_PHASE_START = 1,
|
||||
ACTION_STONE_PHASE_END = 2,
|
||||
};
|
||||
|
||||
class boss_moam : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_moam() : CreatureScript("boss_moam") { }
|
||||
public:
|
||||
boss_moam() : CreatureScript("boss_moam") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
return new boss_moamAI (pCreature);
|
||||
}
|
||||
|
||||
struct boss_moamAI : public ScriptedAI
|
||||
{
|
||||
boss_moamAI(Creature *c) : ScriptedAI(c)
|
||||
struct boss_moamAI : public BossAI
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
uint32 uiTrampleTimer;
|
||||
uint32 uiDrainManaTimer;
|
||||
uint32 uiPhaseTimer;
|
||||
CombatPhase Phase;
|
||||
|
||||
InstanceScript *pInstance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
uiTrampleTimer = urand(3000, 7000);
|
||||
uiDrainManaTimer = urand(3000, 7000);
|
||||
uiPhaseTimer = 90000;
|
||||
Phase = NORMAL;
|
||||
me->SetPower(POWER_MANA, 0);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_MOAM_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(EMOTE_AGGRO, me);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_MOAM_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_MOAM_EVENT, DONE);
|
||||
}
|
||||
|
||||
void DrainMana()
|
||||
{
|
||||
for (uint8 i=0;i<6;++i)
|
||||
boss_moamAI(Creature* creature) : BossAI(creature, BOSS_MOAM)
|
||||
{
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
_Reset();
|
||||
me->SetPower(POWER_MANA, 0);
|
||||
_isStonePhase = false;
|
||||
events.ScheduleEvent(EVENT_STONE_PHASE, 90000);
|
||||
//events.ScheduleEvent(EVENT_WIDE_SLASH, 11000);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/)
|
||||
{
|
||||
if (!_isStonePhase && HealthBelowPct(45))
|
||||
{
|
||||
pTarget->ModifyPower(POWER_MANA, -500);
|
||||
me->ModifyPower(POWER_MANA, 1000);
|
||||
_isStonePhase = true;
|
||||
DoAction(ACTION_STONE_PHASE_START);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (Phase == NORMAL)
|
||||
void DoAction(int32 const action)
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
case ACTION_STONE_PHASE_END:
|
||||
{
|
||||
me->RemoveAurasDueToSpell(SPELL_ENERGIZE);
|
||||
events.ScheduleEvent(EVENT_STONE_PHASE, 90000);
|
||||
_isStonePhase = false;
|
||||
break;
|
||||
}
|
||||
case ACTION_STONE_PHASE_START:
|
||||
{
|
||||
DoCast(me, SPELL_SUMMON_MANA_FIEND_1);
|
||||
DoCast(me, SPELL_SUMMON_MANA_FIEND_2);
|
||||
DoCast(me, SPELL_SUMMON_MANA_FIEND_3);
|
||||
DoCast(me, SPELL_ENERGIZE);
|
||||
events.ScheduleEvent(EVENT_STONE_PHASE_END, 90000);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 const diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//If we are 100%MANA cast Arcane Erruption
|
||||
events.Update(diff);
|
||||
|
||||
if (me->GetPower(POWER_MANA) == me->GetMaxPower(POWER_MANA))
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_ARCANEERUPTION);
|
||||
DoScriptText(EMOTE_MANA_FULL, me);
|
||||
if (_isStonePhase)
|
||||
DoAction(ACTION_STONE_PHASE_END);
|
||||
DoCastAOE(SPELL_ARCANE_ERUPTION);
|
||||
me->SetPower(POWER_MANA, 0);
|
||||
}
|
||||
|
||||
//Trample Spell
|
||||
if (uiTrampleTimer <= diff)
|
||||
if (_isStonePhase)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_TRAMPLE);
|
||||
uiTrampleTimer = urand(3000, 7000);
|
||||
} else uiTrampleTimer -= diff;
|
||||
if (events.ExecuteEvent() == EVENT_STONE_PHASE_END)
|
||||
DoAction(ACTION_STONE_PHASE_END);
|
||||
return;
|
||||
}
|
||||
|
||||
//Drain Mana
|
||||
if (uiDrainManaTimer <= diff)
|
||||
// Messing up mana-drain channel
|
||||
//if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
// return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
DrainMana();
|
||||
uiDrainManaTimer = urand(3000, 7000);
|
||||
} else uiDrainManaTimer -= diff;
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_STONE_PHASE:
|
||||
DoAction(ACTION_STONE_PHASE_START);
|
||||
break;
|
||||
case EVENT_DRAIN_MANA:
|
||||
{
|
||||
std::list<Unit*> targetList;
|
||||
{
|
||||
const std::list<HostileReference*>& threatlist = me->getThreatManager().getThreatList();
|
||||
for (std::list<HostileReference*>::const_iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
|
||||
if ((*itr)->getTarget()->GetTypeId() == TYPEID_PLAYER && (*itr)->getTarget()->getPowerType() == POWER_MANA)
|
||||
targetList.push_back((*itr)->getTarget());
|
||||
}
|
||||
|
||||
Trinity::RandomResizeList(targetList, 5);
|
||||
|
||||
for (std::list<Unit*>::iterator itr = targetList.begin(); itr != targetList.end(); ++itr)
|
||||
DoCast(*itr, SPELL_DRAIN_MANA);
|
||||
|
||||
events.ScheduleEvent(EVENT_DRAIN_MANA, urand(5000,15000));
|
||||
break;
|
||||
}/*
|
||||
case EVENT_WIDE_SLASH:
|
||||
DoCast(me, SPELL_WIDE_SLASH);
|
||||
events.ScheduleEvent(EVENT_WIDE_SLASH, 11000);
|
||||
break;
|
||||
case EVENT_TRASH:
|
||||
DoCast(me, SPELL_TRASH);
|
||||
events.ScheduleEvent(EVENT_WIDE_SLASH, 16000);
|
||||
break;*/
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
|
||||
//After 90secs change phase
|
||||
if (uiPhaseTimer <= diff)
|
||||
{
|
||||
Phase = STONE;
|
||||
DoCast(me, SPELL_SUMMONMANA);
|
||||
DoCast(me, SPELL_SUMMONMANA);
|
||||
DoCast(me, SPELL_SUMMONMANA);
|
||||
DoCast(me, SPELL_GRDRSLEEP);
|
||||
} else uiPhaseTimer -= diff;
|
||||
}
|
||||
}
|
||||
};
|
||||
private:
|
||||
bool _isStonePhase;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_moamAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_moam()
|
||||
|
||||
@@ -41,42 +41,20 @@ enum Yells
|
||||
|
||||
class boss_ossirian : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_ossirian() : CreatureScript("boss_ossirian") { }
|
||||
public:
|
||||
boss_ossirian() : CreatureScript("boss_ossirian") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
return new boss_ossirianAI (pCreature);
|
||||
}
|
||||
|
||||
struct boss_ossirianAI : public ScriptedAI
|
||||
{
|
||||
boss_ossirianAI(Creature *c) : ScriptedAI(c)
|
||||
struct boss_ossirianAI : public ScriptedAI
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
boss_ossirianAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
InstanceScript *pInstance;
|
||||
|
||||
void Reset()
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_OSSIRIAN_EVENT, NOT_STARTED);
|
||||
return new boss_ossirianAI (creature);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_OSSIRIAN_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_OSSIRIAN_EVENT, DONE);
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
void AddSC_boss_ossirian()
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
@@ -16,20 +15,17 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Rajaxx
|
||||
SD%Complete: 0
|
||||
SDComment: Place Holder
|
||||
SDCategory: Ruins of Ahn'Qiraj
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptPCH.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ruins_of_ahnqiraj.h"
|
||||
|
||||
enum Yells
|
||||
{
|
||||
SAY_ANDOROV_INTRO = -1509003,
|
||||
SAY_ANDOROV_ATTACK = -1509004,
|
||||
// The time of our retribution is at hand! Let darkness reign in the hearts of our enemies! Sound: 8645 Emote: 35
|
||||
SAY_ANDOROV_INTRO = -1509003, // Before for the first wave
|
||||
SAY_ANDOROV_ATTACK = -1509004, // Beginning the event
|
||||
SAY_ANDOROV_WAVE_1 = -1509001, // When the first wave comes text: Kill first, ask questions later... Incoming! emote: 45 sound: 8653
|
||||
SAY_WAVE3 = -1509005,
|
||||
SAY_WAVE4 = -1509006,
|
||||
SAY_WAVE5 = -1509007,
|
||||
@@ -39,50 +35,94 @@ enum Yells
|
||||
SAY_UNK1 = -1509011,
|
||||
SAY_UNK2 = -1509012,
|
||||
SAY_UNK3 = -1509013,
|
||||
SAY_UNK4 = -1509014,
|
||||
SAY_DEAGGRO = -1509015,
|
||||
SAY_DEATH = -1509014,
|
||||
SAY_CHANGEAGGRO = -1509015,
|
||||
SAY_KILLS_ANDOROV = -1509016,
|
||||
SAY_COMPLETE_QUEST = -1509017 //Yell when realm complete quest 8743 for world event
|
||||
SAY_COMPLETE_QUEST = -1509017 // Yell when realm complete quest 8743 for world event
|
||||
// Warriors, Captains, continue the fight! Sound: 8640
|
||||
};
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_DISARM = 6713,
|
||||
SPELL_FRENZY = 8269,
|
||||
SPELL_THUNDERCRASH = 25599
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_DISARM = 1, // 03:58:27, 03:58:49
|
||||
EVENT_THUNDERCRASH = 2, // 03:58:29, 03:58:50
|
||||
EVENT_CHANGE_AGGRO = 3,
|
||||
};
|
||||
|
||||
class boss_rajaxx : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_rajaxx() : CreatureScript("boss_rajaxx") { }
|
||||
public:
|
||||
boss_rajaxx() : CreatureScript("boss_rajaxx") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
return new boss_rajaxxAI (pCreature);
|
||||
}
|
||||
|
||||
struct boss_rajaxxAI : public ScriptedAI
|
||||
{
|
||||
boss_rajaxxAI(Creature *c) : ScriptedAI(c)
|
||||
struct boss_rajaxxAI : public BossAI
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
boss_rajaxxAI(Creature* creature) : BossAI(creature, BOSS_RAJAXX)
|
||||
{
|
||||
}
|
||||
|
||||
InstanceScript *pInstance;
|
||||
void Reset()
|
||||
{
|
||||
_Reset();
|
||||
enraged = false;
|
||||
events.ScheduleEvent(EVENT_DISARM, 10000);
|
||||
events.ScheduleEvent(EVENT_THUNDERCRASH, 12000);
|
||||
}
|
||||
|
||||
void Reset()
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
//SAY_DEATH
|
||||
_JustDied();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* victim)
|
||||
{
|
||||
_EnterCombat();
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_DISARM:
|
||||
DoCastVictim(SPELL_DISARM);
|
||||
events.ScheduleEvent(EVENT_DISARM, 22000);
|
||||
break;
|
||||
case EVENT_THUNDERCRASH:
|
||||
DoCast(me, SPELL_THUNDERCRASH);
|
||||
events.ScheduleEvent(EVENT_THUNDERCRASH, 21000);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
private:
|
||||
bool enraged;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_RAJAXX_EVENT, NOT_STARTED);
|
||||
return new boss_rajaxxAI (creature);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_RAJAXX_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_RAJAXX_EVENT, DONE);
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
void AddSC_boss_rajaxx()
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
@@ -16,200 +15,138 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Instance_Ruins_of_Ahnqiraj
|
||||
SD%Complete: 0
|
||||
SDComment: Place holder
|
||||
SDCategory: Ruins of Ahn'Qiraj
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptPCH.h"
|
||||
#include "ruins_of_ahnqiraj.h"
|
||||
|
||||
#define MAX_ENCOUNTER 6
|
||||
|
||||
/* Ruins of Ahn'Qiraj encounters:
|
||||
0 - Kurinnaxx
|
||||
1 - General Rajaxx
|
||||
2 - Moam
|
||||
3 - Buru the Gorger
|
||||
4 - Ayamiss the Hunter
|
||||
5 - Ossirian the Unscarred */
|
||||
|
||||
class instance_ruins_of_ahnqiraj : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_ruins_of_ahnqiraj() : InstanceMapScript("instance_ruins_of_ahnqiraj", 509) { }
|
||||
public:
|
||||
instance_ruins_of_ahnqiraj() : InstanceMapScript("instance_ruins_of_ahnqiraj", 509) {}
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* pMap) const
|
||||
{
|
||||
return new instance_ruins_of_ahn_qiraj_InstanceMapScript(pMap);
|
||||
}
|
||||
|
||||
struct instance_ruins_of_ahn_qiraj_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_ruins_of_ahn_qiraj_InstanceMapScript(Map* pMap) : InstanceScript(pMap) {}
|
||||
|
||||
uint64 uiKurinaxx;
|
||||
uint64 uiRajaxx;
|
||||
uint64 uiMoam;
|
||||
uint64 uiBuru;
|
||||
uint64 uiAyamiss;
|
||||
uint64 uiOssirian;
|
||||
|
||||
uint16 m_auiEncounter[MAX_ENCOUNTER];
|
||||
std::string str_data;
|
||||
|
||||
void Initialize()
|
||||
struct instance_ruins_of_ahnqiraj_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
|
||||
uiKurinaxx = 0;
|
||||
uiRajaxx = 0;
|
||||
uiMoam = 0;
|
||||
uiBuru = 0;
|
||||
uiAyamiss = 0;
|
||||
uiOssirian = 0;
|
||||
}
|
||||
|
||||
bool IsEncounterInProgress() const
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
if (m_auiEncounter[i] == IN_PROGRESS) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature)
|
||||
{
|
||||
switch (creature->GetEntry())
|
||||
instance_ruins_of_ahnqiraj_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
case CREATURE_KURINAXX:
|
||||
uiKurinaxx = creature->GetGUID();
|
||||
break;
|
||||
case CREATURE_RAJAXX:
|
||||
uiRajaxx = creature->GetGUID();
|
||||
break;
|
||||
case CREATURE_MOAM:
|
||||
uiMoam = creature->GetGUID();
|
||||
break;
|
||||
case CREATURE_BURU:
|
||||
uiBuru = creature->GetGUID();
|
||||
break;
|
||||
case CREATURE_AYAMISS:
|
||||
uiAyamiss = creature->GetGUID();
|
||||
break;
|
||||
case CREATURE_OSSIRIAN:
|
||||
uiOssirian = creature->GetGUID();
|
||||
break;
|
||||
}
|
||||
}
|
||||
SetBossNumber(MAX_ENCOUNTER);
|
||||
|
||||
uint32 GetData(uint32 identifier)
|
||||
{
|
||||
switch(identifier)
|
||||
{
|
||||
case DATA_KURINNAXX_EVENT: return m_auiEncounter[0];
|
||||
case DATA_RAJAXX_EVENT: return m_auiEncounter[1];
|
||||
case DATA_MOAM_EVENT: return m_auiEncounter[2];
|
||||
case DATA_BURU_EVENT: return m_auiEncounter[3];
|
||||
case DATA_AYAMISS_EVENT: return m_auiEncounter[4];
|
||||
case DATA_OSSIRIAN_EVENT: return m_auiEncounter[5];
|
||||
_kurinaxxGUID = 0;
|
||||
_rajaxxGUID = 0;
|
||||
_moamGUID = 0;
|
||||
_buruGUID = 0;
|
||||
_ayamissGUID = 0;
|
||||
_ossirianGUID = 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SetData(uint32 identifier, uint32 data)
|
||||
{
|
||||
switch(identifier)
|
||||
void OnCreatureCreate(Creature* creature)
|
||||
{
|
||||
case DATA_KURINNAXX_EVENT:
|
||||
m_auiEncounter[0] = data;
|
||||
break;
|
||||
case DATA_RAJAXX_EVENT:
|
||||
m_auiEncounter[1] = data;
|
||||
break;
|
||||
case DATA_MOAM_EVENT:
|
||||
m_auiEncounter[2] = data;
|
||||
break;
|
||||
case DATA_BURU_EVENT:
|
||||
m_auiEncounter[3] = data;
|
||||
break;
|
||||
case DATA_AYAMISS_EVENT:
|
||||
m_auiEncounter[4] = data;
|
||||
break;
|
||||
case DATA_OSSIRIAN_EVENT:
|
||||
m_auiEncounter[5] = data;
|
||||
break;
|
||||
switch (creature->GetEntry())
|
||||
{
|
||||
case NPC_KURINAXX:
|
||||
_kurinaxxGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_RAJAXX:
|
||||
_rajaxxGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_MOAM:
|
||||
_moamGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_BURU:
|
||||
_buruGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_AYAMISS:
|
||||
_ayamissGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_OSSIRIAN:
|
||||
_ossirianGUID = creature->GetGUID();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (data == DONE)
|
||||
SaveToDB();
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 uiIdentifier)
|
||||
{
|
||||
switch(uiIdentifier)
|
||||
bool SetBossState(uint32 bossId, EncounterState state)
|
||||
{
|
||||
case DATA_KURINNAXX: return uiKurinaxx;
|
||||
case DATA_RAJAXX: return uiRajaxx;
|
||||
case DATA_MOAM: return uiMoam;
|
||||
case DATA_BURU: return uiBuru;
|
||||
case DATA_AYAMISS: return uiAyamiss;
|
||||
case DATA_OSSIRIAN: return uiOssirian;
|
||||
if (!InstanceScript::SetBossState(bossId, state))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::string GetSaveData()
|
||||
{
|
||||
OUT_SAVE_INST_DATA;
|
||||
|
||||
std::ostringstream saveStream;
|
||||
saveStream << "R A " << m_auiEncounter[0] << " " << m_auiEncounter[1] << " "
|
||||
<< m_auiEncounter[2] << " " << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5];
|
||||
|
||||
str_data = saveStream.str();
|
||||
|
||||
OUT_SAVE_INST_DATA_COMPLETE;
|
||||
return str_data;
|
||||
}
|
||||
|
||||
void Load(const char* in)
|
||||
{
|
||||
if (!in)
|
||||
uint64 GetData64(uint32 type)
|
||||
{
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
return;
|
||||
switch (type)
|
||||
{
|
||||
case BOSS_KURINNAXX:
|
||||
return _kurinaxxGUID;
|
||||
case BOSS_RAJAXX:
|
||||
return _rajaxxGUID;
|
||||
case BOSS_MOAM:
|
||||
return _moamGUID;
|
||||
case BOSS_BURU:
|
||||
return _buruGUID;
|
||||
case BOSS_AYAMISS:
|
||||
return _ayamissGUID;
|
||||
case BOSS_OSSIRIAN:
|
||||
return _ossirianGUID;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
OUT_LOAD_INST_DATA(in);
|
||||
|
||||
char dataHead1, dataHead2;
|
||||
uint16 data0, data1, data2, data3, data4, data5;
|
||||
|
||||
std::istringstream loadStream(in);
|
||||
loadStream >> dataHead1 >> dataHead2 >> data0 >> data1 >> data2 >> data3 >> data4 >> data5;
|
||||
|
||||
if (dataHead1 == 'R' && dataHead2 == 'A')
|
||||
std::string GetSaveData()
|
||||
{
|
||||
m_auiEncounter[0] = data0;
|
||||
m_auiEncounter[1] = data1;
|
||||
m_auiEncounter[2] = data2;
|
||||
m_auiEncounter[3] = data3;
|
||||
m_auiEncounter[4] = data4;
|
||||
m_auiEncounter[5] = data5;
|
||||
OUT_SAVE_INST_DATA;
|
||||
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
if (m_auiEncounter[i] == IN_PROGRESS)
|
||||
m_auiEncounter[i] = NOT_STARTED;
|
||||
std::ostringstream saveStream;
|
||||
saveStream << "R A" << GetBossSaveData();
|
||||
|
||||
} else OUT_LOAD_INST_DATA_FAIL;
|
||||
OUT_SAVE_INST_DATA_COMPLETE;
|
||||
return saveStream.str();
|
||||
}
|
||||
|
||||
void Load(char const* data)
|
||||
{
|
||||
if (!data)
|
||||
{
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
return;
|
||||
}
|
||||
|
||||
OUT_LOAD_INST_DATA(data);
|
||||
|
||||
char dataHead1, dataHead2;
|
||||
|
||||
std::istringstream loadStream(data);
|
||||
loadStream >> dataHead1 >> dataHead2;
|
||||
|
||||
if (dataHead1 == 'R' && dataHead2 == 'A')
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
{
|
||||
uint32 tmpState;
|
||||
loadStream >> tmpState;
|
||||
if (tmpState == IN_PROGRESS || tmpState > TO_BE_DECIDED)
|
||||
tmpState = NOT_STARTED;
|
||||
SetBossState(i, EncounterState(tmpState));
|
||||
}
|
||||
}
|
||||
else
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
}
|
||||
|
||||
private:
|
||||
uint64 _kurinaxxGUID;
|
||||
uint64 _rajaxxGUID;
|
||||
uint64 _moamGUID;
|
||||
uint64 _buruGUID;
|
||||
uint64 _ayamissGUID;
|
||||
uint64 _ossirianGUID;
|
||||
};
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const
|
||||
{
|
||||
return new instance_ruins_of_ahnqiraj_InstanceMapScript(map);
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
void AddSC_instance_ruins_of_ahnqiraj()
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
@@ -19,34 +18,28 @@
|
||||
#ifndef DEF_RUINS_OF_AHNQIRAJ_H
|
||||
#define DEF_RUINS_OF_AHNQIRAJ_H
|
||||
|
||||
enum Data
|
||||
enum Encounters
|
||||
{
|
||||
DATA_KURINNAXX_EVENT,
|
||||
DATA_RAJAXX_EVENT,
|
||||
DATA_MOAM_EVENT,
|
||||
DATA_BURU_EVENT,
|
||||
DATA_AYAMISS_EVENT,
|
||||
DATA_OSSIRIAN_EVENT
|
||||
BOSS_KURINNAXX = 0,
|
||||
BOSS_RAJAXX = 1,
|
||||
BOSS_MOAM = 2,
|
||||
BOSS_BURU = 3,
|
||||
BOSS_AYAMISS = 4,
|
||||
BOSS_OSSIRIAN = 5,
|
||||
MAX_ENCOUNTER,
|
||||
};
|
||||
|
||||
enum Data64
|
||||
enum Creatures
|
||||
{
|
||||
DATA_KURINNAXX,
|
||||
DATA_RAJAXX,
|
||||
DATA_MOAM,
|
||||
DATA_BURU,
|
||||
DATA_AYAMISS,
|
||||
DATA_OSSIRIAN
|
||||
};
|
||||
|
||||
enum Bosses
|
||||
{
|
||||
CREATURE_KURINAXX = 15348,
|
||||
CREATURE_RAJAXX = 15341,
|
||||
CREATURE_MOAM = 15340,
|
||||
CREATURE_BURU = 15370,
|
||||
CREATURE_AYAMISS = 15369,
|
||||
CREATURE_OSSIRIAN = 15339
|
||||
NPC_KURINAXX = 15348,
|
||||
NPC_RAJAXX = 15341,
|
||||
NPC_MOAM = 15340,
|
||||
NPC_BURU = 15370,
|
||||
NPC_AYAMISS = 15369,
|
||||
NPC_OSSIRIAN = 15339,
|
||||
NPC_HIVEZARA_HORNET = 15934,
|
||||
NPC_HIVEZARA_SWARMER = 15546,
|
||||
NPC_HIVEZARA_LARVA = 15555,
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -263,9 +263,9 @@ public:
|
||||
//Attack random Gamers
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100.0f, true))
|
||||
{
|
||||
me->AddThreat(pTarget, 1.0f);
|
||||
me->TauntApply(pTarget);
|
||||
AttackStart(pTarget);
|
||||
me->AddThreat(target, 1.0f);
|
||||
me->TauntApply(target);
|
||||
AttackStart(target);
|
||||
}
|
||||
|
||||
AggroReset = true;
|
||||
|
||||
Reference in New Issue
Block a user