Converting EasternKingdoms/ZulAman and EasternKingdoms/ZulGurub.
Need to recheck tomorrow. :) --HG-- branch : trunk
This commit is contained in:
@@ -26,26 +26,15 @@ EndScriptData */
|
||||
#include "ScriptPCH.h"
|
||||
#include "zulgurub.h"
|
||||
|
||||
bool GOHello_go_gong_of_bethekk(Player* /*pPlayer*/, GameObject* pGo)
|
||||
{
|
||||
if (ScriptedInstance* m_pInstance = pGo->GetInstanceData())
|
||||
{
|
||||
if (m_pInstance->GetData(TYPE_ARLOKK) == DONE || m_pInstance->GetData(TYPE_ARLOKK) == IN_PROGRESS)
|
||||
return true;
|
||||
|
||||
m_pInstance->SetData(TYPE_ARLOKK, IN_PROGRESS);
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
enum eEnums
|
||||
enum eYells
|
||||
{
|
||||
SAY_AGGRO = -1309011,
|
||||
SAY_FEAST_PANTHER = -1309012,
|
||||
SAY_DEATH = -1309013,
|
||||
};
|
||||
|
||||
enum eSpells
|
||||
{
|
||||
SPELL_SHADOWWORDPAIN = 23952,
|
||||
SPELL_GOUGE = 24698,
|
||||
SPELL_MARK = 24210,
|
||||
@@ -59,222 +48,245 @@ enum eEnums
|
||||
NPC_ZULIAN_PROWLER = 15101
|
||||
};
|
||||
|
||||
struct boss_arlokkAI : public ScriptedAI
|
||||
class boss_arlokk : public CreatureScript
|
||||
{
|
||||
boss_arlokkAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
{
|
||||
m_pInstance = pCreature->GetInstanceData();
|
||||
}
|
||||
public:
|
||||
|
||||
ScriptedInstance* m_pInstance;
|
||||
|
||||
uint32 m_uiShadowWordPain_Timer;
|
||||
uint32 m_uiGouge_Timer;
|
||||
uint32 m_uiMark_Timer;
|
||||
uint32 m_uiCleave_Timer;
|
||||
uint32 m_uiVanish_Timer;
|
||||
uint32 m_uiVisible_Timer;
|
||||
|
||||
uint32 m_uiSummon_Timer;
|
||||
uint32 m_uiSummonCount;
|
||||
|
||||
Unit* m_pMarkedTarget;
|
||||
uint64 MarkedTargetGUID;
|
||||
|
||||
bool m_bIsPhaseTwo;
|
||||
bool m_bIsVanished;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
m_uiShadowWordPain_Timer = 8000;
|
||||
m_uiGouge_Timer = 14000;
|
||||
m_uiMark_Timer = 35000;
|
||||
m_uiCleave_Timer = 4000;
|
||||
m_uiVanish_Timer = 60000;
|
||||
m_uiVisible_Timer = 6000;
|
||||
|
||||
m_uiSummon_Timer = 5000;
|
||||
m_uiSummonCount = 0;
|
||||
|
||||
m_bIsPhaseTwo = false;
|
||||
m_bIsVanished = false;
|
||||
|
||||
MarkedTargetGUID = 0;
|
||||
|
||||
me->SetDisplayId(MODEL_ID_NORMAL);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
}
|
||||
|
||||
void JustReachedHome()
|
||||
{
|
||||
if (m_pInstance)
|
||||
m_pInstance->SetData(TYPE_ARLOKK, NOT_STARTED);
|
||||
|
||||
//we should be summoned, so despawn
|
||||
me->ForcedDespawn();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*pKiller*/)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
|
||||
me->SetDisplayId(MODEL_ID_NORMAL);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
|
||||
if (m_pInstance)
|
||||
m_pInstance->SetData(TYPE_ARLOKK, DONE);
|
||||
}
|
||||
|
||||
void DoSummonPhanters()
|
||||
{
|
||||
if (Unit *pMarkedTarget = Unit::GetUnit(*me, MarkedTargetGUID))
|
||||
DoScriptText(SAY_FEAST_PANTHER, me, pMarkedTarget);
|
||||
|
||||
me->SummonCreature(NPC_ZULIAN_PROWLER, -11532.7998, -1649.6734, 41.4800, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
me->SummonCreature(NPC_ZULIAN_PROWLER, -11532.9970, -1606.4840, 41.2979, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* pSummoned)
|
||||
{
|
||||
if (Unit *pMarkedTarget = Unit::GetUnit(*me, MarkedTargetGUID))
|
||||
pSummoned->AI()->AttackStart(pMarkedTarget);
|
||||
|
||||
++m_uiSummonCount;
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (!m_bIsPhaseTwo)
|
||||
boss_arlokk()
|
||||
: CreatureScript("boss_arlokk")
|
||||
{
|
||||
if (m_uiShadowWordPain_Timer <= uiDiff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SHADOWWORDPAIN);
|
||||
m_uiShadowWordPain_Timer = 15000;
|
||||
}
|
||||
else
|
||||
m_uiShadowWordPain_Timer -= uiDiff;
|
||||
|
||||
if (m_uiMark_Timer <= uiDiff)
|
||||
{
|
||||
Unit *pMarkedTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||
|
||||
if (pMarkedTarget)
|
||||
{
|
||||
DoCast(pMarkedTarget, SPELL_MARK);
|
||||
MarkedTargetGUID = pMarkedTarget->GetGUID();
|
||||
}
|
||||
else
|
||||
sLog.outError("TSCR: boss_arlokk could not accuire pMarkedTarget.");
|
||||
|
||||
m_uiMark_Timer = 15000;
|
||||
}
|
||||
else
|
||||
m_uiMark_Timer -= uiDiff;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Cleave_Timer
|
||||
if (m_uiCleave_Timer <= uiDiff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_CLEAVE);
|
||||
m_uiCleave_Timer = 16000;
|
||||
}
|
||||
else
|
||||
m_uiCleave_Timer -= uiDiff;
|
||||
|
||||
//Gouge_Timer
|
||||
if (m_uiGouge_Timer <= uiDiff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_GOUGE);
|
||||
|
||||
DoModifyThreatPercent(me->getVictim(),-80);
|
||||
|
||||
m_uiGouge_Timer = 17000+rand()%10000;
|
||||
}
|
||||
else
|
||||
m_uiGouge_Timer -= uiDiff;
|
||||
}
|
||||
|
||||
if (m_uiSummonCount <= 30)
|
||||
struct boss_arlokkAI : public ScriptedAI
|
||||
{
|
||||
if (m_uiSummon_Timer <= uiDiff)
|
||||
boss_arlokkAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
{
|
||||
DoSummonPhanters();
|
||||
m_pInstance = pCreature->GetInstanceData();
|
||||
}
|
||||
|
||||
ScriptedInstance* m_pInstance;
|
||||
|
||||
uint32 m_uiShadowWordPain_Timer;
|
||||
uint32 m_uiGouge_Timer;
|
||||
uint32 m_uiMark_Timer;
|
||||
uint32 m_uiCleave_Timer;
|
||||
uint32 m_uiVanish_Timer;
|
||||
uint32 m_uiVisible_Timer;
|
||||
|
||||
uint32 m_uiSummon_Timer;
|
||||
uint32 m_uiSummonCount;
|
||||
|
||||
Unit* m_pMarkedTarget;
|
||||
uint64 MarkedTargetGUID;
|
||||
|
||||
bool m_bIsPhaseTwo;
|
||||
bool m_bIsVanished;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
m_uiShadowWordPain_Timer = 8000;
|
||||
m_uiGouge_Timer = 14000;
|
||||
m_uiMark_Timer = 35000;
|
||||
m_uiCleave_Timer = 4000;
|
||||
m_uiVanish_Timer = 60000;
|
||||
m_uiVisible_Timer = 6000;
|
||||
|
||||
m_uiSummon_Timer = 5000;
|
||||
m_uiSummonCount = 0;
|
||||
|
||||
m_bIsPhaseTwo = false;
|
||||
m_bIsVanished = false;
|
||||
|
||||
MarkedTargetGUID = 0;
|
||||
|
||||
me->SetDisplayId(MODEL_ID_NORMAL);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
else
|
||||
m_uiSummon_Timer -= uiDiff;
|
||||
}
|
||||
|
||||
if (m_uiVanish_Timer <= uiDiff)
|
||||
{
|
||||
//Invisble Model
|
||||
me->SetDisplayId(MODEL_ID_BLANK);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
|
||||
me->AttackStop();
|
||||
DoResetThreat();
|
||||
|
||||
m_bIsVanished = true;
|
||||
|
||||
m_uiVanish_Timer = 45000;
|
||||
m_uiVisible_Timer = 6000;
|
||||
}
|
||||
else
|
||||
m_uiVanish_Timer -= uiDiff;
|
||||
|
||||
if (m_bIsVanished)
|
||||
{
|
||||
if (m_uiVisible_Timer <= uiDiff)
|
||||
void EnterCombat(Unit* /*pWho*/)
|
||||
{
|
||||
//The Panther Model
|
||||
me->SetDisplayId(MODEL_ID_PANTHER);
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
}
|
||||
|
||||
void JustReachedHome()
|
||||
{
|
||||
if (m_pInstance)
|
||||
m_pInstance->SetData(TYPE_ARLOKK, NOT_STARTED);
|
||||
|
||||
//we should be summoned, so despawn
|
||||
me->ForcedDespawn();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*pKiller*/)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
|
||||
me->SetDisplayId(MODEL_ID_NORMAL);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
|
||||
const CreatureInfo *cinfo = me->GetCreatureInfo();
|
||||
me->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 35)));
|
||||
me->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 35)));
|
||||
me->UpdateDamagePhysical(BASE_ATTACK);
|
||||
|
||||
if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
AttackStart(pTarget);
|
||||
|
||||
m_bIsPhaseTwo = true;
|
||||
m_bIsVanished = false;
|
||||
if (m_pInstance)
|
||||
m_pInstance->SetData(TYPE_ARLOKK, DONE);
|
||||
}
|
||||
else
|
||||
m_uiVisible_Timer -= uiDiff;
|
||||
|
||||
void DoSummonPhanters()
|
||||
{
|
||||
if (Unit *pMarkedTarget = Unit::GetUnit(*me, MarkedTargetGUID))
|
||||
DoScriptText(SAY_FEAST_PANTHER, me, pMarkedTarget);
|
||||
|
||||
me->SummonCreature(NPC_ZULIAN_PROWLER, -11532.7998, -1649.6734, 41.4800, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
me->SummonCreature(NPC_ZULIAN_PROWLER, -11532.9970, -1606.4840, 41.2979, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* pSummoned)
|
||||
{
|
||||
if (Unit *pMarkedTarget = Unit::GetUnit(*me, MarkedTargetGUID))
|
||||
pSummoned->AI()->AttackStart(pMarkedTarget);
|
||||
|
||||
++m_uiSummonCount;
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (!m_bIsPhaseTwo)
|
||||
{
|
||||
if (m_uiShadowWordPain_Timer <= uiDiff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SHADOWWORDPAIN);
|
||||
m_uiShadowWordPain_Timer = 15000;
|
||||
}
|
||||
else
|
||||
m_uiShadowWordPain_Timer -= uiDiff;
|
||||
|
||||
if (m_uiMark_Timer <= uiDiff)
|
||||
{
|
||||
Unit *pMarkedTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||
|
||||
if (pMarkedTarget)
|
||||
{
|
||||
DoCast(pMarkedTarget, SPELL_MARK);
|
||||
MarkedTargetGUID = pMarkedTarget->GetGUID();
|
||||
}
|
||||
else
|
||||
sLog.outError("TSCR: boss_arlokk could not accuire pMarkedTarget.");
|
||||
|
||||
m_uiMark_Timer = 15000;
|
||||
}
|
||||
else
|
||||
m_uiMark_Timer -= uiDiff;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Cleave_Timer
|
||||
if (m_uiCleave_Timer <= uiDiff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_CLEAVE);
|
||||
m_uiCleave_Timer = 16000;
|
||||
}
|
||||
else
|
||||
m_uiCleave_Timer -= uiDiff;
|
||||
|
||||
//Gouge_Timer
|
||||
if (m_uiGouge_Timer <= uiDiff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_GOUGE);
|
||||
|
||||
DoModifyThreatPercent(me->getVictim(),-80);
|
||||
|
||||
m_uiGouge_Timer = 17000+rand()%10000;
|
||||
}
|
||||
else
|
||||
m_uiGouge_Timer -= uiDiff;
|
||||
}
|
||||
|
||||
if (m_uiSummonCount <= 30)
|
||||
{
|
||||
if (m_uiSummon_Timer <= uiDiff)
|
||||
{
|
||||
DoSummonPhanters();
|
||||
m_uiSummon_Timer = 5000;
|
||||
}
|
||||
else
|
||||
m_uiSummon_Timer -= uiDiff;
|
||||
}
|
||||
|
||||
if (m_uiVanish_Timer <= uiDiff)
|
||||
{
|
||||
//Invisble Model
|
||||
me->SetDisplayId(MODEL_ID_BLANK);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
|
||||
me->AttackStop();
|
||||
DoResetThreat();
|
||||
|
||||
m_bIsVanished = true;
|
||||
|
||||
m_uiVanish_Timer = 45000;
|
||||
m_uiVisible_Timer = 6000;
|
||||
}
|
||||
else
|
||||
m_uiVanish_Timer -= uiDiff;
|
||||
|
||||
if (m_bIsVanished)
|
||||
{
|
||||
if (m_uiVisible_Timer <= uiDiff)
|
||||
{
|
||||
//The Panther Model
|
||||
me->SetDisplayId(MODEL_ID_PANTHER);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
|
||||
const CreatureInfo *cinfo = me->GetCreatureInfo();
|
||||
me->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 35)));
|
||||
me->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 35)));
|
||||
me->UpdateDamagePhysical(BASE_ATTACK);
|
||||
|
||||
if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
AttackStart(pTarget);
|
||||
|
||||
m_bIsPhaseTwo = true;
|
||||
m_bIsVanished = false;
|
||||
}
|
||||
else
|
||||
m_uiVisible_Timer -= uiDiff;
|
||||
}
|
||||
else
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_arlokkAI(creature);
|
||||
}
|
||||
else
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_arlokk(Creature* pCreature)
|
||||
class go_gong_of_bethekk : public GameObjectScript
|
||||
{
|
||||
return new boss_arlokkAI (pCreature);
|
||||
}
|
||||
public:
|
||||
go_gong_of_bethekk() : GameObjectScript("go_gong_of_bethekk")
|
||||
{
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* /*pPlayer*/, GameObject* pGo)
|
||||
{
|
||||
if (ScriptedInstance* m_pInstance = pGo->GetInstanceData())
|
||||
{
|
||||
if (m_pInstance->GetData(TYPE_ARLOKK) == DONE || m_pInstance->GetData(TYPE_ARLOKK) == IN_PROGRESS)
|
||||
return true;
|
||||
|
||||
m_pInstance->SetData(TYPE_ARLOKK, IN_PROGRESS);
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_arlokk()
|
||||
{
|
||||
Script *newscript;
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "go_gong_of_bethekk";
|
||||
newscript->pGOHello = &GOHello_go_gong_of_bethekk;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_arlokk";
|
||||
newscript->GetAI = &GetAI_boss_arlokk;
|
||||
newscript->RegisterSelf();
|
||||
new boss_arlokk();
|
||||
new go_gong_of_bethekk();
|
||||
}
|
||||
|
||||
|
||||
@@ -29,67 +29,74 @@ EndScriptData */
|
||||
#define SPELL_MASSIVEGEYSER 22421 //Not working. Cause its a summon...
|
||||
#define SPELL_SLAM 24326
|
||||
|
||||
struct boss_gahzrankaAI : public ScriptedAI
|
||||
class boss_gahzranka : public CreatureScript
|
||||
{
|
||||
boss_gahzrankaAI(Creature *c) : ScriptedAI(c) {}
|
||||
uint32 Frostbreath_Timer;
|
||||
uint32 MassiveGeyser_Timer;
|
||||
uint32 Slam_Timer;
|
||||
public:
|
||||
|
||||
void Reset()
|
||||
{
|
||||
Frostbreath_Timer = 8000;
|
||||
MassiveGeyser_Timer = 25000;
|
||||
Slam_Timer = 17000;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//Frostbreath_Timer
|
||||
if (Frostbreath_Timer <= diff)
|
||||
boss_gahzranka()
|
||||
: CreatureScript("boss_gahzranka")
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_FROSTBREATH);
|
||||
Frostbreath_Timer = 7000 + rand()%4000;
|
||||
} else Frostbreath_Timer -= diff;
|
||||
}
|
||||
|
||||
//MassiveGeyser_Timer
|
||||
if (MassiveGeyser_Timer <= diff)
|
||||
struct boss_gahzrankaAI : public ScriptedAI
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_MASSIVEGEYSER);
|
||||
DoResetThreat();
|
||||
boss_gahzrankaAI(Creature *c) : ScriptedAI(c) {}
|
||||
uint32 Frostbreath_Timer;
|
||||
uint32 MassiveGeyser_Timer;
|
||||
uint32 Slam_Timer;
|
||||
|
||||
MassiveGeyser_Timer = 22000 + rand()%10000;
|
||||
} else MassiveGeyser_Timer -= diff;
|
||||
void Reset()
|
||||
{
|
||||
Frostbreath_Timer = 8000;
|
||||
MassiveGeyser_Timer = 25000;
|
||||
Slam_Timer = 17000;
|
||||
}
|
||||
|
||||
//Slam_Timer
|
||||
if (Slam_Timer <= diff)
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//Frostbreath_Timer
|
||||
if (Frostbreath_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_FROSTBREATH);
|
||||
Frostbreath_Timer = 7000 + rand()%4000;
|
||||
} else Frostbreath_Timer -= diff;
|
||||
|
||||
//MassiveGeyser_Timer
|
||||
if (MassiveGeyser_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_MASSIVEGEYSER);
|
||||
DoResetThreat();
|
||||
|
||||
MassiveGeyser_Timer = 22000 + rand()%10000;
|
||||
} else MassiveGeyser_Timer -= diff;
|
||||
|
||||
//Slam_Timer
|
||||
if (Slam_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SLAM);
|
||||
Slam_Timer = 12000 + rand()%8000;
|
||||
} else Slam_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SLAM);
|
||||
Slam_Timer = 12000 + rand()%8000;
|
||||
} else Slam_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
return new boss_gahzrankaAI(creature);
|
||||
}
|
||||
};
|
||||
CreatureAI* GetAI_boss_gahzranka(Creature* pCreature)
|
||||
{
|
||||
return new boss_gahzrankaAI (pCreature);
|
||||
}
|
||||
|
||||
void AddSC_boss_gahzranka()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_gahzranka";
|
||||
newscript->GetAI = &GetAI_boss_gahzranka;
|
||||
newscript->RegisterSelf();
|
||||
new boss_gahzranka();
|
||||
}
|
||||
|
||||
|
||||
@@ -29,67 +29,74 @@ EndScriptData */
|
||||
#define SPELL_AVARTAR 24646 //The Enrage Spell
|
||||
#define SPELL_GROUNDTREMOR 6524
|
||||
|
||||
struct boss_grilekAI : public ScriptedAI
|
||||
class boss_grilek : public CreatureScript
|
||||
{
|
||||
boss_grilekAI(Creature *c) : ScriptedAI(c) {}
|
||||
public:
|
||||
|
||||
uint32 Avartar_Timer;
|
||||
uint32 GroundTremor_Timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
Avartar_Timer = 15000 + rand()%10000;
|
||||
GroundTremor_Timer = 8000 + rand()%8000;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//Avartar_Timer
|
||||
if (Avartar_Timer <= diff)
|
||||
boss_grilek()
|
||||
: CreatureScript("boss_grilek")
|
||||
{
|
||||
}
|
||||
|
||||
DoCast(me, SPELL_AVARTAR);
|
||||
Unit *pTarget = NULL;
|
||||
|
||||
pTarget = SelectUnit(SELECT_TARGET_RANDOM,1);
|
||||
|
||||
if (DoGetThreat(me->getVictim()))
|
||||
DoModifyThreatPercent(me->getVictim(),-50);
|
||||
if (pTarget)
|
||||
AttackStart(pTarget);
|
||||
|
||||
Avartar_Timer = 25000 + rand()%10000;
|
||||
} else Avartar_Timer -= diff;
|
||||
|
||||
//GroundTremor_Timer
|
||||
if (GroundTremor_Timer <= diff)
|
||||
struct boss_grilekAI : public ScriptedAI
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_GROUNDTREMOR);
|
||||
GroundTremor_Timer = 12000 + rand()%4000;
|
||||
} else GroundTremor_Timer -= diff;
|
||||
boss_grilekAI(Creature *c) : ScriptedAI(c) {}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
uint32 Avartar_Timer;
|
||||
uint32 GroundTremor_Timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
Avartar_Timer = 15000 + rand()%10000;
|
||||
GroundTremor_Timer = 8000 + rand()%8000;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//Avartar_Timer
|
||||
if (Avartar_Timer <= diff)
|
||||
{
|
||||
|
||||
DoCast(me, SPELL_AVARTAR);
|
||||
Unit *pTarget = NULL;
|
||||
|
||||
pTarget = SelectUnit(SELECT_TARGET_RANDOM,1);
|
||||
|
||||
if (DoGetThreat(me->getVictim()))
|
||||
DoModifyThreatPercent(me->getVictim(),-50);
|
||||
if (pTarget)
|
||||
AttackStart(pTarget);
|
||||
|
||||
Avartar_Timer = 25000 + rand()%10000;
|
||||
} else Avartar_Timer -= diff;
|
||||
|
||||
//GroundTremor_Timer
|
||||
if (GroundTremor_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_GROUNDTREMOR);
|
||||
GroundTremor_Timer = 12000 + rand()%4000;
|
||||
} else GroundTremor_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_grilekAI(creature);
|
||||
}
|
||||
};
|
||||
CreatureAI* GetAI_boss_grilek(Creature* pCreature)
|
||||
{
|
||||
return new boss_grilekAI (pCreature);
|
||||
}
|
||||
|
||||
void AddSC_boss_grilek()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_grilek";
|
||||
newscript->GetAI = &GetAI_boss_grilek;
|
||||
newscript->RegisterSelf();
|
||||
new boss_grilek();
|
||||
}
|
||||
|
||||
|
||||
@@ -44,209 +44,215 @@ EndScriptData */
|
||||
#define SPELL_ASPECT_OF_THEKAL 24689
|
||||
#define SPELL_ASPECT_OF_ARLOKK 24690
|
||||
|
||||
struct boss_hakkarAI : public ScriptedAI
|
||||
class boss_hakkar : public CreatureScript
|
||||
{
|
||||
boss_hakkarAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
m_pInstance = c->GetInstanceData();
|
||||
}
|
||||
public:
|
||||
|
||||
ScriptedInstance *m_pInstance;
|
||||
|
||||
uint32 BloodSiphon_Timer;
|
||||
uint32 CorruptedBlood_Timer;
|
||||
uint32 CauseInsanity_Timer;
|
||||
uint32 WillOfHakkar_Timer;
|
||||
uint32 Enrage_Timer;
|
||||
|
||||
uint32 CheckJeklik_Timer;
|
||||
uint32 CheckVenoxis_Timer;
|
||||
uint32 CheckMarli_Timer;
|
||||
uint32 CheckThekal_Timer;
|
||||
uint32 CheckArlokk_Timer;
|
||||
|
||||
uint32 AspectOfJeklik_Timer;
|
||||
uint32 AspectOfVenoxis_Timer;
|
||||
uint32 AspectOfMarli_Timer;
|
||||
uint32 AspectOfThekal_Timer;
|
||||
uint32 AspectOfArlokk_Timer;
|
||||
|
||||
bool Enraged;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
BloodSiphon_Timer = 90000;
|
||||
CorruptedBlood_Timer = 25000;
|
||||
CauseInsanity_Timer = 17000;
|
||||
WillOfHakkar_Timer = 17000;
|
||||
Enrage_Timer = 600000;
|
||||
|
||||
CheckJeklik_Timer = 1000;
|
||||
CheckVenoxis_Timer = 2000;
|
||||
CheckMarli_Timer = 3000;
|
||||
CheckThekal_Timer = 4000;
|
||||
CheckArlokk_Timer = 5000;
|
||||
|
||||
AspectOfJeklik_Timer = 4000;
|
||||
AspectOfVenoxis_Timer = 7000;
|
||||
AspectOfMarli_Timer = 12000;
|
||||
AspectOfThekal_Timer = 8000;
|
||||
AspectOfArlokk_Timer = 18000;
|
||||
|
||||
Enraged = false;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//BloodSiphon_Timer
|
||||
if (BloodSiphon_Timer <= diff)
|
||||
boss_hakkar()
|
||||
: CreatureScript("boss_hakkar")
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_BLOODSIPHON);
|
||||
BloodSiphon_Timer = 90000;
|
||||
} else BloodSiphon_Timer -= diff;
|
||||
}
|
||||
|
||||
//CorruptedBlood_Timer
|
||||
if (CorruptedBlood_Timer <= diff)
|
||||
struct boss_hakkarAI : public ScriptedAI
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_CORRUPTEDBLOOD);
|
||||
CorruptedBlood_Timer = 30000 + rand()%15000;
|
||||
} else CorruptedBlood_Timer -= diff;
|
||||
|
||||
//CauseInsanity_Timer
|
||||
/*if (CauseInsanity_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget, SPELL_CAUSEINSANITY);
|
||||
|
||||
CauseInsanity_Timer = 35000 + rand()%8000;
|
||||
} else CauseInsanity_Timer -= diff;*/
|
||||
|
||||
//WillOfHakkar_Timer
|
||||
if (WillOfHakkar_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget, SPELL_WILLOFHAKKAR);
|
||||
|
||||
WillOfHakkar_Timer = 25000 + rand()%10000;
|
||||
} else WillOfHakkar_Timer -= diff;
|
||||
|
||||
if (!Enraged && Enrage_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_ENRAGE);
|
||||
Enraged = true;
|
||||
} else Enrage_Timer -= diff;
|
||||
|
||||
//Checking if Jeklik is dead. If not we cast her Aspect
|
||||
if (CheckJeklik_Timer <= diff)
|
||||
{
|
||||
if (m_pInstance)
|
||||
boss_hakkarAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
if (m_pInstance->GetData(TYPE_JEKLIK) != DONE)
|
||||
{
|
||||
if (AspectOfJeklik_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_ASPECT_OF_JEKLIK);
|
||||
AspectOfJeklik_Timer = 10000 + rand()%4000;
|
||||
} else AspectOfJeklik_Timer -= diff;
|
||||
}
|
||||
m_pInstance = c->GetInstanceData();
|
||||
}
|
||||
CheckJeklik_Timer = 1000;
|
||||
} else CheckJeklik_Timer -= diff;
|
||||
|
||||
//Checking if Venoxis is dead. If not we cast his Aspect
|
||||
if (CheckVenoxis_Timer <= diff)
|
||||
{
|
||||
if (m_pInstance)
|
||||
ScriptedInstance *m_pInstance;
|
||||
|
||||
uint32 BloodSiphon_Timer;
|
||||
uint32 CorruptedBlood_Timer;
|
||||
uint32 CauseInsanity_Timer;
|
||||
uint32 WillOfHakkar_Timer;
|
||||
uint32 Enrage_Timer;
|
||||
|
||||
uint32 CheckJeklik_Timer;
|
||||
uint32 CheckVenoxis_Timer;
|
||||
uint32 CheckMarli_Timer;
|
||||
uint32 CheckThekal_Timer;
|
||||
uint32 CheckArlokk_Timer;
|
||||
|
||||
uint32 AspectOfJeklik_Timer;
|
||||
uint32 AspectOfVenoxis_Timer;
|
||||
uint32 AspectOfMarli_Timer;
|
||||
uint32 AspectOfThekal_Timer;
|
||||
uint32 AspectOfArlokk_Timer;
|
||||
|
||||
bool Enraged;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
if (m_pInstance->GetData(TYPE_VENOXIS) != DONE)
|
||||
{
|
||||
if (AspectOfVenoxis_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_ASPECT_OF_VENOXIS);
|
||||
AspectOfVenoxis_Timer = 8000;
|
||||
} else AspectOfVenoxis_Timer -= diff;
|
||||
}
|
||||
}
|
||||
CheckVenoxis_Timer = 1000;
|
||||
} else CheckVenoxis_Timer -= diff;
|
||||
BloodSiphon_Timer = 90000;
|
||||
CorruptedBlood_Timer = 25000;
|
||||
CauseInsanity_Timer = 17000;
|
||||
WillOfHakkar_Timer = 17000;
|
||||
Enrage_Timer = 600000;
|
||||
|
||||
//Checking if Marli is dead. If not we cast her Aspect
|
||||
if (CheckMarli_Timer <= diff)
|
||||
{
|
||||
if (m_pInstance)
|
||||
CheckJeklik_Timer = 1000;
|
||||
CheckVenoxis_Timer = 2000;
|
||||
CheckMarli_Timer = 3000;
|
||||
CheckThekal_Timer = 4000;
|
||||
CheckArlokk_Timer = 5000;
|
||||
|
||||
AspectOfJeklik_Timer = 4000;
|
||||
AspectOfVenoxis_Timer = 7000;
|
||||
AspectOfMarli_Timer = 12000;
|
||||
AspectOfThekal_Timer = 8000;
|
||||
AspectOfArlokk_Timer = 18000;
|
||||
|
||||
Enraged = false;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
if (m_pInstance->GetData(TYPE_MARLI) != DONE)
|
||||
{
|
||||
if (AspectOfMarli_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_ASPECT_OF_MARLI);
|
||||
AspectOfMarli_Timer = 10000;
|
||||
} else AspectOfMarli_Timer -= diff;
|
||||
|
||||
}
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
}
|
||||
CheckMarli_Timer = 1000;
|
||||
} else CheckMarli_Timer -= diff;
|
||||
|
||||
//Checking if Thekal is dead. If not we cast his Aspect
|
||||
if (CheckThekal_Timer <= diff)
|
||||
{
|
||||
if (m_pInstance)
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (m_pInstance->GetData(TYPE_THEKAL) != DONE)
|
||||
{
|
||||
if (AspectOfThekal_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_ASPECT_OF_THEKAL);
|
||||
AspectOfThekal_Timer = 15000;
|
||||
} else AspectOfThekal_Timer -= diff;
|
||||
}
|
||||
}
|
||||
CheckThekal_Timer = 1000;
|
||||
} else CheckThekal_Timer -= diff;
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//Checking if Arlokk is dead. If yes we cast her Aspect
|
||||
if (CheckArlokk_Timer <= diff)
|
||||
//BloodSiphon_Timer
|
||||
if (BloodSiphon_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_BLOODSIPHON);
|
||||
BloodSiphon_Timer = 90000;
|
||||
} else BloodSiphon_Timer -= diff;
|
||||
|
||||
//CorruptedBlood_Timer
|
||||
if (CorruptedBlood_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_CORRUPTEDBLOOD);
|
||||
CorruptedBlood_Timer = 30000 + rand()%15000;
|
||||
} else CorruptedBlood_Timer -= diff;
|
||||
|
||||
//CauseInsanity_Timer
|
||||
/*if (CauseInsanity_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget, SPELL_CAUSEINSANITY);
|
||||
|
||||
CauseInsanity_Timer = 35000 + rand()%8000;
|
||||
} else CauseInsanity_Timer -= diff;*/
|
||||
|
||||
//WillOfHakkar_Timer
|
||||
if (WillOfHakkar_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget, SPELL_WILLOFHAKKAR);
|
||||
|
||||
WillOfHakkar_Timer = 25000 + rand()%10000;
|
||||
} else WillOfHakkar_Timer -= diff;
|
||||
|
||||
if (!Enraged && Enrage_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_ENRAGE);
|
||||
Enraged = true;
|
||||
} else Enrage_Timer -= diff;
|
||||
|
||||
//Checking if Jeklik is dead. If not we cast her Aspect
|
||||
if (CheckJeklik_Timer <= diff)
|
||||
{
|
||||
if (m_pInstance)
|
||||
{
|
||||
if (m_pInstance->GetData(TYPE_JEKLIK) != DONE)
|
||||
{
|
||||
if (AspectOfJeklik_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_ASPECT_OF_JEKLIK);
|
||||
AspectOfJeklik_Timer = 10000 + rand()%4000;
|
||||
} else AspectOfJeklik_Timer -= diff;
|
||||
}
|
||||
}
|
||||
CheckJeklik_Timer = 1000;
|
||||
} else CheckJeklik_Timer -= diff;
|
||||
|
||||
//Checking if Venoxis is dead. If not we cast his Aspect
|
||||
if (CheckVenoxis_Timer <= diff)
|
||||
{
|
||||
if (m_pInstance)
|
||||
{
|
||||
if (m_pInstance->GetData(TYPE_VENOXIS) != DONE)
|
||||
{
|
||||
if (AspectOfVenoxis_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_ASPECT_OF_VENOXIS);
|
||||
AspectOfVenoxis_Timer = 8000;
|
||||
} else AspectOfVenoxis_Timer -= diff;
|
||||
}
|
||||
}
|
||||
CheckVenoxis_Timer = 1000;
|
||||
} else CheckVenoxis_Timer -= diff;
|
||||
|
||||
//Checking if Marli is dead. If not we cast her Aspect
|
||||
if (CheckMarli_Timer <= diff)
|
||||
{
|
||||
if (m_pInstance)
|
||||
{
|
||||
if (m_pInstance->GetData(TYPE_MARLI) != DONE)
|
||||
{
|
||||
if (AspectOfMarli_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_ASPECT_OF_MARLI);
|
||||
AspectOfMarli_Timer = 10000;
|
||||
} else AspectOfMarli_Timer -= diff;
|
||||
|
||||
}
|
||||
}
|
||||
CheckMarli_Timer = 1000;
|
||||
} else CheckMarli_Timer -= diff;
|
||||
|
||||
//Checking if Thekal is dead. If not we cast his Aspect
|
||||
if (CheckThekal_Timer <= diff)
|
||||
{
|
||||
if (m_pInstance)
|
||||
{
|
||||
if (m_pInstance->GetData(TYPE_THEKAL) != DONE)
|
||||
{
|
||||
if (AspectOfThekal_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_ASPECT_OF_THEKAL);
|
||||
AspectOfThekal_Timer = 15000;
|
||||
} else AspectOfThekal_Timer -= diff;
|
||||
}
|
||||
}
|
||||
CheckThekal_Timer = 1000;
|
||||
} else CheckThekal_Timer -= diff;
|
||||
|
||||
//Checking if Arlokk is dead. If yes we cast her Aspect
|
||||
if (CheckArlokk_Timer <= diff)
|
||||
{
|
||||
if (m_pInstance)
|
||||
{
|
||||
if (m_pInstance->GetData(TYPE_ARLOKK) != DONE)
|
||||
{
|
||||
if (AspectOfArlokk_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_ASPECT_OF_ARLOKK);
|
||||
DoResetThreat();
|
||||
|
||||
AspectOfArlokk_Timer = 10000 + rand()%5000;
|
||||
} else AspectOfArlokk_Timer -= diff;
|
||||
}
|
||||
}
|
||||
CheckArlokk_Timer = 1000;
|
||||
} else CheckArlokk_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
if (m_pInstance)
|
||||
{
|
||||
if (m_pInstance->GetData(TYPE_ARLOKK) != DONE)
|
||||
{
|
||||
if (AspectOfArlokk_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_ASPECT_OF_ARLOKK);
|
||||
DoResetThreat();
|
||||
|
||||
AspectOfArlokk_Timer = 10000 + rand()%5000;
|
||||
} else AspectOfArlokk_Timer -= diff;
|
||||
}
|
||||
}
|
||||
CheckArlokk_Timer = 1000;
|
||||
} else CheckArlokk_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
return new boss_hakkarAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_hakkar(Creature* pCreature)
|
||||
{
|
||||
return new boss_hakkarAI (pCreature);
|
||||
}
|
||||
|
||||
void AddSC_boss_hakkar()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_hakkar";
|
||||
newscript->GetAI = &GetAI_boss_hakkar;
|
||||
newscript->RegisterSelf();
|
||||
new boss_hakkar();
|
||||
}
|
||||
|
||||
|
||||
@@ -29,78 +29,85 @@ EndScriptData */
|
||||
#define SPELL_MANABURN 26046
|
||||
#define SPELL_SLEEP 24664
|
||||
|
||||
struct boss_hazzarahAI : public ScriptedAI
|
||||
class boss_hazzarah : public CreatureScript
|
||||
{
|
||||
boss_hazzarahAI(Creature *c) : ScriptedAI(c) {}
|
||||
public:
|
||||
|
||||
uint32 ManaBurn_Timer;
|
||||
uint32 Sleep_Timer;
|
||||
uint32 Illusions_Timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
ManaBurn_Timer = 4000 + rand()%6000;
|
||||
Sleep_Timer = 10000 + rand()%8000;
|
||||
Illusions_Timer = 10000 + rand()%8000;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//ManaBurn_Timer
|
||||
if (ManaBurn_Timer <= diff)
|
||||
boss_hazzarah()
|
||||
: CreatureScript("boss_hazzarah")
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_MANABURN);
|
||||
ManaBurn_Timer = 8000 + rand()%8000;
|
||||
} else ManaBurn_Timer -= diff;
|
||||
}
|
||||
|
||||
//Sleep_Timer
|
||||
if (Sleep_Timer <= diff)
|
||||
struct boss_hazzarahAI : public ScriptedAI
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SLEEP);
|
||||
Sleep_Timer = 12000 + rand()%8000;
|
||||
} else Sleep_Timer -= diff;
|
||||
boss_hazzarahAI(Creature *c) : ScriptedAI(c) {}
|
||||
|
||||
//Illusions_Timer
|
||||
if (Illusions_Timer <= diff)
|
||||
{
|
||||
//We will summon 3 illusions that will spawn on a random gamer and attack this gamer
|
||||
//We will just use one model for the beginning
|
||||
Unit *pTarget = NULL;
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
uint32 ManaBurn_Timer;
|
||||
uint32 Sleep_Timer;
|
||||
uint32 Illusions_Timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||
if (!pTarget)
|
||||
return;
|
||||
|
||||
Creature *Illusion = me->SummonCreature(15163,pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(),0,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,30000);
|
||||
if (Illusion)
|
||||
Illusion->AI()->AttackStart(pTarget);
|
||||
ManaBurn_Timer = 4000 + rand()%6000;
|
||||
Sleep_Timer = 10000 + rand()%8000;
|
||||
Illusions_Timer = 10000 + rand()%8000;
|
||||
}
|
||||
|
||||
Illusions_Timer = 15000 + rand()%10000;
|
||||
} else Illusions_Timer -= diff;
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//ManaBurn_Timer
|
||||
if (ManaBurn_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_MANABURN);
|
||||
ManaBurn_Timer = 8000 + rand()%8000;
|
||||
} else ManaBurn_Timer -= diff;
|
||||
|
||||
//Sleep_Timer
|
||||
if (Sleep_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SLEEP);
|
||||
Sleep_Timer = 12000 + rand()%8000;
|
||||
} else Sleep_Timer -= diff;
|
||||
|
||||
//Illusions_Timer
|
||||
if (Illusions_Timer <= diff)
|
||||
{
|
||||
//We will summon 3 illusions that will spawn on a random gamer and attack this gamer
|
||||
//We will just use one model for the beginning
|
||||
Unit *pTarget = NULL;
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
{
|
||||
pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||
if (!pTarget)
|
||||
return;
|
||||
|
||||
Creature *Illusion = me->SummonCreature(15163,pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(),0,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,30000);
|
||||
if (Illusion)
|
||||
Illusion->AI()->AttackStart(pTarget);
|
||||
}
|
||||
|
||||
Illusions_Timer = 15000 + rand()%10000;
|
||||
} else Illusions_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_hazzarahAI(creature);
|
||||
}
|
||||
};
|
||||
CreatureAI* GetAI_boss_hazzarah(Creature* pCreature)
|
||||
{
|
||||
return new boss_hazzarahAI (pCreature);
|
||||
}
|
||||
|
||||
void AddSC_boss_hazzarah()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_hazzarah";
|
||||
newscript->GetAI = &GetAI_boss_hazzarah;
|
||||
newscript->RegisterSelf();
|
||||
new boss_hazzarah();
|
||||
}
|
||||
|
||||
|
||||
@@ -43,251 +43,263 @@ EndScriptData */
|
||||
|
||||
#define SPELL_BOMB 40332 //Wrong ID but Magmadars bomb is not working...
|
||||
|
||||
struct boss_jeklikAI : public ScriptedAI
|
||||
class boss_jeklik : public CreatureScript
|
||||
{
|
||||
boss_jeklikAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
m_pInstance = c->GetInstanceData();
|
||||
}
|
||||
public:
|
||||
|
||||
ScriptedInstance *m_pInstance;
|
||||
|
||||
uint32 Charge_Timer;
|
||||
uint32 SonicBurst_Timer;
|
||||
uint32 Screech_Timer;
|
||||
uint32 SpawnBats_Timer;
|
||||
uint32 ShadowWordPain_Timer;
|
||||
uint32 MindFlay_Timer;
|
||||
uint32 ChainMindFlay_Timer;
|
||||
uint32 GreaterHeal_Timer;
|
||||
uint32 SpawnFlyingBats_Timer;
|
||||
|
||||
bool PhaseTwo;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
Charge_Timer = 20000;
|
||||
SonicBurst_Timer = 8000;
|
||||
Screech_Timer = 13000;
|
||||
SpawnBats_Timer = 60000;
|
||||
ShadowWordPain_Timer = 6000;
|
||||
MindFlay_Timer = 11000;
|
||||
ChainMindFlay_Timer = 26000;
|
||||
GreaterHeal_Timer = 50000;
|
||||
SpawnFlyingBats_Timer = 10000;
|
||||
|
||||
PhaseTwo = false;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
DoCast(me, SPELL_BAT_FORM);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*Killer*/)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
|
||||
if (m_pInstance)
|
||||
m_pInstance->SetData(TYPE_JEKLIK, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (me->getVictim() && me->isAlive())
|
||||
boss_jeklik()
|
||||
: CreatureScript("boss_jeklik")
|
||||
{
|
||||
if ((me->GetHealth()*100 / me->GetMaxHealth() > 50))
|
||||
}
|
||||
|
||||
struct boss_jeklikAI : public ScriptedAI
|
||||
{
|
||||
boss_jeklikAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
if (Charge_Timer <= diff)
|
||||
m_pInstance = c->GetInstanceData();
|
||||
}
|
||||
|
||||
ScriptedInstance *m_pInstance;
|
||||
|
||||
uint32 Charge_Timer;
|
||||
uint32 SonicBurst_Timer;
|
||||
uint32 Screech_Timer;
|
||||
uint32 SpawnBats_Timer;
|
||||
uint32 ShadowWordPain_Timer;
|
||||
uint32 MindFlay_Timer;
|
||||
uint32 ChainMindFlay_Timer;
|
||||
uint32 GreaterHeal_Timer;
|
||||
uint32 SpawnFlyingBats_Timer;
|
||||
|
||||
bool PhaseTwo;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
Charge_Timer = 20000;
|
||||
SonicBurst_Timer = 8000;
|
||||
Screech_Timer = 13000;
|
||||
SpawnBats_Timer = 60000;
|
||||
ShadowWordPain_Timer = 6000;
|
||||
MindFlay_Timer = 11000;
|
||||
ChainMindFlay_Timer = 26000;
|
||||
GreaterHeal_Timer = 50000;
|
||||
SpawnFlyingBats_Timer = 10000;
|
||||
|
||||
PhaseTwo = false;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
DoCast(me, SPELL_BAT_FORM);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*Killer*/)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
|
||||
if (m_pInstance)
|
||||
m_pInstance->SetData(TYPE_JEKLIK, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (me->getVictim() && me->isAlive())
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
if ((me->GetHealth()*100 / me->GetMaxHealth() > 50))
|
||||
{
|
||||
DoCast(pTarget, SPELL_CHARGE);
|
||||
AttackStart(pTarget);
|
||||
if (Charge_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
{
|
||||
DoCast(pTarget, SPELL_CHARGE);
|
||||
AttackStart(pTarget);
|
||||
}
|
||||
|
||||
Charge_Timer = 15000 + rand()%15000;
|
||||
} else Charge_Timer -= diff;
|
||||
|
||||
if (SonicBurst_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SONICBURST);
|
||||
SonicBurst_Timer = 8000 + rand()%5000;
|
||||
} else SonicBurst_Timer -= diff;
|
||||
|
||||
if (Screech_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SCREECH);
|
||||
Screech_Timer = 18000 + rand()%8000;
|
||||
} else Screech_Timer -= diff;
|
||||
|
||||
if (SpawnBats_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||
|
||||
Creature* Bat = NULL;
|
||||
Bat = me->SummonCreature(11368,-12291.6220,-1380.2640,144.8304,5.483, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (pTarget && Bat) Bat ->AI()->AttackStart(pTarget);
|
||||
|
||||
Bat = me->SummonCreature(11368,-12289.6220,-1380.2640,144.8304,5.483, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (pTarget && Bat) Bat ->AI()->AttackStart(pTarget);
|
||||
|
||||
Bat = me->SummonCreature(11368,-12293.6220,-1380.2640,144.8304,5.483, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (pTarget && Bat) Bat ->AI()->AttackStart(pTarget);
|
||||
|
||||
Bat = me->SummonCreature(11368,-12291.6220,-1380.2640,144.8304,5.483, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (pTarget && Bat) Bat ->AI()->AttackStart(pTarget);
|
||||
|
||||
Bat = me->SummonCreature(11368,-12289.6220,-1380.2640,144.8304,5.483, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (pTarget && Bat) Bat ->AI()->AttackStart(pTarget);
|
||||
Bat = me->SummonCreature(11368,-12293.6220,-1380.2640,144.8304,5.483, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (pTarget && Bat) Bat ->AI()->AttackStart(pTarget);
|
||||
|
||||
SpawnBats_Timer = 60000;
|
||||
} else SpawnBats_Timer -= diff;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (PhaseTwo)
|
||||
{
|
||||
if (PhaseTwo && ShadowWordPain_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
{
|
||||
DoCast(pTarget, SPELL_SHADOW_WORD_PAIN);
|
||||
ShadowWordPain_Timer = 12000 + rand()%6000;
|
||||
}
|
||||
}ShadowWordPain_Timer -=diff;
|
||||
|
||||
if (MindFlay_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_MIND_FLAY);
|
||||
MindFlay_Timer = 16000;
|
||||
}MindFlay_Timer -=diff;
|
||||
|
||||
if (ChainMindFlay_Timer <= diff)
|
||||
{
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
DoCast(me->getVictim(), SPELL_CHAIN_MIND_FLAY);
|
||||
ChainMindFlay_Timer = 15000 + rand()%15000;
|
||||
}ChainMindFlay_Timer -=diff;
|
||||
|
||||
if (GreaterHeal_Timer <= diff)
|
||||
{
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
DoCast(me, SPELL_GREATERHEAL);
|
||||
GreaterHeal_Timer = 25000 + rand()%10000;
|
||||
}GreaterHeal_Timer -=diff;
|
||||
|
||||
if (SpawnFlyingBats_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||
if (!pTarget)
|
||||
return;
|
||||
|
||||
Creature* FlyingBat = me->SummonCreature(14965, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ()+15, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (FlyingBat)
|
||||
FlyingBat->AI()->AttackStart(pTarget);
|
||||
|
||||
SpawnFlyingBats_Timer = 10000 + rand()%5000;
|
||||
} else SpawnFlyingBats_Timer -=diff;
|
||||
}
|
||||
else
|
||||
{
|
||||
me->SetDisplayId(15219);
|
||||
DoResetThreat();
|
||||
PhaseTwo = true;
|
||||
}
|
||||
}
|
||||
|
||||
Charge_Timer = 15000 + rand()%15000;
|
||||
} else Charge_Timer -= diff;
|
||||
|
||||
if (SonicBurst_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SONICBURST);
|
||||
SonicBurst_Timer = 8000 + rand()%5000;
|
||||
} else SonicBurst_Timer -= diff;
|
||||
|
||||
if (Screech_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SCREECH);
|
||||
Screech_Timer = 18000 + rand()%8000;
|
||||
} else Screech_Timer -= diff;
|
||||
|
||||
if (SpawnBats_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||
|
||||
Creature* Bat = NULL;
|
||||
Bat = me->SummonCreature(11368,-12291.6220,-1380.2640,144.8304,5.483, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (pTarget && Bat) Bat ->AI()->AttackStart(pTarget);
|
||||
|
||||
Bat = me->SummonCreature(11368,-12289.6220,-1380.2640,144.8304,5.483, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (pTarget && Bat) Bat ->AI()->AttackStart(pTarget);
|
||||
|
||||
Bat = me->SummonCreature(11368,-12293.6220,-1380.2640,144.8304,5.483, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (pTarget && Bat) Bat ->AI()->AttackStart(pTarget);
|
||||
|
||||
Bat = me->SummonCreature(11368,-12291.6220,-1380.2640,144.8304,5.483, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (pTarget && Bat) Bat ->AI()->AttackStart(pTarget);
|
||||
|
||||
Bat = me->SummonCreature(11368,-12289.6220,-1380.2640,144.8304,5.483, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (pTarget && Bat) Bat ->AI()->AttackStart(pTarget);
|
||||
Bat = me->SummonCreature(11368,-12293.6220,-1380.2640,144.8304,5.483, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (pTarget && Bat) Bat ->AI()->AttackStart(pTarget);
|
||||
|
||||
SpawnBats_Timer = 60000;
|
||||
} else SpawnBats_Timer -= diff;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (PhaseTwo)
|
||||
{
|
||||
if (PhaseTwo && ShadowWordPain_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
{
|
||||
DoCast(pTarget, SPELL_SHADOW_WORD_PAIN);
|
||||
ShadowWordPain_Timer = 12000 + rand()%6000;
|
||||
}
|
||||
}ShadowWordPain_Timer -=diff;
|
||||
|
||||
if (MindFlay_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_MIND_FLAY);
|
||||
MindFlay_Timer = 16000;
|
||||
}MindFlay_Timer -=diff;
|
||||
|
||||
if (ChainMindFlay_Timer <= diff)
|
||||
{
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
DoCast(me->getVictim(), SPELL_CHAIN_MIND_FLAY);
|
||||
ChainMindFlay_Timer = 15000 + rand()%15000;
|
||||
}ChainMindFlay_Timer -=diff;
|
||||
|
||||
if (GreaterHeal_Timer <= diff)
|
||||
{
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
DoCast(me, SPELL_GREATERHEAL);
|
||||
GreaterHeal_Timer = 25000 + rand()%10000;
|
||||
}GreaterHeal_Timer -=diff;
|
||||
|
||||
if (SpawnFlyingBats_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||
if (!pTarget)
|
||||
return;
|
||||
|
||||
Creature* FlyingBat = me->SummonCreature(14965, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ()+15, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (FlyingBat)
|
||||
FlyingBat->AI()->AttackStart(pTarget);
|
||||
|
||||
SpawnFlyingBats_Timer = 10000 + rand()%5000;
|
||||
} else SpawnFlyingBats_Timer -=diff;
|
||||
}
|
||||
else
|
||||
{
|
||||
me->SetDisplayId(15219);
|
||||
DoResetThreat();
|
||||
PhaseTwo = true;
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_jeklikAI(creature);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//Flying Bat
|
||||
struct mob_batriderAI : public ScriptedAI
|
||||
class mob_batrider : public CreatureScript
|
||||
{
|
||||
mob_batriderAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
m_pInstance = c->GetInstanceData();
|
||||
}
|
||||
public:
|
||||
|
||||
ScriptedInstance *m_pInstance;
|
||||
|
||||
uint32 Bomb_Timer;
|
||||
uint32 Check_Timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
Bomb_Timer = 2000;
|
||||
Check_Timer = 1000;
|
||||
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/) {}
|
||||
|
||||
void UpdateAI (const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//Bomb_Timer
|
||||
if (Bomb_Timer <= diff)
|
||||
mob_batrider()
|
||||
: CreatureScript("mob_batrider")
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
}
|
||||
|
||||
struct mob_batriderAI : public ScriptedAI
|
||||
{
|
||||
mob_batriderAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
DoCast(pTarget, SPELL_BOMB);
|
||||
Bomb_Timer = 5000;
|
||||
m_pInstance = c->GetInstanceData();
|
||||
}
|
||||
} else Bomb_Timer -= diff;
|
||||
|
||||
//Check_Timer
|
||||
if (Check_Timer <= diff)
|
||||
{
|
||||
if (m_pInstance)
|
||||
ScriptedInstance *m_pInstance;
|
||||
|
||||
uint32 Bomb_Timer;
|
||||
uint32 Check_Timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
if (m_pInstance->GetData(TYPE_JEKLIK) == DONE)
|
||||
{
|
||||
me->setDeathState(JUST_DIED);
|
||||
me->RemoveCorpse();
|
||||
Bomb_Timer = 2000;
|
||||
Check_Timer = 1000;
|
||||
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/) {}
|
||||
|
||||
void UpdateAI (const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
}
|
||||
|
||||
//Bomb_Timer
|
||||
if (Bomb_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
DoCast(pTarget, SPELL_BOMB);
|
||||
Bomb_Timer = 5000;
|
||||
}
|
||||
} else Bomb_Timer -= diff;
|
||||
|
||||
//Check_Timer
|
||||
if (Check_Timer <= diff)
|
||||
{
|
||||
if (m_pInstance)
|
||||
{
|
||||
if (m_pInstance->GetData(TYPE_JEKLIK) == DONE)
|
||||
{
|
||||
me->setDeathState(JUST_DIED);
|
||||
me->RemoveCorpse();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Check_Timer = 1000;
|
||||
} else Check_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
Check_Timer = 1000;
|
||||
} else Check_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new mob_batriderAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_jeklik(Creature* pCreature)
|
||||
{
|
||||
return new boss_jeklikAI (pCreature);
|
||||
}
|
||||
|
||||
CreatureAI* GetAI_mob_batrider(Creature* pCreature)
|
||||
{
|
||||
return new mob_batriderAI (pCreature);
|
||||
}
|
||||
|
||||
void AddSC_boss_jeklik()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_jeklik";
|
||||
newscript->GetAI = &GetAI_boss_jeklik;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "mob_batrider";
|
||||
newscript->GetAI = &GetAI_mob_batrider;
|
||||
newscript->RegisterSelf();
|
||||
new boss_jeklik();
|
||||
new mob_batrider();
|
||||
}
|
||||
|
||||
|
||||
@@ -41,225 +41,242 @@ EndScriptData */
|
||||
#define SPELL_SHADOWSHOCK 19460
|
||||
#define SPELL_INVISIBLE 24699
|
||||
|
||||
struct boss_jindoAI : public ScriptedAI
|
||||
class boss_jindo : public CreatureScript
|
||||
{
|
||||
boss_jindoAI(Creature *c) : ScriptedAI(c) {}
|
||||
public:
|
||||
|
||||
uint32 BrainWashTotem_Timer;
|
||||
uint32 HealingWard_Timer;
|
||||
uint32 Hex_Timer;
|
||||
uint32 Delusions_Timer;
|
||||
uint32 Teleport_Timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
BrainWashTotem_Timer = 20000;
|
||||
HealingWard_Timer = 16000;
|
||||
Hex_Timer = 8000;
|
||||
Delusions_Timer = 10000;
|
||||
Teleport_Timer = 5000;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//BrainWashTotem_Timer
|
||||
if (BrainWashTotem_Timer <= diff)
|
||||
boss_jindo()
|
||||
: CreatureScript("boss_jindo")
|
||||
{
|
||||
DoCast(me, SPELL_BRAINWASHTOTEM);
|
||||
BrainWashTotem_Timer = 18000 + rand()%8000;
|
||||
} else BrainWashTotem_Timer -= diff;
|
||||
}
|
||||
|
||||
//HealingWard_Timer
|
||||
if (HealingWard_Timer <= diff)
|
||||
struct boss_jindoAI : public ScriptedAI
|
||||
{
|
||||
//DoCast(me, SPELL_POWERFULLHEALINGWARD);
|
||||
me->SummonCreature(14987, me->GetPositionX()+3, me->GetPositionY()-2, me->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,30000);
|
||||
HealingWard_Timer = 14000 + rand()%6000;
|
||||
} else HealingWard_Timer -= diff;
|
||||
boss_jindoAI(Creature *c) : ScriptedAI(c) {}
|
||||
|
||||
//Hex_Timer
|
||||
if (Hex_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_HEX);
|
||||
uint32 BrainWashTotem_Timer;
|
||||
uint32 HealingWard_Timer;
|
||||
uint32 Hex_Timer;
|
||||
uint32 Delusions_Timer;
|
||||
uint32 Teleport_Timer;
|
||||
|
||||
if (DoGetThreat(me->getVictim()))
|
||||
DoModifyThreatPercent(me->getVictim(),-80);
|
||||
|
||||
Hex_Timer = 12000 + rand()%8000;
|
||||
} else Hex_Timer -= diff;
|
||||
|
||||
//Casting the delusion curse with a shade. So shade will attack the same target with the curse.
|
||||
if (Delusions_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
void Reset()
|
||||
{
|
||||
DoCast(pTarget, SPELL_DELUSIONSOFJINDO);
|
||||
|
||||
Creature *Shade = me->SummonCreature(14986, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Shade)
|
||||
Shade->AI()->AttackStart(pTarget);
|
||||
BrainWashTotem_Timer = 20000;
|
||||
HealingWard_Timer = 16000;
|
||||
Hex_Timer = 8000;
|
||||
Delusions_Timer = 10000;
|
||||
Teleport_Timer = 5000;
|
||||
}
|
||||
|
||||
Delusions_Timer = 4000 + rand()%8000;
|
||||
} else Delusions_Timer -= diff;
|
||||
|
||||
//Teleporting a random gamer and spawning 9 skeletons that will attack this gamer
|
||||
if (Teleport_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||
if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
DoTeleportPlayer(pTarget, -11583.7783,-1249.4278,77.5471,4.745);
|
||||
|
||||
if (DoGetThreat(me->getVictim()))
|
||||
DoModifyThreatPercent(pTarget,-100);
|
||||
|
||||
Creature *Skeletons;
|
||||
Skeletons = me->SummonCreature(14826, pTarget->GetPositionX()+2, pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Skeletons)
|
||||
Skeletons->AI()->AttackStart(pTarget);
|
||||
Skeletons = me->SummonCreature(14826, pTarget->GetPositionX()-2, pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Skeletons)
|
||||
Skeletons->AI()->AttackStart(pTarget);
|
||||
Skeletons = me->SummonCreature(14826, pTarget->GetPositionX()+4, pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Skeletons)
|
||||
Skeletons->AI()->AttackStart(pTarget);
|
||||
Skeletons = me->SummonCreature(14826, pTarget->GetPositionX()-4, pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Skeletons)
|
||||
Skeletons->AI()->AttackStart(pTarget);
|
||||
Skeletons = me->SummonCreature(14826, pTarget->GetPositionX(), pTarget->GetPositionY()+2, pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Skeletons)
|
||||
Skeletons->AI()->AttackStart(pTarget);
|
||||
Skeletons = me->SummonCreature(14826, pTarget->GetPositionX(), pTarget->GetPositionY()-2, pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Skeletons)
|
||||
Skeletons->AI()->AttackStart(pTarget);
|
||||
Skeletons = me->SummonCreature(14826, pTarget->GetPositionX(), pTarget->GetPositionY()+4, pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Skeletons)
|
||||
Skeletons->AI()->AttackStart(pTarget);
|
||||
Skeletons = me->SummonCreature(14826, pTarget->GetPositionX(), pTarget->GetPositionY()-4, pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Skeletons)
|
||||
Skeletons->AI()->AttackStart(pTarget);
|
||||
Skeletons = me->SummonCreature(14826, pTarget->GetPositionX()+3, pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Skeletons)
|
||||
Skeletons->AI()->AttackStart(pTarget);
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
}
|
||||
|
||||
Teleport_Timer = 15000 + rand()%8000;
|
||||
} else Teleport_Timer -= diff;
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
//BrainWashTotem_Timer
|
||||
if (BrainWashTotem_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_BRAINWASHTOTEM);
|
||||
BrainWashTotem_Timer = 18000 + rand()%8000;
|
||||
} else BrainWashTotem_Timer -= diff;
|
||||
|
||||
//HealingWard_Timer
|
||||
if (HealingWard_Timer <= diff)
|
||||
{
|
||||
//DoCast(me, SPELL_POWERFULLHEALINGWARD);
|
||||
me->SummonCreature(14987, me->GetPositionX()+3, me->GetPositionY()-2, me->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,30000);
|
||||
HealingWard_Timer = 14000 + rand()%6000;
|
||||
} else HealingWard_Timer -= diff;
|
||||
|
||||
//Hex_Timer
|
||||
if (Hex_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_HEX);
|
||||
|
||||
if (DoGetThreat(me->getVictim()))
|
||||
DoModifyThreatPercent(me->getVictim(),-80);
|
||||
|
||||
Hex_Timer = 12000 + rand()%8000;
|
||||
} else Hex_Timer -= diff;
|
||||
|
||||
//Casting the delusion curse with a shade. So shade will attack the same target with the curse.
|
||||
if (Delusions_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
{
|
||||
DoCast(pTarget, SPELL_DELUSIONSOFJINDO);
|
||||
|
||||
Creature *Shade = me->SummonCreature(14986, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Shade)
|
||||
Shade->AI()->AttackStart(pTarget);
|
||||
}
|
||||
|
||||
Delusions_Timer = 4000 + rand()%8000;
|
||||
} else Delusions_Timer -= diff;
|
||||
|
||||
//Teleporting a random gamer and spawning 9 skeletons that will attack this gamer
|
||||
if (Teleport_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||
if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
DoTeleportPlayer(pTarget, -11583.7783,-1249.4278,77.5471,4.745);
|
||||
|
||||
if (DoGetThreat(me->getVictim()))
|
||||
DoModifyThreatPercent(pTarget,-100);
|
||||
|
||||
Creature *Skeletons;
|
||||
Skeletons = me->SummonCreature(14826, pTarget->GetPositionX()+2, pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Skeletons)
|
||||
Skeletons->AI()->AttackStart(pTarget);
|
||||
Skeletons = me->SummonCreature(14826, pTarget->GetPositionX()-2, pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Skeletons)
|
||||
Skeletons->AI()->AttackStart(pTarget);
|
||||
Skeletons = me->SummonCreature(14826, pTarget->GetPositionX()+4, pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Skeletons)
|
||||
Skeletons->AI()->AttackStart(pTarget);
|
||||
Skeletons = me->SummonCreature(14826, pTarget->GetPositionX()-4, pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Skeletons)
|
||||
Skeletons->AI()->AttackStart(pTarget);
|
||||
Skeletons = me->SummonCreature(14826, pTarget->GetPositionX(), pTarget->GetPositionY()+2, pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Skeletons)
|
||||
Skeletons->AI()->AttackStart(pTarget);
|
||||
Skeletons = me->SummonCreature(14826, pTarget->GetPositionX(), pTarget->GetPositionY()-2, pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Skeletons)
|
||||
Skeletons->AI()->AttackStart(pTarget);
|
||||
Skeletons = me->SummonCreature(14826, pTarget->GetPositionX(), pTarget->GetPositionY()+4, pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Skeletons)
|
||||
Skeletons->AI()->AttackStart(pTarget);
|
||||
Skeletons = me->SummonCreature(14826, pTarget->GetPositionX(), pTarget->GetPositionY()-4, pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Skeletons)
|
||||
Skeletons->AI()->AttackStart(pTarget);
|
||||
Skeletons = me->SummonCreature(14826, pTarget->GetPositionX()+3, pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Skeletons)
|
||||
Skeletons->AI()->AttackStart(pTarget);
|
||||
}
|
||||
|
||||
Teleport_Timer = 15000 + rand()%8000;
|
||||
} else Teleport_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_jindoAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
//Healing Ward
|
||||
struct mob_healing_wardAI : public ScriptedAI
|
||||
class mob_healing_ward : public CreatureScript
|
||||
{
|
||||
mob_healing_wardAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceData();
|
||||
}
|
||||
public:
|
||||
|
||||
uint32 Heal_Timer;
|
||||
|
||||
ScriptedInstance *pInstance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
Heal_Timer = 2000;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI (const uint32 diff)
|
||||
{
|
||||
//Heal_Timer
|
||||
if (Heal_Timer <= diff)
|
||||
mob_healing_ward()
|
||||
: CreatureScript("mob_healing_ward")
|
||||
{
|
||||
if (pInstance)
|
||||
{
|
||||
Unit *pJindo = Unit::GetUnit((*me), pInstance->GetData64(DATA_JINDO));
|
||||
if (pJindo)
|
||||
DoCast(pJindo, SPELL_HEAL);
|
||||
}
|
||||
Heal_Timer = 3000;
|
||||
} else Heal_Timer -= diff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
struct mob_healing_wardAI : public ScriptedAI
|
||||
{
|
||||
mob_healing_wardAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceData();
|
||||
}
|
||||
|
||||
uint32 Heal_Timer;
|
||||
|
||||
ScriptedInstance *pInstance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
Heal_Timer = 2000;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI (const uint32 diff)
|
||||
{
|
||||
//Heal_Timer
|
||||
if (Heal_Timer <= diff)
|
||||
{
|
||||
if (pInstance)
|
||||
{
|
||||
Unit *pJindo = Unit::GetUnit((*me), pInstance->GetData64(DATA_JINDO));
|
||||
if (pJindo)
|
||||
DoCast(pJindo, SPELL_HEAL);
|
||||
}
|
||||
Heal_Timer = 3000;
|
||||
} else Heal_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new mob_healing_wardAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
//Shade of Jindo
|
||||
struct mob_shade_of_jindoAI : public ScriptedAI
|
||||
class mob_shade_of_jindo : public CreatureScript
|
||||
{
|
||||
mob_shade_of_jindoAI(Creature *c) : ScriptedAI(c) {}
|
||||
public:
|
||||
|
||||
uint32 ShadowShock_Timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
ShadowShock_Timer = 1000;
|
||||
DoCast(me, SPELL_INVISIBLE, true);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/){}
|
||||
|
||||
void UpdateAI (const uint32 diff)
|
||||
{
|
||||
|
||||
//ShadowShock_Timer
|
||||
if (ShadowShock_Timer <= diff)
|
||||
mob_shade_of_jindo()
|
||||
: CreatureScript("mob_shade_of_jindo")
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SHADOWSHOCK);
|
||||
ShadowShock_Timer = 2000;
|
||||
} else ShadowShock_Timer -= diff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
struct mob_shade_of_jindoAI : public ScriptedAI
|
||||
{
|
||||
mob_shade_of_jindoAI(Creature *c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 ShadowShock_Timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
ShadowShock_Timer = 1000;
|
||||
DoCast(me, SPELL_INVISIBLE, true);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/){}
|
||||
|
||||
void UpdateAI (const uint32 diff)
|
||||
{
|
||||
|
||||
//ShadowShock_Timer
|
||||
if (ShadowShock_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SHADOWSHOCK);
|
||||
ShadowShock_Timer = 2000;
|
||||
} else ShadowShock_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new mob_shade_of_jindoAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_jindo(Creature* pCreature)
|
||||
{
|
||||
return new boss_jindoAI (pCreature);
|
||||
}
|
||||
|
||||
CreatureAI* GetAI_mob_healing_ward(Creature* pCreature)
|
||||
{
|
||||
return new mob_healing_wardAI (pCreature);
|
||||
}
|
||||
|
||||
CreatureAI* GetAI_mob_shade_of_jindo(Creature* pCreature)
|
||||
{
|
||||
return new mob_shade_of_jindoAI (pCreature);
|
||||
}
|
||||
|
||||
void AddSC_boss_jindo()
|
||||
{
|
||||
Script *newscript;
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_jindo";
|
||||
newscript->GetAI = &GetAI_boss_jindo;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "mob_healing_ward";
|
||||
newscript->GetAI = &GetAI_mob_healing_ward;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "mob_shade_of_jindo";
|
||||
newscript->GetAI = &GetAI_mob_shade_of_jindo;
|
||||
newscript->RegisterSelf();
|
||||
new boss_jindo();
|
||||
new mob_healing_ward();
|
||||
new mob_shade_of_jindo();
|
||||
}
|
||||
|
||||
|
||||
@@ -44,292 +44,303 @@ EndScriptData */
|
||||
//Ohgans Spells
|
||||
#define SPELL_SUNDERARMOR 24317
|
||||
|
||||
struct boss_mandokirAI : public ScriptedAI
|
||||
class boss_mandokir : public CreatureScript
|
||||
{
|
||||
boss_mandokirAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
m_pInstance = c->GetInstanceData();
|
||||
}
|
||||
public:
|
||||
|
||||
uint32 KillCount;
|
||||
uint32 Watch_Timer;
|
||||
uint32 TargetInRange;
|
||||
uint32 Cleave_Timer;
|
||||
uint32 Whirlwind_Timer;
|
||||
uint32 Fear_Timer;
|
||||
uint32 MortalStrike_Timer;
|
||||
uint32 Check_Timer;
|
||||
float targetX;
|
||||
float targetY;
|
||||
float targetZ;
|
||||
|
||||
ScriptedInstance *m_pInstance;
|
||||
|
||||
bool endWatch;
|
||||
bool someWatched;
|
||||
bool RaptorDead;
|
||||
bool CombatStart;
|
||||
|
||||
uint64 WatchTarget;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
KillCount = 0;
|
||||
Watch_Timer = 33000;
|
||||
Cleave_Timer = 7000;
|
||||
Whirlwind_Timer = 20000;
|
||||
Fear_Timer = 1000;
|
||||
MortalStrike_Timer = 1000;
|
||||
Check_Timer = 1000;
|
||||
|
||||
targetX = 0.0;
|
||||
targetY = 0.0;
|
||||
targetZ = 0.0;
|
||||
TargetInRange = 0;
|
||||
|
||||
WatchTarget = 0;
|
||||
|
||||
someWatched = false;
|
||||
endWatch = false;
|
||||
RaptorDead = false;
|
||||
CombatStart = false;
|
||||
|
||||
DoCast(me, 23243);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim)
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
boss_mandokir()
|
||||
: CreatureScript("boss_mandokir")
|
||||
{
|
||||
++KillCount;
|
||||
|
||||
if (KillCount == 3)
|
||||
{
|
||||
DoScriptText(SAY_DING_KILL, me);
|
||||
|
||||
if (m_pInstance)
|
||||
{
|
||||
uint64 JindoGUID = m_pInstance->GetData64(DATA_JINDO);
|
||||
if (JindoGUID)
|
||||
{
|
||||
if (Unit* jTemp = Unit::GetUnit(*me,JindoGUID))
|
||||
{
|
||||
if (jTemp->isAlive())
|
||||
DoScriptText(SAY_GRATS_JINDO, jTemp);
|
||||
}
|
||||
}
|
||||
}
|
||||
DoCast(me, SPELL_LEVEL_UP, true);
|
||||
KillCount = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (me->getVictim() && me->isAlive())
|
||||
struct boss_mandokirAI : public ScriptedAI
|
||||
{
|
||||
if (!CombatStart)
|
||||
boss_mandokirAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
//At combat Start Mandokir is mounted so we must unmount it first
|
||||
me->Unmount();
|
||||
|
||||
//And summon his raptor
|
||||
me->SummonCreature(14988, me->getVictim()->GetPositionX(), me->getVictim()->GetPositionY(), me->getVictim()->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 35000);
|
||||
CombatStart = true;
|
||||
m_pInstance = c->GetInstanceData();
|
||||
}
|
||||
|
||||
if (Watch_Timer <= diff) //Every 20 Sec Mandokir will check this
|
||||
uint32 KillCount;
|
||||
uint32 Watch_Timer;
|
||||
uint32 TargetInRange;
|
||||
uint32 Cleave_Timer;
|
||||
uint32 Whirlwind_Timer;
|
||||
uint32 Fear_Timer;
|
||||
uint32 MortalStrike_Timer;
|
||||
uint32 Check_Timer;
|
||||
float targetX;
|
||||
float targetY;
|
||||
float targetZ;
|
||||
|
||||
ScriptedInstance *m_pInstance;
|
||||
|
||||
bool endWatch;
|
||||
bool someWatched;
|
||||
bool RaptorDead;
|
||||
bool CombatStart;
|
||||
|
||||
uint64 WatchTarget;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
if (WatchTarget) //If someone is watched and If the Position of the watched target is different from the one stored, or are attacking, mandokir will charge him
|
||||
{
|
||||
Unit* pUnit = Unit::GetUnit(*me, WatchTarget);
|
||||
|
||||
if (pUnit && (
|
||||
targetX != pUnit->GetPositionX() ||
|
||||
targetY != pUnit->GetPositionY() ||
|
||||
targetZ != pUnit->GetPositionZ() ||
|
||||
pUnit->isInCombat()))
|
||||
{
|
||||
if (me->IsWithinMeleeRange(pUnit))
|
||||
{
|
||||
DoCast(pUnit, 24316);
|
||||
}
|
||||
else
|
||||
{
|
||||
DoCast(pUnit, SPELL_CHARGE);
|
||||
//me->SendMonsterMove(pUnit->GetPositionX(), pUnit->GetPositionY(), pUnit->GetPositionZ(), 0, true,1);
|
||||
AttackStart(pUnit);
|
||||
}
|
||||
}
|
||||
}
|
||||
someWatched = false;
|
||||
Watch_Timer = 20000;
|
||||
} else Watch_Timer -= diff;
|
||||
|
||||
if ((Watch_Timer < 8000) && !someWatched) //8 sec(cast time + expire time) before the check for the watch effect mandokir will cast watch debuff on a random target
|
||||
{
|
||||
if (Unit* p = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
{
|
||||
DoScriptText(SAY_WATCH, me, p);
|
||||
DoCast(p, SPELL_WATCH);
|
||||
WatchTarget = p->GetGUID();
|
||||
someWatched = true;
|
||||
endWatch = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ((Watch_Timer < 1000) && endWatch) //1 sec before the debuf expire, store the target position
|
||||
{
|
||||
Unit* pUnit = Unit::GetUnit(*me, WatchTarget);
|
||||
if (pUnit)
|
||||
{
|
||||
targetX = pUnit->GetPositionX();
|
||||
targetY = pUnit->GetPositionY();
|
||||
targetZ = pUnit->GetPositionZ();
|
||||
}
|
||||
endWatch = false;
|
||||
}
|
||||
|
||||
if (!someWatched)
|
||||
{
|
||||
//Cleave
|
||||
if (Cleave_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_CLEAVE);
|
||||
Cleave_Timer = 7000;
|
||||
} else Cleave_Timer -= diff;
|
||||
|
||||
//Whirlwind
|
||||
if (Whirlwind_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_WHIRLWIND);
|
||||
Whirlwind_Timer = 18000;
|
||||
} else Whirlwind_Timer -= diff;
|
||||
|
||||
//If more then 3 targets in melee range mandokir will cast fear
|
||||
if (Fear_Timer <= diff)
|
||||
{
|
||||
TargetInRange = 0;
|
||||
|
||||
std::list<HostileReference*>::const_iterator i = me->getThreatManager().getThreatList().begin();
|
||||
for (; i != me->getThreatManager().getThreatList().end(); ++i)
|
||||
{
|
||||
Unit* pUnit = Unit::GetUnit(*me, (*i)->getUnitGuid());
|
||||
if (pUnit && me->IsWithinMeleeRange(pUnit))
|
||||
++TargetInRange;
|
||||
}
|
||||
|
||||
if (TargetInRange > 3)
|
||||
DoCast(me->getVictim(), SPELL_FEAR);
|
||||
|
||||
Fear_Timer = 4000;
|
||||
} else Fear_Timer -=diff;
|
||||
|
||||
//Mortal Strike if target below 50% hp
|
||||
if (me->getVictim() && me->getVictim()->GetHealth() < me->getVictim()->GetMaxHealth()*0.5)
|
||||
{
|
||||
if (MortalStrike_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_MORTAL_STRIKE);
|
||||
MortalStrike_Timer = 15000;
|
||||
} else MortalStrike_Timer -= diff;
|
||||
}
|
||||
}
|
||||
//Checking if Ohgan is dead. If yes Mandokir will enrage.
|
||||
if (Check_Timer <= diff)
|
||||
{
|
||||
if (m_pInstance)
|
||||
{
|
||||
if (m_pInstance->GetData(TYPE_OHGAN) == DONE)
|
||||
{
|
||||
if (!RaptorDead)
|
||||
{
|
||||
DoCast(me, SPELL_ENRAGE);
|
||||
RaptorDead = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
KillCount = 0;
|
||||
Watch_Timer = 33000;
|
||||
Cleave_Timer = 7000;
|
||||
Whirlwind_Timer = 20000;
|
||||
Fear_Timer = 1000;
|
||||
MortalStrike_Timer = 1000;
|
||||
Check_Timer = 1000;
|
||||
} else Check_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
targetX = 0.0;
|
||||
targetY = 0.0;
|
||||
targetZ = 0.0;
|
||||
TargetInRange = 0;
|
||||
|
||||
WatchTarget = 0;
|
||||
|
||||
someWatched = false;
|
||||
endWatch = false;
|
||||
RaptorDead = false;
|
||||
CombatStart = false;
|
||||
|
||||
DoCast(me, 23243);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim)
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
++KillCount;
|
||||
|
||||
if (KillCount == 3)
|
||||
{
|
||||
DoScriptText(SAY_DING_KILL, me);
|
||||
|
||||
if (m_pInstance)
|
||||
{
|
||||
uint64 JindoGUID = m_pInstance->GetData64(DATA_JINDO);
|
||||
if (JindoGUID)
|
||||
{
|
||||
if (Unit* jTemp = Unit::GetUnit(*me,JindoGUID))
|
||||
{
|
||||
if (jTemp->isAlive())
|
||||
DoScriptText(SAY_GRATS_JINDO, jTemp);
|
||||
}
|
||||
}
|
||||
}
|
||||
DoCast(me, SPELL_LEVEL_UP, true);
|
||||
KillCount = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (me->getVictim() && me->isAlive())
|
||||
{
|
||||
if (!CombatStart)
|
||||
{
|
||||
//At combat Start Mandokir is mounted so we must unmount it first
|
||||
me->Unmount();
|
||||
|
||||
//And summon his raptor
|
||||
me->SummonCreature(14988, me->getVictim()->GetPositionX(), me->getVictim()->GetPositionY(), me->getVictim()->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 35000);
|
||||
CombatStart = true;
|
||||
}
|
||||
|
||||
if (Watch_Timer <= diff) //Every 20 Sec Mandokir will check this
|
||||
{
|
||||
if (WatchTarget) //If someone is watched and If the Position of the watched target is different from the one stored, or are attacking, mandokir will charge him
|
||||
{
|
||||
Unit* pUnit = Unit::GetUnit(*me, WatchTarget);
|
||||
|
||||
if (pUnit && (
|
||||
targetX != pUnit->GetPositionX() ||
|
||||
targetY != pUnit->GetPositionY() ||
|
||||
targetZ != pUnit->GetPositionZ() ||
|
||||
pUnit->isInCombat()))
|
||||
{
|
||||
if (me->IsWithinMeleeRange(pUnit))
|
||||
{
|
||||
DoCast(pUnit, 24316);
|
||||
}
|
||||
else
|
||||
{
|
||||
DoCast(pUnit, SPELL_CHARGE);
|
||||
//me->SendMonsterMove(pUnit->GetPositionX(), pUnit->GetPositionY(), pUnit->GetPositionZ(), 0, true,1);
|
||||
AttackStart(pUnit);
|
||||
}
|
||||
}
|
||||
}
|
||||
someWatched = false;
|
||||
Watch_Timer = 20000;
|
||||
} else Watch_Timer -= diff;
|
||||
|
||||
if ((Watch_Timer < 8000) && !someWatched) //8 sec(cast time + expire time) before the check for the watch effect mandokir will cast watch debuff on a random target
|
||||
{
|
||||
if (Unit* p = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
{
|
||||
DoScriptText(SAY_WATCH, me, p);
|
||||
DoCast(p, SPELL_WATCH);
|
||||
WatchTarget = p->GetGUID();
|
||||
someWatched = true;
|
||||
endWatch = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ((Watch_Timer < 1000) && endWatch) //1 sec before the debuf expire, store the target position
|
||||
{
|
||||
Unit* pUnit = Unit::GetUnit(*me, WatchTarget);
|
||||
if (pUnit)
|
||||
{
|
||||
targetX = pUnit->GetPositionX();
|
||||
targetY = pUnit->GetPositionY();
|
||||
targetZ = pUnit->GetPositionZ();
|
||||
}
|
||||
endWatch = false;
|
||||
}
|
||||
|
||||
if (!someWatched)
|
||||
{
|
||||
//Cleave
|
||||
if (Cleave_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_CLEAVE);
|
||||
Cleave_Timer = 7000;
|
||||
} else Cleave_Timer -= diff;
|
||||
|
||||
//Whirlwind
|
||||
if (Whirlwind_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_WHIRLWIND);
|
||||
Whirlwind_Timer = 18000;
|
||||
} else Whirlwind_Timer -= diff;
|
||||
|
||||
//If more then 3 targets in melee range mandokir will cast fear
|
||||
if (Fear_Timer <= diff)
|
||||
{
|
||||
TargetInRange = 0;
|
||||
|
||||
std::list<HostileReference*>::const_iterator i = me->getThreatManager().getThreatList().begin();
|
||||
for (; i != me->getThreatManager().getThreatList().end(); ++i)
|
||||
{
|
||||
Unit* pUnit = Unit::GetUnit(*me, (*i)->getUnitGuid());
|
||||
if (pUnit && me->IsWithinMeleeRange(pUnit))
|
||||
++TargetInRange;
|
||||
}
|
||||
|
||||
if (TargetInRange > 3)
|
||||
DoCast(me->getVictim(), SPELL_FEAR);
|
||||
|
||||
Fear_Timer = 4000;
|
||||
} else Fear_Timer -=diff;
|
||||
|
||||
//Mortal Strike if target below 50% hp
|
||||
if (me->getVictim() && me->getVictim()->GetHealth() < me->getVictim()->GetMaxHealth()*0.5)
|
||||
{
|
||||
if (MortalStrike_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_MORTAL_STRIKE);
|
||||
MortalStrike_Timer = 15000;
|
||||
} else MortalStrike_Timer -= diff;
|
||||
}
|
||||
}
|
||||
//Checking if Ohgan is dead. If yes Mandokir will enrage.
|
||||
if (Check_Timer <= diff)
|
||||
{
|
||||
if (m_pInstance)
|
||||
{
|
||||
if (m_pInstance->GetData(TYPE_OHGAN) == DONE)
|
||||
{
|
||||
if (!RaptorDead)
|
||||
{
|
||||
DoCast(me, SPELL_ENRAGE);
|
||||
RaptorDead = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Check_Timer = 1000;
|
||||
} else Check_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_mandokirAI(creature);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//Ohgan
|
||||
struct mob_ohganAI : public ScriptedAI
|
||||
class mob_ohgan : public CreatureScript
|
||||
{
|
||||
mob_ohganAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
m_pInstance = c->GetInstanceData();
|
||||
}
|
||||
public:
|
||||
|
||||
uint32 SunderArmor_Timer;
|
||||
ScriptedInstance *m_pInstance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
SunderArmor_Timer = 5000;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/) {}
|
||||
|
||||
void JustDied(Unit* /*Killer*/)
|
||||
{
|
||||
if (m_pInstance)
|
||||
m_pInstance->SetData(TYPE_OHGAN, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI (const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//SunderArmor_Timer
|
||||
if (SunderArmor_Timer <= diff)
|
||||
mob_ohgan()
|
||||
: CreatureScript("mob_ohgan")
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SUNDERARMOR);
|
||||
SunderArmor_Timer = 10000 + rand()%5000;
|
||||
} else SunderArmor_Timer -= diff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
struct mob_ohganAI : public ScriptedAI
|
||||
{
|
||||
mob_ohganAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
m_pInstance = c->GetInstanceData();
|
||||
}
|
||||
|
||||
uint32 SunderArmor_Timer;
|
||||
ScriptedInstance *m_pInstance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
SunderArmor_Timer = 5000;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/) {}
|
||||
|
||||
void JustDied(Unit* /*Killer*/)
|
||||
{
|
||||
if (m_pInstance)
|
||||
m_pInstance->SetData(TYPE_OHGAN, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI (const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//SunderArmor_Timer
|
||||
if (SunderArmor_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SUNDERARMOR);
|
||||
SunderArmor_Timer = 10000 + rand()%5000;
|
||||
} else SunderArmor_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new mob_ohganAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_mandokir(Creature* pCreature)
|
||||
{
|
||||
return new boss_mandokirAI (pCreature);
|
||||
}
|
||||
|
||||
CreatureAI* GetAI_mob_ohgan(Creature* pCreature)
|
||||
{
|
||||
return new mob_ohganAI (pCreature);
|
||||
}
|
||||
|
||||
void AddSC_boss_mandokir()
|
||||
{
|
||||
Script *newscript;
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_mandokir";
|
||||
newscript->GetAI = &GetAI_boss_mandokir;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "mob_ohgan";
|
||||
newscript->GetAI = &GetAI_mob_ohgan;
|
||||
newscript->RegisterSelf();
|
||||
new boss_mandokir();
|
||||
new mob_ohgan();
|
||||
}
|
||||
|
||||
|
||||
@@ -40,224 +40,236 @@ EndScriptData */
|
||||
//The Spider Spells
|
||||
#define SPELL_LEVELUP 24312 //Not right Spell.
|
||||
|
||||
struct boss_marliAI : public ScriptedAI
|
||||
class boss_marli : public CreatureScript
|
||||
{
|
||||
boss_marliAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
m_pInstance = c->GetInstanceData();
|
||||
}
|
||||
public:
|
||||
|
||||
ScriptedInstance *m_pInstance;
|
||||
|
||||
uint32 SpawnStartSpiders_Timer;
|
||||
uint32 PoisonVolley_Timer;
|
||||
uint32 SpawnSpider_Timer;
|
||||
uint32 Charge_Timer;
|
||||
uint32 Aspect_Timer;
|
||||
uint32 Transform_Timer;
|
||||
uint32 TransformBack_Timer;
|
||||
|
||||
bool Spawned;
|
||||
bool PhaseTwo;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
SpawnStartSpiders_Timer = 1000;
|
||||
PoisonVolley_Timer = 15000;
|
||||
SpawnSpider_Timer = 30000;
|
||||
Charge_Timer = 1500;
|
||||
Aspect_Timer = 12000;
|
||||
Transform_Timer = 45000;
|
||||
TransformBack_Timer = 25000;
|
||||
|
||||
Spawned = false;
|
||||
PhaseTwo = false;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*Killer*/)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
if (m_pInstance)
|
||||
m_pInstance->SetData(TYPE_MARLI, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (me->getVictim() && me->isAlive())
|
||||
boss_marli()
|
||||
: CreatureScript("boss_marli")
|
||||
{
|
||||
if (PoisonVolley_Timer <= diff)
|
||||
}
|
||||
|
||||
struct boss_marliAI : public ScriptedAI
|
||||
{
|
||||
boss_marliAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_POISONVOLLEY);
|
||||
PoisonVolley_Timer = 10000 + rand()%10000;
|
||||
} else PoisonVolley_Timer -= diff;
|
||||
|
||||
if (!PhaseTwo && Aspect_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_ASPECT_OF_MARLI);
|
||||
Aspect_Timer = 13000 + rand()%5000;
|
||||
} else Aspect_Timer -= diff;
|
||||
|
||||
if (!Spawned && SpawnStartSpiders_Timer <= diff)
|
||||
{
|
||||
DoScriptText(SAY_SPIDER_SPAWN, me);
|
||||
|
||||
Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||
if (!pTarget)
|
||||
return;
|
||||
|
||||
Creature *Spider = NULL;
|
||||
|
||||
Spider = me->SummonCreature(15041,pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(),0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Spider)
|
||||
Spider->AI()->AttackStart(pTarget);
|
||||
Spider = me->SummonCreature(15041,pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(),0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Spider)
|
||||
Spider->AI()->AttackStart(pTarget);
|
||||
Spider = me->SummonCreature(15041,pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(),0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Spider)
|
||||
Spider->AI()->AttackStart(pTarget);
|
||||
Spider = me->SummonCreature(15041,pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(),0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Spider)
|
||||
Spider->AI()->AttackStart(pTarget);
|
||||
|
||||
Spawned = true;
|
||||
} else SpawnStartSpiders_Timer -= diff;
|
||||
|
||||
if (SpawnSpider_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||
if (!pTarget)
|
||||
return;
|
||||
|
||||
Creature *Spider = me->SummonCreature(15041,pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(),0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Spider)
|
||||
Spider->AI()->AttackStart(pTarget);
|
||||
SpawnSpider_Timer = 12000 + rand()%5000;
|
||||
} else SpawnSpider_Timer -= diff;
|
||||
|
||||
if (!PhaseTwo && Transform_Timer <= diff)
|
||||
{
|
||||
DoScriptText(SAY_TRANSFORM, me);
|
||||
DoCast(me, SPELL_SPIDER_FORM);
|
||||
const CreatureInfo *cinfo = me->GetCreatureInfo();
|
||||
me->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 35)));
|
||||
me->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 35)));
|
||||
me->UpdateDamagePhysical(BASE_ATTACK);
|
||||
DoCast(me->getVictim(), SPELL_ENVOLWINGWEB);
|
||||
|
||||
if (DoGetThreat(me->getVictim()))
|
||||
DoModifyThreatPercent(me->getVictim(),-100);
|
||||
|
||||
PhaseTwo = true;
|
||||
Transform_Timer = urand(35000,60000);
|
||||
} else Transform_Timer -= diff;
|
||||
|
||||
if (PhaseTwo)
|
||||
{
|
||||
if (Charge_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
int i = 0;
|
||||
while (i < 3) // max 3 tries to get a random target with power_mana
|
||||
{
|
||||
++i;
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM,1, 100, true); // not aggro leader
|
||||
if (pTarget && pTarget->getPowerType() == POWER_MANA)
|
||||
i = 3;
|
||||
}
|
||||
if (pTarget)
|
||||
{
|
||||
DoCast(pTarget, SPELL_CHARGE);
|
||||
//me->GetMap()->CreatureRelocation(me, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0);
|
||||
//me->SendMonsterMove(pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, true,1);
|
||||
AttackStart(pTarget);
|
||||
}
|
||||
|
||||
Charge_Timer = 8000;
|
||||
} else Charge_Timer -= diff;
|
||||
|
||||
if (TransformBack_Timer <= diff)
|
||||
{
|
||||
me->SetDisplayId(15220);
|
||||
const CreatureInfo *cinfo = me->GetCreatureInfo();
|
||||
me->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 1)));
|
||||
me->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 1)));
|
||||
me->UpdateDamagePhysical(BASE_ATTACK);
|
||||
|
||||
PhaseTwo = false;
|
||||
TransformBack_Timer = urand(25000,40000);
|
||||
} else TransformBack_Timer -= diff;
|
||||
|
||||
m_pInstance = c->GetInstanceData();
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
ScriptedInstance *m_pInstance;
|
||||
|
||||
uint32 SpawnStartSpiders_Timer;
|
||||
uint32 PoisonVolley_Timer;
|
||||
uint32 SpawnSpider_Timer;
|
||||
uint32 Charge_Timer;
|
||||
uint32 Aspect_Timer;
|
||||
uint32 Transform_Timer;
|
||||
uint32 TransformBack_Timer;
|
||||
|
||||
bool Spawned;
|
||||
bool PhaseTwo;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
SpawnStartSpiders_Timer = 1000;
|
||||
PoisonVolley_Timer = 15000;
|
||||
SpawnSpider_Timer = 30000;
|
||||
Charge_Timer = 1500;
|
||||
Aspect_Timer = 12000;
|
||||
Transform_Timer = 45000;
|
||||
TransformBack_Timer = 25000;
|
||||
|
||||
Spawned = false;
|
||||
PhaseTwo = false;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*Killer*/)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
if (m_pInstance)
|
||||
m_pInstance->SetData(TYPE_MARLI, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (me->getVictim() && me->isAlive())
|
||||
{
|
||||
if (PoisonVolley_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_POISONVOLLEY);
|
||||
PoisonVolley_Timer = 10000 + rand()%10000;
|
||||
} else PoisonVolley_Timer -= diff;
|
||||
|
||||
if (!PhaseTwo && Aspect_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_ASPECT_OF_MARLI);
|
||||
Aspect_Timer = 13000 + rand()%5000;
|
||||
} else Aspect_Timer -= diff;
|
||||
|
||||
if (!Spawned && SpawnStartSpiders_Timer <= diff)
|
||||
{
|
||||
DoScriptText(SAY_SPIDER_SPAWN, me);
|
||||
|
||||
Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||
if (!pTarget)
|
||||
return;
|
||||
|
||||
Creature *Spider = NULL;
|
||||
|
||||
Spider = me->SummonCreature(15041,pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(),0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Spider)
|
||||
Spider->AI()->AttackStart(pTarget);
|
||||
Spider = me->SummonCreature(15041,pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(),0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Spider)
|
||||
Spider->AI()->AttackStart(pTarget);
|
||||
Spider = me->SummonCreature(15041,pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(),0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Spider)
|
||||
Spider->AI()->AttackStart(pTarget);
|
||||
Spider = me->SummonCreature(15041,pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(),0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Spider)
|
||||
Spider->AI()->AttackStart(pTarget);
|
||||
|
||||
Spawned = true;
|
||||
} else SpawnStartSpiders_Timer -= diff;
|
||||
|
||||
if (SpawnSpider_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||
if (!pTarget)
|
||||
return;
|
||||
|
||||
Creature *Spider = me->SummonCreature(15041,pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(),0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Spider)
|
||||
Spider->AI()->AttackStart(pTarget);
|
||||
SpawnSpider_Timer = 12000 + rand()%5000;
|
||||
} else SpawnSpider_Timer -= diff;
|
||||
|
||||
if (!PhaseTwo && Transform_Timer <= diff)
|
||||
{
|
||||
DoScriptText(SAY_TRANSFORM, me);
|
||||
DoCast(me, SPELL_SPIDER_FORM);
|
||||
const CreatureInfo *cinfo = me->GetCreatureInfo();
|
||||
me->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 35)));
|
||||
me->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 35)));
|
||||
me->UpdateDamagePhysical(BASE_ATTACK);
|
||||
DoCast(me->getVictim(), SPELL_ENVOLWINGWEB);
|
||||
|
||||
if (DoGetThreat(me->getVictim()))
|
||||
DoModifyThreatPercent(me->getVictim(),-100);
|
||||
|
||||
PhaseTwo = true;
|
||||
Transform_Timer = urand(35000,60000);
|
||||
} else Transform_Timer -= diff;
|
||||
|
||||
if (PhaseTwo)
|
||||
{
|
||||
if (Charge_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
int i = 0;
|
||||
while (i < 3) // max 3 tries to get a random target with power_mana
|
||||
{
|
||||
++i;
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM,1, 100, true); // not aggro leader
|
||||
if (pTarget && pTarget->getPowerType() == POWER_MANA)
|
||||
i = 3;
|
||||
}
|
||||
if (pTarget)
|
||||
{
|
||||
DoCast(pTarget, SPELL_CHARGE);
|
||||
//me->GetMap()->CreatureRelocation(me, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0);
|
||||
//me->SendMonsterMove(pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, true,1);
|
||||
AttackStart(pTarget);
|
||||
}
|
||||
|
||||
Charge_Timer = 8000;
|
||||
} else Charge_Timer -= diff;
|
||||
|
||||
if (TransformBack_Timer <= diff)
|
||||
{
|
||||
me->SetDisplayId(15220);
|
||||
const CreatureInfo *cinfo = me->GetCreatureInfo();
|
||||
me->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 1)));
|
||||
me->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 1)));
|
||||
me->UpdateDamagePhysical(BASE_ATTACK);
|
||||
|
||||
PhaseTwo = false;
|
||||
TransformBack_Timer = urand(25000,40000);
|
||||
} else TransformBack_Timer -= diff;
|
||||
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new example_creatureAI(creature);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//Spawn of Marli
|
||||
struct mob_spawn_of_marliAI : public ScriptedAI
|
||||
class mob_spawn_of_marli : public CreatureScript
|
||||
{
|
||||
mob_spawn_of_marliAI(Creature *c) : ScriptedAI(c) {}
|
||||
public:
|
||||
|
||||
uint32 LevelUp_Timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
LevelUp_Timer = 3000;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI (const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//LevelUp_Timer
|
||||
if (LevelUp_Timer <= diff)
|
||||
mob_spawn_of_marli()
|
||||
: CreatureScript("mob_spawn_of_marli")
|
||||
{
|
||||
DoCast(me, SPELL_LEVELUP);
|
||||
LevelUp_Timer = 3000;
|
||||
} else LevelUp_Timer -= diff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
struct mob_spawn_of_marliAI : public ScriptedAI
|
||||
{
|
||||
mob_spawn_of_marliAI(Creature *c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 LevelUp_Timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
LevelUp_Timer = 3000;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI (const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//LevelUp_Timer
|
||||
if (LevelUp_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_LEVELUP);
|
||||
LevelUp_Timer = 3000;
|
||||
} else LevelUp_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new mob_spawn_of_marliAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_marli(Creature* pCreature)
|
||||
{
|
||||
return new boss_marliAI (pCreature);
|
||||
}
|
||||
|
||||
CreatureAI* GetAI_mob_spawn_of_marli(Creature* pCreature)
|
||||
{
|
||||
return new mob_spawn_of_marliAI (pCreature);
|
||||
}
|
||||
|
||||
void AddSC_boss_marli()
|
||||
{
|
||||
Script *newscript;
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_marli";
|
||||
newscript->GetAI = &GetAI_boss_marli;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "mob_spawn_of_marli";
|
||||
newscript->GetAI = &GetAI_mob_spawn_of_marli;
|
||||
newscript->RegisterSelf();
|
||||
new boss_marli();
|
||||
new mob_spawn_of_marli();
|
||||
}
|
||||
|
||||
|
||||
@@ -31,124 +31,131 @@ EndScriptData */
|
||||
|
||||
#define EQUIP_ID_MAIN_HAND 0 //was item display id 31818, but this id does not exist
|
||||
|
||||
struct boss_renatakiAI : public ScriptedAI
|
||||
class boss_renataki : public CreatureScript
|
||||
{
|
||||
boss_renatakiAI(Creature *c) : ScriptedAI(c) {}
|
||||
public:
|
||||
|
||||
uint32 Invisible_Timer;
|
||||
uint32 Ambush_Timer;
|
||||
uint32 Visible_Timer;
|
||||
uint32 Aggro_Timer;
|
||||
uint32 ThousandBlades_Timer;
|
||||
|
||||
bool Invisible;
|
||||
bool Ambushed;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
Invisible_Timer = 8000 + rand()%10000;
|
||||
Ambush_Timer = 3000;
|
||||
Visible_Timer = 4000;
|
||||
Aggro_Timer = 15000 + rand()%10000;
|
||||
ThousandBlades_Timer = 4000 + rand()%4000;
|
||||
|
||||
Invisible = false;
|
||||
Ambushed = false;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//Invisible_Timer
|
||||
if (Invisible_Timer <= diff)
|
||||
boss_renataki()
|
||||
: CreatureScript("boss_renataki")
|
||||
{
|
||||
me->InterruptSpell(CURRENT_GENERIC_SPELL);
|
||||
}
|
||||
|
||||
SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE);
|
||||
me->SetDisplayId(11686);
|
||||
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
Invisible = true;
|
||||
|
||||
Invisible_Timer = 15000 + rand()%15000;
|
||||
} else Invisible_Timer -= diff;
|
||||
|
||||
if (Invisible)
|
||||
struct boss_renatakiAI : public ScriptedAI
|
||||
{
|
||||
if (Ambush_Timer <= diff)
|
||||
boss_renatakiAI(Creature *c) : ScriptedAI(c) {}
|
||||
|
||||
uint32 Invisible_Timer;
|
||||
uint32 Ambush_Timer;
|
||||
uint32 Visible_Timer;
|
||||
uint32 Aggro_Timer;
|
||||
uint32 ThousandBlades_Timer;
|
||||
|
||||
bool Invisible;
|
||||
bool Ambushed;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||
if (pTarget)
|
||||
Invisible_Timer = 8000 + rand()%10000;
|
||||
Ambush_Timer = 3000;
|
||||
Visible_Timer = 4000;
|
||||
Aggro_Timer = 15000 + rand()%10000;
|
||||
ThousandBlades_Timer = 4000 + rand()%4000;
|
||||
|
||||
Invisible = false;
|
||||
Ambushed = false;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//Invisible_Timer
|
||||
if (Invisible_Timer <= diff)
|
||||
{
|
||||
DoTeleportTo(pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ());
|
||||
DoCast(pTarget, SPELL_AMBUSH);
|
||||
me->InterruptSpell(CURRENT_GENERIC_SPELL);
|
||||
|
||||
SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE);
|
||||
me->SetDisplayId(11686);
|
||||
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
Invisible = true;
|
||||
|
||||
Invisible_Timer = 15000 + rand()%15000;
|
||||
} else Invisible_Timer -= diff;
|
||||
|
||||
if (Invisible)
|
||||
{
|
||||
if (Ambush_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||
if (pTarget)
|
||||
{
|
||||
DoTeleportTo(pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ());
|
||||
DoCast(pTarget, SPELL_AMBUSH);
|
||||
}
|
||||
|
||||
Ambushed = true;
|
||||
Ambush_Timer = 3000;
|
||||
} else Ambush_Timer -= diff;
|
||||
}
|
||||
|
||||
Ambushed = true;
|
||||
Ambush_Timer = 3000;
|
||||
} else Ambush_Timer -= diff;
|
||||
if (Ambushed)
|
||||
{
|
||||
if (Visible_Timer <= diff)
|
||||
{
|
||||
me->InterruptSpell(CURRENT_GENERIC_SPELL);
|
||||
|
||||
me->SetDisplayId(15268);
|
||||
SetEquipmentSlots(false, EQUIP_ID_MAIN_HAND, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE);
|
||||
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
Invisible = false;
|
||||
|
||||
Visible_Timer = 4000;
|
||||
} else Visible_Timer -= diff;
|
||||
}
|
||||
|
||||
//Resetting some aggro so he attacks other gamers
|
||||
if (!Invisible)
|
||||
if (Aggro_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
pTarget = SelectUnit(SELECT_TARGET_RANDOM,1);
|
||||
|
||||
if (DoGetThreat(me->getVictim()))
|
||||
DoModifyThreatPercent(me->getVictim(),-50);
|
||||
|
||||
if (pTarget)
|
||||
AttackStart(pTarget);
|
||||
|
||||
Aggro_Timer = 7000 + rand()%13000;
|
||||
} else Aggro_Timer -= diff;
|
||||
|
||||
if (!Invisible)
|
||||
if (ThousandBlades_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_THOUSANDBLADES);
|
||||
ThousandBlades_Timer = 7000 + rand()%5000;
|
||||
} else ThousandBlades_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_renatakiAI(creature);
|
||||
}
|
||||
|
||||
if (Ambushed)
|
||||
{
|
||||
if (Visible_Timer <= diff)
|
||||
{
|
||||
me->InterruptSpell(CURRENT_GENERIC_SPELL);
|
||||
|
||||
me->SetDisplayId(15268);
|
||||
SetEquipmentSlots(false, EQUIP_ID_MAIN_HAND, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE);
|
||||
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
Invisible = false;
|
||||
|
||||
Visible_Timer = 4000;
|
||||
} else Visible_Timer -= diff;
|
||||
}
|
||||
|
||||
//Resetting some aggro so he attacks other gamers
|
||||
if (!Invisible)
|
||||
if (Aggro_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
pTarget = SelectUnit(SELECT_TARGET_RANDOM,1);
|
||||
|
||||
if (DoGetThreat(me->getVictim()))
|
||||
DoModifyThreatPercent(me->getVictim(),-50);
|
||||
|
||||
if (pTarget)
|
||||
AttackStart(pTarget);
|
||||
|
||||
Aggro_Timer = 7000 + rand()%13000;
|
||||
} else Aggro_Timer -= diff;
|
||||
|
||||
if (!Invisible)
|
||||
if (ThousandBlades_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_THOUSANDBLADES);
|
||||
ThousandBlades_Timer = 7000 + rand()%5000;
|
||||
} else ThousandBlades_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
CreatureAI* GetAI_boss_renataki(Creature* pCreature)
|
||||
{
|
||||
return new boss_renatakiAI (pCreature);
|
||||
}
|
||||
|
||||
void AddSC_boss_renataki()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_renataki";
|
||||
newscript->GetAI = &GetAI_boss_renataki;
|
||||
newscript->RegisterSelf();
|
||||
new boss_renataki();
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -39,163 +39,169 @@ EndScriptData */
|
||||
#define SPELL_BERSERK 23537
|
||||
#define SPELL_DISPELL 23859
|
||||
|
||||
struct boss_venoxisAI : public ScriptedAI
|
||||
class boss_venoxis : public CreatureScript
|
||||
{
|
||||
boss_venoxisAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
m_pInstance = c->GetInstanceData();
|
||||
}
|
||||
public:
|
||||
|
||||
ScriptedInstance *m_pInstance;
|
||||
boss_venoxis()
|
||||
: CreatureScript("boss_venoxis")
|
||||
{
|
||||
}
|
||||
|
||||
uint32 HolyFire_Timer;
|
||||
uint32 HolyWrath_Timer;
|
||||
uint32 VenomSpit_Timer;
|
||||
uint32 Renew_Timer;
|
||||
uint32 PoisonCloud_Timer;
|
||||
uint32 HolyNova_Timer;
|
||||
uint32 Dispell_Timer;
|
||||
uint32 TargetInRange;
|
||||
|
||||
bool PhaseTwo;
|
||||
bool InBerserk;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
HolyFire_Timer = 10000;
|
||||
HolyWrath_Timer = 60500;
|
||||
VenomSpit_Timer = 5500;
|
||||
Renew_Timer = 30500;
|
||||
PoisonCloud_Timer = 2000;
|
||||
HolyNova_Timer = 5000;
|
||||
Dispell_Timer = 35000;
|
||||
TargetInRange = 0;
|
||||
|
||||
PhaseTwo = false;
|
||||
InBerserk= false;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*Killer*/)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
if (m_pInstance)
|
||||
m_pInstance->SetData(TYPE_VENOXIS, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if ((me->GetHealth()*100 / me->GetMaxHealth() > 50))
|
||||
struct boss_venoxisAI : public ScriptedAI
|
||||
{
|
||||
boss_venoxisAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
if (Dispell_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_DISPELL);
|
||||
Dispell_Timer = 15000 + rand()%15000;
|
||||
} else Dispell_Timer -= diff;
|
||||
m_pInstance = c->GetInstanceData();
|
||||
}
|
||||
|
||||
if (Renew_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_RENEW);
|
||||
Renew_Timer = 20000 + rand()%10000;
|
||||
} else Renew_Timer -= diff;
|
||||
ScriptedInstance *m_pInstance;
|
||||
|
||||
if (HolyWrath_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_HOLY_WRATH);
|
||||
HolyWrath_Timer = 15000 + rand()%10000;
|
||||
} else HolyWrath_Timer -= diff;
|
||||
uint32 HolyFire_Timer;
|
||||
uint32 HolyWrath_Timer;
|
||||
uint32 VenomSpit_Timer;
|
||||
uint32 Renew_Timer;
|
||||
uint32 PoisonCloud_Timer;
|
||||
uint32 HolyNova_Timer;
|
||||
uint32 Dispell_Timer;
|
||||
uint32 TargetInRange;
|
||||
|
||||
if (HolyNova_Timer <= diff)
|
||||
{
|
||||
TargetInRange = 0;
|
||||
for (uint8 i = 0; i < 10; ++i)
|
||||
bool PhaseTwo;
|
||||
bool InBerserk;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
HolyFire_Timer = 10000;
|
||||
HolyWrath_Timer = 60500;
|
||||
VenomSpit_Timer = 5500;
|
||||
Renew_Timer = 30500;
|
||||
PoisonCloud_Timer = 2000;
|
||||
HolyNova_Timer = 5000;
|
||||
Dispell_Timer = 35000;
|
||||
TargetInRange = 0;
|
||||
|
||||
PhaseTwo = false;
|
||||
InBerserk= false;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*Killer*/)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
if (m_pInstance)
|
||||
m_pInstance->SetData(TYPE_VENOXIS, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if ((me->GetHealth()*100 / me->GetMaxHealth() > 50))
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_TOPAGGRO,i))
|
||||
if (me->IsWithinMeleeRange(pTarget))
|
||||
++TargetInRange;
|
||||
}
|
||||
if (Dispell_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_DISPELL);
|
||||
Dispell_Timer = 15000 + rand()%15000;
|
||||
} else Dispell_Timer -= diff;
|
||||
|
||||
if (TargetInRange > 1)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_HOLY_NOVA);
|
||||
HolyNova_Timer = 1000;
|
||||
if (Renew_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_RENEW);
|
||||
Renew_Timer = 20000 + rand()%10000;
|
||||
} else Renew_Timer -= diff;
|
||||
|
||||
if (HolyWrath_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_HOLY_WRATH);
|
||||
HolyWrath_Timer = 15000 + rand()%10000;
|
||||
} else HolyWrath_Timer -= diff;
|
||||
|
||||
if (HolyNova_Timer <= diff)
|
||||
{
|
||||
TargetInRange = 0;
|
||||
for (uint8 i = 0; i < 10; ++i)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_TOPAGGRO,i))
|
||||
if (me->IsWithinMeleeRange(pTarget))
|
||||
++TargetInRange;
|
||||
}
|
||||
|
||||
if (TargetInRange > 1)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_HOLY_NOVA);
|
||||
HolyNova_Timer = 1000;
|
||||
}
|
||||
else
|
||||
{
|
||||
HolyNova_Timer = 2000;
|
||||
}
|
||||
|
||||
} else HolyNova_Timer -= diff;
|
||||
|
||||
if (HolyFire_Timer < diff && TargetInRange < 3)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget, SPELL_HOLY_FIRE);
|
||||
|
||||
HolyFire_Timer = 8000;
|
||||
} else HolyFire_Timer -= diff;
|
||||
}
|
||||
else
|
||||
{
|
||||
HolyNova_Timer = 2000;
|
||||
if (!PhaseTwo)
|
||||
{
|
||||
DoScriptText(SAY_TRANSFORM, me);
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
DoCast(me, SPELL_SNAKE_FORM);
|
||||
me->SetFloatValue(OBJECT_FIELD_SCALE_X, 2.00f);
|
||||
const CreatureInfo *cinfo = me->GetCreatureInfo();
|
||||
me->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 25)));
|
||||
me->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 25)));
|
||||
me->UpdateDamagePhysical(BASE_ATTACK);
|
||||
DoResetThreat();
|
||||
PhaseTwo = true;
|
||||
}
|
||||
|
||||
if (PhaseTwo && PoisonCloud_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_POISON_CLOUD);
|
||||
PoisonCloud_Timer = 15000;
|
||||
}PoisonCloud_Timer -=diff;
|
||||
|
||||
if (PhaseTwo && VenomSpit_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget, SPELL_VENOMSPIT);
|
||||
|
||||
VenomSpit_Timer = 15000 + rand()%5000;
|
||||
} else VenomSpit_Timer -= diff;
|
||||
|
||||
if (PhaseTwo && (me->GetHealth()*100 / me->GetMaxHealth() < 11))
|
||||
{
|
||||
if (!InBerserk)
|
||||
{
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
DoCast(me, SPELL_BERSERK);
|
||||
InBerserk = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else HolyNova_Timer -= diff;
|
||||
|
||||
if (HolyFire_Timer < diff && TargetInRange < 3)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget, SPELL_HOLY_FIRE);
|
||||
|
||||
HolyFire_Timer = 8000;
|
||||
} else HolyFire_Timer -= diff;
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!PhaseTwo)
|
||||
{
|
||||
DoScriptText(SAY_TRANSFORM, me);
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
DoCast(me, SPELL_SNAKE_FORM);
|
||||
me->SetFloatValue(OBJECT_FIELD_SCALE_X, 2.00f);
|
||||
const CreatureInfo *cinfo = me->GetCreatureInfo();
|
||||
me->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 25)));
|
||||
me->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 25)));
|
||||
me->UpdateDamagePhysical(BASE_ATTACK);
|
||||
DoResetThreat();
|
||||
PhaseTwo = true;
|
||||
}
|
||||
};
|
||||
|
||||
if (PhaseTwo && PoisonCloud_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_POISON_CLOUD);
|
||||
PoisonCloud_Timer = 15000;
|
||||
}PoisonCloud_Timer -=diff;
|
||||
|
||||
if (PhaseTwo && VenomSpit_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget, SPELL_VENOMSPIT);
|
||||
|
||||
VenomSpit_Timer = 15000 + rand()%5000;
|
||||
} else VenomSpit_Timer -= diff;
|
||||
|
||||
if (PhaseTwo && (me->GetHealth()*100 / me->GetMaxHealth() < 11))
|
||||
{
|
||||
if (!InBerserk)
|
||||
{
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
DoCast(me, SPELL_BERSERK);
|
||||
InBerserk = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_venoxisAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_venoxis(Creature* pCreature)
|
||||
{
|
||||
return new boss_venoxisAI (pCreature);
|
||||
}
|
||||
|
||||
void AddSC_boss_venoxis()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_venoxis";
|
||||
newscript->GetAI = &GetAI_boss_venoxis;
|
||||
newscript->RegisterSelf();
|
||||
new boss_venoxis();
|
||||
}
|
||||
|
||||
|
||||
@@ -29,59 +29,66 @@ EndScriptData */
|
||||
#define SPELL_LIGHTNINGCLOUD 25033
|
||||
#define SPELL_LIGHTNINGWAVE 24819
|
||||
|
||||
struct boss_wushoolayAI : public ScriptedAI
|
||||
class boss_wushoolay : public CreatureScript
|
||||
{
|
||||
boss_wushoolayAI(Creature *c) : ScriptedAI(c) {}
|
||||
public:
|
||||
|
||||
uint32 LightningCloud_Timer;
|
||||
uint32 LightningWave_Timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
LightningCloud_Timer = 5000 + rand()%5000;
|
||||
LightningWave_Timer = 8000 + rand()%8000;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//LightningCloud_Timer
|
||||
if (LightningCloud_Timer <= diff)
|
||||
boss_wushoolay()
|
||||
: CreatureScript("boss_wushoolay")
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_LIGHTNINGCLOUD);
|
||||
LightningCloud_Timer = 15000 + rand()%5000;
|
||||
} else LightningCloud_Timer -= diff;
|
||||
}
|
||||
|
||||
//LightningWave_Timer
|
||||
if (LightningWave_Timer <= diff)
|
||||
struct boss_wushoolayAI : public ScriptedAI
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||
if (pTarget) DoCast(pTarget, SPELL_LIGHTNINGWAVE);
|
||||
boss_wushoolayAI(Creature *c) : ScriptedAI(c) {}
|
||||
|
||||
LightningWave_Timer = 12000 + rand()%4000;
|
||||
} else LightningWave_Timer -= diff;
|
||||
uint32 LightningCloud_Timer;
|
||||
uint32 LightningWave_Timer;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
void Reset()
|
||||
{
|
||||
LightningCloud_Timer = 5000 + rand()%5000;
|
||||
LightningWave_Timer = 8000 + rand()%8000;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//LightningCloud_Timer
|
||||
if (LightningCloud_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_LIGHTNINGCLOUD);
|
||||
LightningCloud_Timer = 15000 + rand()%5000;
|
||||
} else LightningCloud_Timer -= diff;
|
||||
|
||||
//LightningWave_Timer
|
||||
if (LightningWave_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget = NULL;
|
||||
pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||
if (pTarget) DoCast(pTarget, SPELL_LIGHTNINGWAVE);
|
||||
|
||||
LightningWave_Timer = 12000 + rand()%4000;
|
||||
} else LightningWave_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_wushoolayAI(creature);
|
||||
}
|
||||
};
|
||||
CreatureAI* GetAI_boss_wushoolay(Creature* pCreature)
|
||||
{
|
||||
return new boss_wushoolayAI (pCreature);
|
||||
}
|
||||
|
||||
void AddSC_boss_wushoolay()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_wushoolay";
|
||||
newscript->GetAI = &GetAI_boss_wushoolay;
|
||||
newscript->RegisterSelf();
|
||||
new boss_wushoolay();
|
||||
}
|
||||
|
||||
|
||||
@@ -26,136 +26,140 @@ EndScriptData */
|
||||
#include "ScriptPCH.h"
|
||||
#include "zulgurub.h"
|
||||
|
||||
struct instance_zulgurub : public ScriptedInstance
|
||||
class instance_zulgurub : public InstanceMapScript
|
||||
{
|
||||
instance_zulgurub(Map* pMap) : ScriptedInstance(pMap) {Initialize();};
|
||||
|
||||
//If all High Priest bosses were killed. Lorkhan, Zath and Ohgan are added too.
|
||||
uint32 m_auiEncounter[MAX_ENCOUNTERS];
|
||||
|
||||
//Storing Lorkhan, Zath and Thekal because we need to cast on them later. Jindo is needed for healfunction too.
|
||||
uint64 m_uiLorKhanGUID;
|
||||
uint64 m_uiZathGUID;
|
||||
uint64 m_uiThekalGUID;
|
||||
uint64 m_uiJindoGUID;
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
|
||||
m_uiLorKhanGUID = 0;
|
||||
m_uiZathGUID = 0;
|
||||
m_uiThekalGUID = 0;
|
||||
m_uiJindoGUID = 0;
|
||||
}
|
||||
|
||||
bool IsEncounterInProgress() const
|
||||
{
|
||||
//not active in Zul'Gurub
|
||||
return false;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* pCreature)
|
||||
{
|
||||
switch(pCreature->GetEntry())
|
||||
public:
|
||||
instance_zulgurub()
|
||||
: InstanceMapScript("instance_zulgurub")
|
||||
{
|
||||
case 11347: m_uiLorKhanGUID = pCreature->GetGUID(); break;
|
||||
case 11348: m_uiZathGUID = pCreature->GetGUID(); break;
|
||||
case 14509: m_uiThekalGUID = pCreature->GetGUID(); break;
|
||||
case 11380: m_uiJindoGUID = pCreature->GetGUID(); break;
|
||||
}
|
||||
}
|
||||
|
||||
void SetData(uint32 uiType, uint32 uiData)
|
||||
{
|
||||
switch(uiType)
|
||||
struct instance_zulgurub_InstanceMapScript : public ScriptedInstance
|
||||
{
|
||||
case TYPE_ARLOKK:
|
||||
m_auiEncounter[0] = uiData;
|
||||
break;
|
||||
instance_zulgurub(Map* pMap) : ScriptedInstance(pMap) {Initialize();};
|
||||
|
||||
case TYPE_JEKLIK:
|
||||
m_auiEncounter[1] = uiData;
|
||||
break;
|
||||
//If all High Priest bosses were killed. Lorkhan, Zath and Ohgan are added too.
|
||||
uint32 m_auiEncounter[MAX_ENCOUNTERS];
|
||||
|
||||
case TYPE_VENOXIS:
|
||||
m_auiEncounter[2] = uiData;
|
||||
break;
|
||||
//Storing Lorkhan, Zath and Thekal because we need to cast on them later. Jindo is needed for healfunction too.
|
||||
uint64 m_uiLorKhanGUID;
|
||||
uint64 m_uiZathGUID;
|
||||
uint64 m_uiThekalGUID;
|
||||
uint64 m_uiJindoGUID;
|
||||
|
||||
case TYPE_MARLI:
|
||||
m_auiEncounter[3] = uiData;
|
||||
break;
|
||||
void Initialize()
|
||||
{
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
|
||||
case TYPE_THEKAL:
|
||||
m_auiEncounter[4] = uiData;
|
||||
break;
|
||||
m_uiLorKhanGUID = 0;
|
||||
m_uiZathGUID = 0;
|
||||
m_uiThekalGUID = 0;
|
||||
m_uiJindoGUID = 0;
|
||||
}
|
||||
|
||||
case TYPE_LORKHAN:
|
||||
m_auiEncounter[5] = uiData;
|
||||
break;
|
||||
bool IsEncounterInProgress() const
|
||||
{
|
||||
//not active in Zul'Gurub
|
||||
return false;
|
||||
}
|
||||
|
||||
case TYPE_ZATH:
|
||||
m_auiEncounter[6] = uiData;
|
||||
break;
|
||||
void OnCreatureCreate(Creature* pCreature)
|
||||
{
|
||||
switch(pCreature->GetEntry())
|
||||
{
|
||||
case 11347: m_uiLorKhanGUID = pCreature->GetGUID(); break;
|
||||
case 11348: m_uiZathGUID = pCreature->GetGUID(); break;
|
||||
case 14509: m_uiThekalGUID = pCreature->GetGUID(); break;
|
||||
case 11380: m_uiJindoGUID = pCreature->GetGUID(); break;
|
||||
}
|
||||
}
|
||||
|
||||
case TYPE_OHGAN:
|
||||
m_auiEncounter[7] = uiData;
|
||||
break;
|
||||
}
|
||||
}
|
||||
void SetData(uint32 uiType, uint32 uiData)
|
||||
{
|
||||
switch(uiType)
|
||||
{
|
||||
case TYPE_ARLOKK:
|
||||
m_auiEncounter[0] = uiData;
|
||||
break;
|
||||
|
||||
uint32 GetData(uint32 uiType)
|
||||
{
|
||||
switch(uiType)
|
||||
case TYPE_JEKLIK:
|
||||
m_auiEncounter[1] = uiData;
|
||||
break;
|
||||
|
||||
case TYPE_VENOXIS:
|
||||
m_auiEncounter[2] = uiData;
|
||||
break;
|
||||
|
||||
case TYPE_MARLI:
|
||||
m_auiEncounter[3] = uiData;
|
||||
break;
|
||||
|
||||
case TYPE_THEKAL:
|
||||
m_auiEncounter[4] = uiData;
|
||||
break;
|
||||
|
||||
case TYPE_LORKHAN:
|
||||
m_auiEncounter[5] = uiData;
|
||||
break;
|
||||
|
||||
case TYPE_ZATH:
|
||||
m_auiEncounter[6] = uiData;
|
||||
break;
|
||||
|
||||
case TYPE_OHGAN:
|
||||
m_auiEncounter[7] = uiData;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 uiType)
|
||||
{
|
||||
switch(uiType)
|
||||
{
|
||||
case TYPE_ARLOKK:
|
||||
return m_auiEncounter[0];
|
||||
case TYPE_JEKLIK:
|
||||
return m_auiEncounter[1];
|
||||
case TYPE_VENOXIS:
|
||||
return m_auiEncounter[2];
|
||||
case TYPE_MARLI:
|
||||
return m_auiEncounter[3];
|
||||
case TYPE_THEKAL:
|
||||
return m_auiEncounter[4];
|
||||
case TYPE_LORKHAN:
|
||||
return m_auiEncounter[5];
|
||||
case TYPE_ZATH:
|
||||
return m_auiEncounter[6];
|
||||
case TYPE_OHGAN:
|
||||
return m_auiEncounter[7];
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 uiData)
|
||||
{
|
||||
switch(uiData)
|
||||
{
|
||||
case DATA_LORKHAN:
|
||||
return m_uiLorKhanGUID;
|
||||
case DATA_ZATH:
|
||||
return m_uiZathGUID;
|
||||
case DATA_THEKAL:
|
||||
return m_uiThekalGUID;
|
||||
case DATA_JINDO:
|
||||
return m_uiJindoGUID;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
InstanceData* OnGetInstanceData(InstanceMap* pMap)
|
||||
{
|
||||
case TYPE_ARLOKK:
|
||||
return m_auiEncounter[0];
|
||||
case TYPE_JEKLIK:
|
||||
return m_auiEncounter[1];
|
||||
case TYPE_VENOXIS:
|
||||
return m_auiEncounter[2];
|
||||
case TYPE_MARLI:
|
||||
return m_auiEncounter[3];
|
||||
case TYPE_THEKAL:
|
||||
return m_auiEncounter[4];
|
||||
case TYPE_LORKHAN:
|
||||
return m_auiEncounter[5];
|
||||
case TYPE_ZATH:
|
||||
return m_auiEncounter[6];
|
||||
case TYPE_OHGAN:
|
||||
return m_auiEncounter[7];
|
||||
return new instance_zulgurub_InstanceMapScript(pMap);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 uiData)
|
||||
{
|
||||
switch(uiData)
|
||||
{
|
||||
case DATA_LORKHAN:
|
||||
return m_uiLorKhanGUID;
|
||||
case DATA_ZATH:
|
||||
return m_uiZathGUID;
|
||||
case DATA_THEKAL:
|
||||
return m_uiThekalGUID;
|
||||
case DATA_JINDO:
|
||||
return m_uiJindoGUID;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
InstanceData* GetInstanceData_instance_zulgurub(Map* pMap)
|
||||
{
|
||||
return new instance_zulgurub(pMap);
|
||||
}
|
||||
|
||||
void AddSC_instance_zulgurub()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name = "instance_zulgurub";
|
||||
newscript->GetInstanceData = &GetInstanceData_instance_zulgurub;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
|
||||
new instance_zulgurub();
|
||||
}
|
||||
Reference in New Issue
Block a user