mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
Scripts/Zul Gurub: cleanup for cata
This commit is contained in:
@@ -227,21 +227,16 @@ void AddSC_boss_nalorakk();
|
||||
void AddSC_boss_zuljin();
|
||||
void AddSC_instance_zulaman();
|
||||
void AddSC_zulaman();
|
||||
void AddSC_boss_jeklik(); //Zul'Gurub
|
||||
void AddSC_boss_venoxis();
|
||||
void AddSC_boss_marli();
|
||||
void AddSC_boss_mandokir();
|
||||
void AddSC_boss_gahzranka();
|
||||
void AddSC_boss_thekal();
|
||||
void AddSC_boss_arlokk();
|
||||
void AddSC_boss_jindo();
|
||||
void AddSC_boss_hakkar();
|
||||
void AddSC_boss_grilek();
|
||||
void AddSC_boss_grilek(); // Zul'Gurub
|
||||
void AddSC_boss_hazzarah();
|
||||
void AddSC_boss_jindo_the_godbreaker();
|
||||
void AddSC_boss_kilnara();
|
||||
void AddSC_boss_mandokir();
|
||||
void AddSC_boss_renataki();
|
||||
void AddSC_boss_venoxis();
|
||||
void AddSC_boss_wushoolay();
|
||||
void AddSC_boss_zanzil();
|
||||
void AddSC_instance_zulgurub();
|
||||
|
||||
//void AddSC_alterac_mountains();
|
||||
void AddSC_arathi_highlands();
|
||||
void AddSC_blasted_lands();
|
||||
@@ -846,20 +841,16 @@ void AddEasternKingdomsScripts()
|
||||
AddSC_boss_zuljin();
|
||||
AddSC_instance_zulaman();
|
||||
AddSC_zulaman();
|
||||
AddSC_boss_jeklik(); //Zul'Gurub
|
||||
AddSC_boss_venoxis();
|
||||
AddSC_boss_marli();
|
||||
AddSC_boss_mandokir();
|
||||
AddSC_boss_gahzranka();
|
||||
AddSC_boss_thekal();
|
||||
AddSC_boss_arlokk();
|
||||
AddSC_boss_jindo();
|
||||
AddSC_boss_hakkar();
|
||||
AddSC_boss_grilek();
|
||||
AddSC_boss_hazzarah();
|
||||
AddSC_boss_renataki();
|
||||
AddSC_boss_wushoolay();
|
||||
AddSC_instance_zulgurub();
|
||||
AddSC_boss_grilek(); // Zul'Gurub
|
||||
AddSC_boss_hazzarah();
|
||||
AddSC_boss_jindo_the_godbreaker();
|
||||
AddSC_boss_kilnara();
|
||||
AddSC_boss_mandokir();
|
||||
AddSC_boss_renataki();
|
||||
AddSC_boss_venoxis();
|
||||
AddSC_boss_wushoolay();
|
||||
AddSC_boss_zanzil();
|
||||
AddSC_instance_zulgurub();
|
||||
|
||||
//AddSC_alterac_mountains();
|
||||
AddSC_arathi_highlands();
|
||||
|
||||
@@ -32,21 +32,17 @@ set(scripts_STAT_SRCS
|
||||
EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp
|
||||
EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp
|
||||
EasternKingdoms/isle_of_queldanas.cpp
|
||||
EasternKingdoms/ZulGurub/boss_hakkar.cpp
|
||||
EasternKingdoms/ZulGurub/boss_mandokir.cpp
|
||||
EasternKingdoms/ZulGurub/boss_marli.cpp
|
||||
EasternKingdoms/ZulGurub/boss_hazzarah.cpp
|
||||
EasternKingdoms/ZulGurub/boss_jeklik.cpp
|
||||
EasternKingdoms/ZulGurub/boss_grilek.cpp
|
||||
EasternKingdoms/ZulGurub/zulgurub.h
|
||||
EasternKingdoms/ZulGurub/boss_hazzarah.cpp
|
||||
EasternKingdoms/ZulGurub/boss_jindo_the_godbreaker.cpp
|
||||
EasternKingdoms/ZulGurub/boss_kilnara.cpp
|
||||
EasternKingdoms/ZulGurub/boss_mandokir.cpp
|
||||
EasternKingdoms/ZulGurub/boss_renataki.cpp
|
||||
EasternKingdoms/ZulGurub/boss_arlokk.cpp
|
||||
EasternKingdoms/ZulGurub/boss_gahzranka.cpp
|
||||
EasternKingdoms/ZulGurub/boss_venoxis.cpp
|
||||
EasternKingdoms/ZulGurub/instance_zulgurub.cpp
|
||||
EasternKingdoms/ZulGurub/boss_jindo.cpp
|
||||
EasternKingdoms/ZulGurub/boss_wushoolay.cpp
|
||||
EasternKingdoms/ZulGurub/boss_thekal.cpp
|
||||
EasternKingdoms/ZulGurub/boss_zanzil.cpp
|
||||
EasternKingdoms/ZulGurub/instance_zulgurub.cpp
|
||||
EasternKingdoms/ZulGurub/zulgurub.h
|
||||
EasternKingdoms/wetlands.cpp
|
||||
EasternKingdoms/arathi_highlands.cpp
|
||||
EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp
|
||||
|
||||
@@ -1,293 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Arlokk
|
||||
SD%Complete: 95
|
||||
SDComment: Wrong cleave and red aura is missing.
|
||||
SDCategory: Zul'Gurub
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "zulgurub.h"
|
||||
|
||||
enum eYells
|
||||
{
|
||||
SAY_AGGRO = -1309011,
|
||||
SAY_FEAST_PANTHER = -1309012,
|
||||
SAY_DEATH = -1309013,
|
||||
};
|
||||
|
||||
enum eSpells
|
||||
{
|
||||
SPELL_SHADOWWORDPAIN = 23952,
|
||||
SPELL_GOUGE = 24698,
|
||||
SPELL_MARK = 24210,
|
||||
SPELL_CLEAVE = 26350, //Perhaps not right. Not a red aura...
|
||||
SPELL_PANTHER_TRANSFORM = 24190,
|
||||
|
||||
MODEL_ID_NORMAL = 15218,
|
||||
MODEL_ID_PANTHER = 15215,
|
||||
MODEL_ID_BLANK = 11686,
|
||||
|
||||
NPC_ZULIAN_PROWLER = 15101
|
||||
};
|
||||
|
||||
class boss_arlokk : public CreatureScript
|
||||
{
|
||||
public:
|
||||
|
||||
boss_arlokk()
|
||||
: CreatureScript("boss_arlokk")
|
||||
{
|
||||
}
|
||||
|
||||
struct boss_arlokkAI : public ScriptedAI
|
||||
{
|
||||
boss_arlokkAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
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* /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
}
|
||||
|
||||
void JustReachedHome()
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(DATA_ARLOKK, NOT_STARTED);
|
||||
|
||||
//we should be summoned, so despawn
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
|
||||
me->SetDisplayId(MODEL_ID_NORMAL);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_ARLOKK, DONE);
|
||||
}
|
||||
|
||||
void DoSummonPhanters()
|
||||
{
|
||||
if (Unit* pMarkedTarget = Unit::GetUnit(*me, MarkedTargetGUID))
|
||||
DoScriptText(SAY_FEAST_PANTHER, me, pMarkedTarget);
|
||||
|
||||
me->SummonCreature(NPC_ZULIAN_PROWLER, -11532.7998f, -1649.6734f, 41.4800f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
me->SummonCreature(NPC_ZULIAN_PROWLER, -11532.9970f, -1606.4840f, 41.2979f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summoned)
|
||||
{
|
||||
if (Unit* pMarkedTarget = Unit::GetUnit(*me, MarkedTargetGUID))
|
||||
summoned->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 = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
|
||||
if (pMarkedTarget)
|
||||
{
|
||||
DoCast(pMarkedTarget, SPELL_MARK);
|
||||
MarkedTargetGUID = pMarkedTarget->GetGUID();
|
||||
}
|
||||
else
|
||||
sLog->outError(LOG_FILTER_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 CreatureTemplate* cinfo = me->GetCreatureTemplate();
|
||||
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* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
AttackStart(target);
|
||||
|
||||
m_bIsPhaseTwo = true;
|
||||
m_bIsVanished = false;
|
||||
}
|
||||
else
|
||||
m_uiVisible_Timer -= uiDiff;
|
||||
}
|
||||
else
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_arlokkAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
class go_gong_of_bethekk : public GameObjectScript
|
||||
{
|
||||
public:
|
||||
go_gong_of_bethekk() : GameObjectScript("go_gong_of_bethekk")
|
||||
{
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* go)
|
||||
{
|
||||
if (InstanceScript* instance = go->GetInstanceScript())
|
||||
{
|
||||
if (instance->GetData(DATA_ARLOKK) == DONE || instance->GetData(DATA_ARLOKK) == IN_PROGRESS)
|
||||
return true;
|
||||
|
||||
instance->SetData(DATA_ARLOKK, IN_PROGRESS);
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_arlokk()
|
||||
{
|
||||
new boss_arlokk();
|
||||
new go_gong_of_bethekk();
|
||||
}
|
||||
|
||||
@@ -1,99 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Gahz'ranka
|
||||
SD%Complete: 85
|
||||
SDComment: Massive Geyser with knockback not working. Spell buggy.
|
||||
SDCategory: Zul'Gurub
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
|
||||
#define SPELL_FROSTBREATH 16099
|
||||
#define SPELL_MASSIVEGEYSER 22421 //Not working. Cause its a summon...
|
||||
#define SPELL_SLAM 24326
|
||||
|
||||
class boss_gahzranka : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_gahzranka() : CreatureScript("boss_gahzranka") { }
|
||||
|
||||
struct boss_gahzrankaAI : public ScriptedAI
|
||||
{
|
||||
boss_gahzrankaAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
uint32 Frostbreath_Timer;
|
||||
uint32 MassiveGeyser_Timer;
|
||||
uint32 Slam_Timer;
|
||||
|
||||
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)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_FROSTBREATH);
|
||||
Frostbreath_Timer = urand(7000, 11000);
|
||||
} else Frostbreath_Timer -= diff;
|
||||
|
||||
//MassiveGeyser_Timer
|
||||
if (MassiveGeyser_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_MASSIVEGEYSER);
|
||||
DoResetThreat();
|
||||
|
||||
MassiveGeyser_Timer = urand(22000, 32000);
|
||||
} else MassiveGeyser_Timer -= diff;
|
||||
|
||||
//Slam_Timer
|
||||
if (Slam_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SLAM);
|
||||
Slam_Timer = urand(12000, 20000);
|
||||
} else Slam_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_gahzrankaAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_gahzranka()
|
||||
{
|
||||
new boss_gahzranka();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
@@ -16,71 +15,65 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Grilek
|
||||
SD%Complete: 100
|
||||
SDComment:
|
||||
SDCategory: Zul'Gurub
|
||||
EndScriptData */
|
||||
|
||||
#include "ObjectMgr.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "zulgurub.h"
|
||||
|
||||
#define SPELL_AVARTAR 24646 //The Enrage Spell
|
||||
#define SPELL_GROUNDTREMOR 6524
|
||||
enum Yells
|
||||
{
|
||||
};
|
||||
|
||||
enum Spells
|
||||
{
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
};
|
||||
|
||||
class boss_grilek : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_grilek() : CreatureScript("boss_grilek") { }
|
||||
|
||||
struct boss_grilekAI : public ScriptedAI
|
||||
struct boss_grilekAI : public BossAI
|
||||
{
|
||||
boss_grilekAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
uint32 Avartar_Timer;
|
||||
uint32 GroundTremor_Timer;
|
||||
boss_grilekAI(Creature* creature) : BossAI(creature, DATA_GRILEK)
|
||||
{
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
Avartar_Timer = urand(15000, 25000);
|
||||
GroundTremor_Timer = urand(8000, 16000);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 const diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//Avartar_Timer
|
||||
if (Avartar_Timer <= diff)
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
/*
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
|
||||
DoCast(me, SPELL_AVARTAR);
|
||||
Unit* target = NULL;
|
||||
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 1);
|
||||
|
||||
if (DoGetThreat(me->getVictim()))
|
||||
DoModifyThreatPercent(me->getVictim(), -50);
|
||||
if (target)
|
||||
AttackStart(target);
|
||||
|
||||
Avartar_Timer = urand(25000, 35000);
|
||||
} else Avartar_Timer -= diff;
|
||||
|
||||
//GroundTremor_Timer
|
||||
if (GroundTremor_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_GROUNDTREMOR);
|
||||
GroundTremor_Timer = urand(12000, 16000);
|
||||
} else GroundTremor_Timer -= diff;
|
||||
switch (eventId)
|
||||
{
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
@@ -96,4 +89,3 @@ void AddSC_boss_grilek()
|
||||
{
|
||||
new boss_grilek();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,259 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Hakkar
|
||||
SD%Complete: 95
|
||||
SDComment: Blood siphon spell buggy cause of Core Issue.
|
||||
SDCategory: Zul'Gurub
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "zulgurub.h"
|
||||
|
||||
#define SAY_AGGRO -1309020
|
||||
#define SAY_FLEEING -1309021
|
||||
#define SAY_MINION_DESTROY -1309022 //where does it belong?
|
||||
#define SAY_PROTECT_ALTAR -1309023 //where does it belong?
|
||||
|
||||
#define SPELL_BLOODSIPHON 24322
|
||||
#define SPELL_CORRUPTEDBLOOD 24328
|
||||
#define SPELL_CAUSEINSANITY 24327 //Not working disabled.
|
||||
#define SPELL_WILLOFHAKKAR 24178
|
||||
#define SPELL_ENRAGE 24318
|
||||
|
||||
// The Aspects of all High Priests
|
||||
#define SPELL_ASPECT_OF_JEKLIK 24687
|
||||
#define SPELL_ASPECT_OF_VENOXIS 24688
|
||||
#define SPELL_ASPECT_OF_MARLI 24686
|
||||
#define SPELL_ASPECT_OF_THEKAL 24689
|
||||
#define SPELL_ASPECT_OF_ARLOKK 24690
|
||||
|
||||
class boss_hakkar : public CreatureScript
|
||||
{
|
||||
public:
|
||||
|
||||
boss_hakkar()
|
||||
: CreatureScript("boss_hakkar")
|
||||
{
|
||||
}
|
||||
|
||||
struct boss_hakkarAI : public ScriptedAI
|
||||
{
|
||||
boss_hakkarAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
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)
|
||||
{
|
||||
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 = urand(30000, 45000);
|
||||
} else CorruptedBlood_Timer -= diff;
|
||||
|
||||
//CauseInsanity_Timer
|
||||
/*if (CauseInsanity_Timer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_CAUSEINSANITY);
|
||||
|
||||
CauseInsanity_Timer = urand(35000, 43000);
|
||||
} else CauseInsanity_Timer -= diff;*/
|
||||
|
||||
//WillOfHakkar_Timer
|
||||
if (WillOfHakkar_Timer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_WILLOFHAKKAR);
|
||||
|
||||
WillOfHakkar_Timer = urand(25000, 35000);
|
||||
} 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 (instance)
|
||||
{
|
||||
if (instance->GetData(DATA_JEKLIK) != DONE)
|
||||
{
|
||||
if (AspectOfJeklik_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_ASPECT_OF_JEKLIK);
|
||||
AspectOfJeklik_Timer = urand(10000, 14000);
|
||||
} 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 (instance)
|
||||
{
|
||||
if (instance->GetData(DATA_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 (instance)
|
||||
{
|
||||
if (instance->GetData(DATA_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 (instance)
|
||||
{
|
||||
if (instance->GetData(DATA_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 (instance)
|
||||
{
|
||||
if (instance->GetData(DATA_ARLOKK) != DONE)
|
||||
{
|
||||
if (AspectOfArlokk_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_ASPECT_OF_ARLOKK);
|
||||
DoResetThreat();
|
||||
|
||||
AspectOfArlokk_Timer = urand(10000, 15000);
|
||||
} else AspectOfArlokk_Timer -= diff;
|
||||
}
|
||||
}
|
||||
CheckArlokk_Timer = 1000;
|
||||
} else CheckArlokk_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_hakkarAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_hakkar()
|
||||
{
|
||||
new boss_hakkar();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
@@ -16,86 +15,65 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Hazzarah
|
||||
SD%Complete: 100
|
||||
SDComment:
|
||||
SDCategory: Zul'Gurub
|
||||
EndScriptData */
|
||||
|
||||
#include "ObjectMgr.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "zulgurub.h"
|
||||
|
||||
#define SPELL_MANABURN 26046
|
||||
#define SPELL_SLEEP 24664
|
||||
enum Yells
|
||||
{
|
||||
};
|
||||
|
||||
enum Spells
|
||||
{
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
};
|
||||
|
||||
class boss_hazzarah : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_hazzarah() : CreatureScript("boss_hazzarah") { }
|
||||
|
||||
boss_hazzarah()
|
||||
: CreatureScript("boss_hazzarah")
|
||||
struct boss_hazzarahAI : public BossAI
|
||||
{
|
||||
}
|
||||
|
||||
struct boss_hazzarahAI : public ScriptedAI
|
||||
{
|
||||
boss_hazzarahAI(Creature* creature) : ScriptedAI(creature) {}
|
||||
|
||||
uint32 ManaBurn_Timer;
|
||||
uint32 Sleep_Timer;
|
||||
uint32 Illusions_Timer;
|
||||
boss_hazzarahAI(Creature* creature) : BossAI(creature, DATA_HAZZARAH)
|
||||
{
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
ManaBurn_Timer = urand(4000, 10000);
|
||||
Sleep_Timer = urand(10000, 18000);
|
||||
Illusions_Timer = urand(10000, 18000);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 const diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//ManaBurn_Timer
|
||||
if (ManaBurn_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_MANABURN);
|
||||
ManaBurn_Timer = urand(8000, 16000);
|
||||
} else ManaBurn_Timer -= diff;
|
||||
events.Update(diff);
|
||||
|
||||
//Sleep_Timer
|
||||
if (Sleep_Timer <= diff)
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
/*
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SLEEP);
|
||||
Sleep_Timer = urand(12000, 20000);
|
||||
} 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* target = NULL;
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
switch (eventId)
|
||||
{
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (!target)
|
||||
return;
|
||||
|
||||
Creature* Illusion = me->SummonCreature(15163, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
|
||||
if (Illusion)
|
||||
Illusion->AI()->AttackStart(target);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Illusions_Timer = urand(15000, 25000);
|
||||
} else Illusions_Timer -= diff;
|
||||
}
|
||||
*/
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
@@ -111,4 +89,3 @@ void AddSC_boss_hazzarah()
|
||||
{
|
||||
new boss_hazzarah();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,306 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Jeklik
|
||||
SD%Complete: 85
|
||||
SDComment: Problem in finding the right flying batriders for spawning and making them fly.
|
||||
SDCategory: Zul'Gurub
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "zulgurub.h"
|
||||
|
||||
#define SAY_AGGRO -1309002
|
||||
#define SAY_RAIN_FIRE -1309003
|
||||
#define SAY_DEATH -1309004
|
||||
|
||||
#define SPELL_CHARGE 22911
|
||||
#define SPELL_SONICBURST 23918
|
||||
#define SPELL_SCREECH 6605
|
||||
#define SPELL_SHADOW_WORD_PAIN 23952
|
||||
#define SPELL_MIND_FLAY 23953
|
||||
#define SPELL_CHAIN_MIND_FLAY 26044 //Right ID unknown. So disabled
|
||||
#define SPELL_GREATERHEAL 23954
|
||||
#define SPELL_BAT_FORM 23966
|
||||
|
||||
// Batriders Spell
|
||||
|
||||
#define SPELL_BOMB 40332 //Wrong ID but Magmadars bomb is not working...
|
||||
|
||||
class boss_jeklik : public CreatureScript
|
||||
{
|
||||
public:
|
||||
|
||||
boss_jeklik()
|
||||
: CreatureScript("boss_jeklik")
|
||||
{
|
||||
}
|
||||
|
||||
struct boss_jeklikAI : public ScriptedAI
|
||||
{
|
||||
boss_jeklikAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
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 (instance)
|
||||
instance->SetData(DATA_JEKLIK, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (me->getVictim() && me->isAlive())
|
||||
{
|
||||
if (HealthAbovePct(50))
|
||||
{
|
||||
if (Charge_Timer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
DoCast(target, SPELL_CHARGE);
|
||||
AttackStart(target);
|
||||
}
|
||||
|
||||
Charge_Timer = urand(15000, 30000);
|
||||
} else Charge_Timer -= diff;
|
||||
|
||||
if (SonicBurst_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SONICBURST);
|
||||
SonicBurst_Timer = urand(8000, 13000);
|
||||
} else SonicBurst_Timer -= diff;
|
||||
|
||||
if (Screech_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SCREECH);
|
||||
Screech_Timer = urand(18000, 26000);
|
||||
} else Screech_Timer -= diff;
|
||||
|
||||
if (SpawnBats_Timer <= diff)
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
|
||||
Creature* Bat = NULL;
|
||||
Bat = me->SummonCreature(11368, -12291.6220f, -1380.2640f, 144.8304f, 5.483f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (target && Bat) Bat ->AI()->AttackStart(target);
|
||||
|
||||
Bat = me->SummonCreature(11368, -12289.6220f, -1380.2640f, 144.8304f, 5.483f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (target && Bat) Bat ->AI()->AttackStart(target);
|
||||
|
||||
Bat = me->SummonCreature(11368, -12293.6220f, -1380.2640f, 144.8304f, 5.483f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (target && Bat) Bat ->AI()->AttackStart(target);
|
||||
|
||||
Bat = me->SummonCreature(11368, -12291.6220f, -1380.2640f, 144.8304f, 5.483f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (target && Bat) Bat ->AI()->AttackStart(target);
|
||||
|
||||
Bat = me->SummonCreature(11368, -12289.6220f, -1380.2640f, 144.8304f, 5.483f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (target && Bat) Bat ->AI()->AttackStart(target);
|
||||
Bat = me->SummonCreature(11368, -12293.6220f, -1380.2640f, 144.8304f, 5.483f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (target && Bat) Bat ->AI()->AttackStart(target);
|
||||
|
||||
SpawnBats_Timer = 60000;
|
||||
} else SpawnBats_Timer -= diff;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (PhaseTwo)
|
||||
{
|
||||
if (PhaseTwo && ShadowWordPain_Timer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
DoCast(target, SPELL_SHADOW_WORD_PAIN);
|
||||
ShadowWordPain_Timer = urand(12000, 18000);
|
||||
}
|
||||
}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 = urand(15000, 30000);
|
||||
}ChainMindFlay_Timer -=diff;
|
||||
|
||||
if (GreaterHeal_Timer <= diff)
|
||||
{
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
DoCast(me, SPELL_GREATERHEAL);
|
||||
GreaterHeal_Timer = urand(25000, 35000);
|
||||
}GreaterHeal_Timer -=diff;
|
||||
|
||||
if (SpawnFlyingBats_Timer <= diff)
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (!target)
|
||||
return;
|
||||
|
||||
Creature* FlyingBat = me->SummonCreature(14965, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ()+15, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (FlyingBat)
|
||||
FlyingBat->AI()->AttackStart(target);
|
||||
|
||||
SpawnFlyingBats_Timer = urand(10000, 15000);
|
||||
} else SpawnFlyingBats_Timer -=diff;
|
||||
}
|
||||
else
|
||||
{
|
||||
me->SetDisplayId(15219);
|
||||
DoResetThreat();
|
||||
PhaseTwo = true;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_jeklikAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
//Flying Bat
|
||||
class mob_batrider : public CreatureScript
|
||||
{
|
||||
public:
|
||||
|
||||
mob_batrider()
|
||||
: CreatureScript("mob_batrider")
|
||||
{
|
||||
}
|
||||
|
||||
struct mob_batriderAI : public ScriptedAI
|
||||
{
|
||||
mob_batriderAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
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)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
DoCast(target, SPELL_BOMB);
|
||||
Bomb_Timer = 5000;
|
||||
}
|
||||
} else Bomb_Timer -= diff;
|
||||
|
||||
//Check_Timer
|
||||
if (Check_Timer <= diff)
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
if (instance->GetData(DATA_JEKLIK) == DONE)
|
||||
{
|
||||
me->setDeathState(JUST_DIED);
|
||||
me->RemoveCorpse();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Check_Timer = 1000;
|
||||
} else Check_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new mob_batriderAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_jeklik()
|
||||
{
|
||||
new boss_jeklik();
|
||||
new mob_batrider();
|
||||
}
|
||||
|
||||
@@ -1,283 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Jin'do the Hexxer
|
||||
SD%Complete: 85
|
||||
SDComment: Mind Control not working because of core bug. Shades visible for all.
|
||||
SDCategory: Zul'Gurub
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "zulgurub.h"
|
||||
|
||||
#define SAY_AGGRO -1309014
|
||||
|
||||
#define SPELL_BRAINWASHTOTEM 24262
|
||||
#define SPELL_POWERFULLHEALINGWARD 24309 //We will not use this spell. We will summon a totem by script cause the spell totems will not cast.
|
||||
#define SPELL_HEX 24053
|
||||
#define SPELL_DELUSIONSOFJINDO 24306
|
||||
#define SPELL_SHADEOFJINDO 24308 //We will not use this spell. We will summon a shade by script.
|
||||
|
||||
//Healing Ward Spell
|
||||
#define SPELL_HEAL 38588 //Totems are not working right. Right heal spell ID is 24311 but this spell is not casting...
|
||||
|
||||
//Shade of Jindo Spell
|
||||
#define SPELL_SHADOWSHOCK 19460
|
||||
#define SPELL_INVISIBLE 24699
|
||||
|
||||
class boss_jindo : public CreatureScript
|
||||
{
|
||||
public:
|
||||
|
||||
boss_jindo()
|
||||
: CreatureScript("boss_jindo")
|
||||
{
|
||||
}
|
||||
|
||||
struct boss_jindoAI : public ScriptedAI
|
||||
{
|
||||
boss_jindoAI(Creature* creature) : ScriptedAI(creature) {}
|
||||
|
||||
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)
|
||||
{
|
||||
DoCast(me, SPELL_BRAINWASHTOTEM);
|
||||
BrainWashTotem_Timer = urand(18000, 26000);
|
||||
} 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 = urand(14000, 20000);
|
||||
} 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 = urand(12000, 20000);
|
||||
} 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* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
DoCast(target, SPELL_DELUSIONSOFJINDO);
|
||||
|
||||
Creature* Shade = me->SummonCreature(14986, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Shade)
|
||||
Shade->AI()->AttackStart(target);
|
||||
}
|
||||
|
||||
Delusions_Timer = urand(4000, 12000);
|
||||
} else Delusions_Timer -= diff;
|
||||
|
||||
//Teleporting a random gamer and spawning 9 skeletons that will attack this gamer
|
||||
if (Teleport_Timer <= diff)
|
||||
{
|
||||
Unit* target = NULL;
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (target && target->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
DoTeleportPlayer(target, -11583.7783f, -1249.4278f, 77.5471f, 4.745f);
|
||||
|
||||
if (DoGetThreat(me->getVictim()))
|
||||
DoModifyThreatPercent(target, -100);
|
||||
|
||||
Creature* Skeletons;
|
||||
Skeletons = me->SummonCreature(14826, target->GetPositionX()+2, target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Skeletons)
|
||||
Skeletons->AI()->AttackStart(target);
|
||||
Skeletons = me->SummonCreature(14826, target->GetPositionX()-2, target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Skeletons)
|
||||
Skeletons->AI()->AttackStart(target);
|
||||
Skeletons = me->SummonCreature(14826, target->GetPositionX()+4, target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Skeletons)
|
||||
Skeletons->AI()->AttackStart(target);
|
||||
Skeletons = me->SummonCreature(14826, target->GetPositionX()-4, target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Skeletons)
|
||||
Skeletons->AI()->AttackStart(target);
|
||||
Skeletons = me->SummonCreature(14826, target->GetPositionX(), target->GetPositionY()+2, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Skeletons)
|
||||
Skeletons->AI()->AttackStart(target);
|
||||
Skeletons = me->SummonCreature(14826, target->GetPositionX(), target->GetPositionY()-2, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Skeletons)
|
||||
Skeletons->AI()->AttackStart(target);
|
||||
Skeletons = me->SummonCreature(14826, target->GetPositionX(), target->GetPositionY()+4, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Skeletons)
|
||||
Skeletons->AI()->AttackStart(target);
|
||||
Skeletons = me->SummonCreature(14826, target->GetPositionX(), target->GetPositionY()-4, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Skeletons)
|
||||
Skeletons->AI()->AttackStart(target);
|
||||
Skeletons = me->SummonCreature(14826, target->GetPositionX()+3, target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Skeletons)
|
||||
Skeletons->AI()->AttackStart(target);
|
||||
}
|
||||
|
||||
Teleport_Timer = urand(15000, 23000);
|
||||
} else Teleport_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_jindoAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
//Healing Ward
|
||||
class mob_healing_ward : public CreatureScript
|
||||
{
|
||||
public:
|
||||
|
||||
mob_healing_ward()
|
||||
: CreatureScript("mob_healing_ward")
|
||||
{
|
||||
}
|
||||
|
||||
struct mob_healing_wardAI : public ScriptedAI
|
||||
{
|
||||
mob_healing_wardAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
uint32 Heal_Timer;
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
Heal_Timer = 2000;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI (const uint32 diff)
|
||||
{
|
||||
//Heal_Timer
|
||||
if (Heal_Timer <= diff)
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
Unit* pJindo = Unit::GetUnit(*me, instance->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
|
||||
class mob_shade_of_jindo : public CreatureScript
|
||||
{
|
||||
public:
|
||||
|
||||
mob_shade_of_jindo()
|
||||
: CreatureScript("mob_shade_of_jindo")
|
||||
{
|
||||
}
|
||||
|
||||
struct mob_shade_of_jindoAI : public ScriptedAI
|
||||
{
|
||||
mob_shade_of_jindoAI(Creature* creature) : ScriptedAI(creature) {}
|
||||
|
||||
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);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_jindo()
|
||||
{
|
||||
new boss_jindo();
|
||||
new mob_healing_ward();
|
||||
new mob_shade_of_jindo();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ObjectMgr.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "zulgurub.h"
|
||||
|
||||
enum Yells
|
||||
{
|
||||
};
|
||||
|
||||
enum Spells
|
||||
{
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
};
|
||||
|
||||
class boss_jindo_the_godbreaker : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_jindo_the_godbreaker() : CreatureScript("boss_jindo_the_godbreaker") { }
|
||||
|
||||
struct boss_jindo_the_godbreakerAI : public BossAI
|
||||
{
|
||||
boss_jindo_the_godbreakerAI(Creature* creature) : BossAI(creature, DATA_JINDO)
|
||||
{
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 const diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
/*
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_jindo_the_godbreakerAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_jindo_the_godbreaker()
|
||||
{
|
||||
new boss_jindo_the_godbreaker();
|
||||
}
|
||||
92
src/server/scripts/EasternKingdoms/ZulGurub/boss_kilnara.cpp
Normal file
92
src/server/scripts/EasternKingdoms/ZulGurub/boss_kilnara.cpp
Normal file
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ObjectMgr.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "Spell.h"
|
||||
#include "zulgurub.h"
|
||||
|
||||
enum Yells
|
||||
{
|
||||
};
|
||||
|
||||
enum Spells
|
||||
{
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
};
|
||||
|
||||
class boss_kilnara : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_kilnara() : CreatureScript("boss_kilnara") { }
|
||||
|
||||
struct boss_kilnaraAI : public BossAI
|
||||
{
|
||||
boss_kilnaraAI(Creature* creature) : BossAI(creature, DATA_KILNARA)
|
||||
{
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 const diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
/*
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_kilnaraAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_kilnara()
|
||||
{
|
||||
new boss_kilnara();
|
||||
}
|
||||
@@ -16,264 +16,69 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Mandokir
|
||||
SD%Complete: 90
|
||||
SDComment: Ohgan function needs improvements.
|
||||
SDCategory: Zul'Gurub
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "zulgurub.h"
|
||||
|
||||
#define SAY_AGGRO -1309015
|
||||
#define SAY_DING_KILL -1309016
|
||||
#define SAY_GRATS_JINDO -1309017
|
||||
#define SAY_WATCH -1309018
|
||||
#define SAY_WATCH_WHISPER -1309019 //is this text for real? easter egg?
|
||||
enum Yells
|
||||
{
|
||||
};
|
||||
|
||||
#define SPELL_CHARGE 24408
|
||||
#define SPELL_CLEAVE 7160
|
||||
#define SPELL_FEAR 29321
|
||||
#define SPELL_WHIRLWIND 15589
|
||||
#define SPELL_MORTAL_STRIKE 16856
|
||||
#define SPELL_ENRAGE 24318
|
||||
#define SPELL_WATCH 24314
|
||||
#define SPELL_LEVEL_UP 24312
|
||||
enum Spells
|
||||
{
|
||||
};
|
||||
|
||||
//Ohgans Spells
|
||||
#define SPELL_SUNDERARMOR 24317
|
||||
enum Events
|
||||
{
|
||||
};
|
||||
|
||||
class boss_mandokir : public CreatureScript
|
||||
{
|
||||
public:
|
||||
|
||||
boss_mandokir()
|
||||
: CreatureScript("boss_mandokir")
|
||||
boss_mandokir() : CreatureScript("boss_mandokir") { }
|
||||
|
||||
struct boss_mandokirAI : public BossAI
|
||||
{
|
||||
}
|
||||
|
||||
struct boss_mandokirAI : public ScriptedAI
|
||||
{
|
||||
boss_mandokirAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
bool endWatch;
|
||||
bool someWatched;
|
||||
bool RaptorDead;
|
||||
bool CombatStart;
|
||||
|
||||
uint64 WatchTarget;
|
||||
boss_mandokirAI(Creature* creature) : BossAI(creature, DATA_MANDOKIR) { }
|
||||
|
||||
void Reset()
|
||||
{
|
||||
KillCount = 0;
|
||||
Watch_Timer = 33000;
|
||||
Cleave_Timer = 7000;
|
||||
Whirlwind_Timer = 20000;
|
||||
Fear_Timer = 1000;
|
||||
MortalStrike_Timer = 1000;
|
||||
Check_Timer = 1000;
|
||||
|
||||
targetX = 0.0f;
|
||||
targetY = 0.0f;
|
||||
targetZ = 0.0f;
|
||||
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 (instance)
|
||||
{
|
||||
uint64 JindoGUID = instance->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)
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 const diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (me->getVictim() && me->isAlive())
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
/*
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
if (!CombatStart)
|
||||
switch (eventId)
|
||||
{
|
||||
//At combat Start Mandokir is mounted so we must unmount it first
|
||||
me->Dismount();
|
||||
|
||||
//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;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
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* unit = Unit::GetUnit(*me, WatchTarget);
|
||||
|
||||
if (unit && (
|
||||
targetX != unit->GetPositionX() ||
|
||||
targetY != unit->GetPositionY() ||
|
||||
targetZ != unit->GetPositionZ() ||
|
||||
unit->isInCombat()))
|
||||
{
|
||||
if (me->IsWithinMeleeRange(unit))
|
||||
{
|
||||
DoCast(unit, 24316);
|
||||
}
|
||||
else
|
||||
{
|
||||
DoCast(unit, SPELL_CHARGE);
|
||||
//me->SendMonsterMove(unit->GetPositionX(), unit->GetPositionY(), unit->GetPositionZ(), 0, true, 1);
|
||||
AttackStart(unit);
|
||||
}
|
||||
}
|
||||
}
|
||||
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 = SelectTarget(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* unit = Unit::GetUnit(*me, WatchTarget);
|
||||
if (unit)
|
||||
{
|
||||
targetX = unit->GetPositionX();
|
||||
targetY = unit->GetPositionY();
|
||||
targetZ = unit->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* unit = Unit::GetUnit(*me, (*i)->getUnitGuid());
|
||||
if (unit && me->IsWithinMeleeRange(unit))
|
||||
++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()->HealthBelowPct(50))
|
||||
{
|
||||
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 (instance)
|
||||
{
|
||||
if (instance->GetData(DATA_OHGAN) == DONE)
|
||||
{
|
||||
if (!RaptorDead)
|
||||
{
|
||||
DoCast(me, SPELL_ENRAGE);
|
||||
RaptorDead = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Check_Timer = 1000;
|
||||
} else Check_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
*/
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -283,65 +88,7 @@ class boss_mandokir : public CreatureScript
|
||||
}
|
||||
};
|
||||
|
||||
//Ohgan
|
||||
class mob_ohgan : public CreatureScript
|
||||
{
|
||||
public:
|
||||
|
||||
mob_ohgan()
|
||||
: CreatureScript("mob_ohgan")
|
||||
{
|
||||
}
|
||||
|
||||
struct mob_ohganAI : public ScriptedAI
|
||||
{
|
||||
mob_ohganAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
uint32 SunderArmor_Timer;
|
||||
InstanceScript* instance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
SunderArmor_Timer = 5000;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) {}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(DATA_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 = urand(10000, 15000);
|
||||
} else SunderArmor_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new mob_ohganAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_mandokir()
|
||||
{
|
||||
new boss_mandokir();
|
||||
new mob_ohgan();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,275 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Marli
|
||||
SD%Complete: 80
|
||||
SDComment: Charging healers and casters not working. Perhaps wrong Spell Timers.
|
||||
SDCategory: Zul'Gurub
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "zulgurub.h"
|
||||
|
||||
#define SAY_AGGRO -1309005
|
||||
#define SAY_TRANSFORM -1309006
|
||||
#define SAY_SPIDER_SPAWN -1309007
|
||||
#define SAY_DEATH -1309008
|
||||
|
||||
#define SPELL_CHARGE 22911
|
||||
#define SPELL_ASPECT_OF_MARLI 24686 // A stun spell
|
||||
#define SPELL_ENVOLWINGWEB 24110
|
||||
#define SPELL_POISONVOLLEY 24099
|
||||
#define SPELL_SPIDER_FORM 24084
|
||||
|
||||
//The Spider Spells
|
||||
#define SPELL_LEVELUP 24312 //Not right Spell.
|
||||
|
||||
class boss_marli : public CreatureScript
|
||||
{
|
||||
public:
|
||||
|
||||
boss_marli()
|
||||
: CreatureScript("boss_marli")
|
||||
{
|
||||
}
|
||||
|
||||
struct boss_marliAI : public ScriptedAI
|
||||
{
|
||||
boss_marliAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
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 (instance)
|
||||
instance->SetData(DATA_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 = urand(10000, 20000);
|
||||
} else PoisonVolley_Timer -= diff;
|
||||
|
||||
if (!PhaseTwo && Aspect_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_ASPECT_OF_MARLI);
|
||||
Aspect_Timer = urand(13000, 18000);
|
||||
} else Aspect_Timer -= diff;
|
||||
|
||||
if (!Spawned && SpawnStartSpiders_Timer <= diff)
|
||||
{
|
||||
DoScriptText(SAY_SPIDER_SPAWN, me);
|
||||
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (!target)
|
||||
return;
|
||||
|
||||
Creature* Spider = NULL;
|
||||
|
||||
Spider = me->SummonCreature(15041, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Spider)
|
||||
Spider->AI()->AttackStart(target);
|
||||
Spider = me->SummonCreature(15041, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Spider)
|
||||
Spider->AI()->AttackStart(target);
|
||||
Spider = me->SummonCreature(15041, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Spider)
|
||||
Spider->AI()->AttackStart(target);
|
||||
Spider = me->SummonCreature(15041, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Spider)
|
||||
Spider->AI()->AttackStart(target);
|
||||
|
||||
Spawned = true;
|
||||
} else SpawnStartSpiders_Timer -= diff;
|
||||
|
||||
if (SpawnSpider_Timer <= diff)
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (!target)
|
||||
return;
|
||||
|
||||
Creature* Spider = me->SummonCreature(15041, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Spider)
|
||||
Spider->AI()->AttackStart(target);
|
||||
SpawnSpider_Timer = urand(12000, 17000);
|
||||
} else SpawnSpider_Timer -= diff;
|
||||
|
||||
if (!PhaseTwo && Transform_Timer <= diff)
|
||||
{
|
||||
DoScriptText(SAY_TRANSFORM, me);
|
||||
DoCast(me, SPELL_SPIDER_FORM);
|
||||
const CreatureTemplate* cinfo = me->GetCreatureTemplate();
|
||||
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* target = NULL;
|
||||
int i = 0;
|
||||
while (i < 3) // max 3 tries to get a random target with power_mana
|
||||
{
|
||||
++i;
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true); // not aggro leader
|
||||
if (target && target->getPowerType() == POWER_MANA)
|
||||
i = 3;
|
||||
}
|
||||
if (target)
|
||||
{
|
||||
DoCast(target, SPELL_CHARGE);
|
||||
//me->SetPosition(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0);
|
||||
//me->SendMonsterMove(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, true, 1);
|
||||
AttackStart(target);
|
||||
}
|
||||
|
||||
Charge_Timer = 8000;
|
||||
} else Charge_Timer -= diff;
|
||||
|
||||
if (TransformBack_Timer <= diff)
|
||||
{
|
||||
me->SetDisplayId(15220);
|
||||
const CreatureTemplate* cinfo = me->GetCreatureTemplate();
|
||||
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 boss_marliAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
//Spawn of Marli
|
||||
class mob_spawn_of_marli : public CreatureScript
|
||||
{
|
||||
public:
|
||||
|
||||
mob_spawn_of_marli()
|
||||
: CreatureScript("mob_spawn_of_marli")
|
||||
{
|
||||
}
|
||||
|
||||
struct mob_spawn_of_marliAI : public ScriptedAI
|
||||
{
|
||||
mob_spawn_of_marliAI(Creature* creature) : ScriptedAI(creature) {}
|
||||
|
||||
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);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_marli()
|
||||
{
|
||||
new boss_marli();
|
||||
new mob_spawn_of_marli();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
@@ -16,135 +15,65 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Renataki
|
||||
SD%Complete: 100
|
||||
SDComment:
|
||||
SDCategory: Zul'Gurub
|
||||
EndScriptData */
|
||||
|
||||
#include "ObjectMgr.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "zulgurub.h"
|
||||
|
||||
#define SPELL_AMBUSH 24337
|
||||
#define SPELL_THOUSANDBLADES 24649
|
||||
enum Yells
|
||||
{
|
||||
};
|
||||
|
||||
#define EQUIP_ID_MAIN_HAND 0 //was item display id 31818, but this id does not exist
|
||||
enum Spells
|
||||
{
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
};
|
||||
|
||||
class boss_renataki : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_renataki() : CreatureScript("boss_renataki") { }
|
||||
|
||||
boss_renataki()
|
||||
: CreatureScript("boss_renataki")
|
||||
struct boss_renatakiAI : public BossAI
|
||||
{
|
||||
}
|
||||
|
||||
struct boss_renatakiAI : public ScriptedAI
|
||||
{
|
||||
boss_renatakiAI(Creature* creature) : ScriptedAI(creature) {}
|
||||
|
||||
uint32 Invisible_Timer;
|
||||
uint32 Ambush_Timer;
|
||||
uint32 Visible_Timer;
|
||||
uint32 Aggro_Timer;
|
||||
uint32 ThousandBlades_Timer;
|
||||
|
||||
bool Invisible;
|
||||
bool Ambushed;
|
||||
boss_renatakiAI(Creature* creature) : BossAI(creature, DATA_RENATAKI)
|
||||
{
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
Invisible_Timer = urand(8000, 18000);
|
||||
Ambush_Timer = 3000;
|
||||
Visible_Timer = 4000;
|
||||
Aggro_Timer = urand(15000, 25000);
|
||||
ThousandBlades_Timer = urand(4000, 8000);
|
||||
|
||||
Invisible = false;
|
||||
Ambushed = false;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 const diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//Invisible_Timer
|
||||
if (Invisible_Timer <= diff)
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
/*
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
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 = urand(15000, 30000);
|
||||
} else Invisible_Timer -= diff;
|
||||
|
||||
if (Invisible)
|
||||
{
|
||||
if (Ambush_Timer <= diff)
|
||||
switch (eventId)
|
||||
{
|
||||
Unit* target = NULL;
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (target)
|
||||
{
|
||||
DoTeleportTo(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ());
|
||||
DoCast(target, SPELL_AMBUSH);
|
||||
}
|
||||
|
||||
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* target = NULL;
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 1);
|
||||
|
||||
if (DoGetThreat(me->getVictim()))
|
||||
DoModifyThreatPercent(me->getVictim(), -50);
|
||||
|
||||
if (target)
|
||||
AttackStart(target);
|
||||
|
||||
Aggro_Timer = urand(7000, 20000);
|
||||
} else Aggro_Timer -= diff;
|
||||
|
||||
if (ThousandBlades_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_THOUSANDBLADES);
|
||||
ThousandBlades_Timer = urand(7000, 12000);
|
||||
} else ThousandBlades_Timer -= diff;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
@@ -160,4 +89,3 @@ void AddSC_boss_renataki()
|
||||
{
|
||||
new boss_renataki();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,588 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Thekal
|
||||
SD%Complete: 95
|
||||
SDComment: Almost finished.
|
||||
SDCategory: Zul'Gurub
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "zulgurub.h"
|
||||
|
||||
#define SAY_AGGRO -1309009
|
||||
#define SAY_DEATH -1309010
|
||||
|
||||
enum eSpells
|
||||
{
|
||||
SPELL_MORTALCLEAVE = 22859,
|
||||
SPELL_SILENCE = 22666,
|
||||
SPELL_FRENZY = 8269,
|
||||
SPELL_FORCEPUNCH = 24189,
|
||||
SPELL_CHARGE = 24193,
|
||||
SPELL_ENRAGE = 8269,
|
||||
SPELL_SUMMONTIGERS = 24183,
|
||||
SPELL_TIGER_FORM = 24169,
|
||||
SPELL_RESURRECT = 24173, //We will not use this spell.
|
||||
|
||||
//Zealot Lor'Khan Spells
|
||||
SPELL_SHIELD = 20545,
|
||||
SPELL_BLOODLUST = 24185,
|
||||
SPELL_GREATERHEAL = 24208,
|
||||
SPELL_DISARM = 6713,
|
||||
|
||||
//Zealot Zath Spells
|
||||
SPELL_SWEEPINGSTRIKES = 18765,
|
||||
SPELL_SINISTERSTRIKE = 15581,
|
||||
SPELL_GOUGE = 12540,
|
||||
SPELL_KICK = 15614,
|
||||
SPELL_BLIND = 21060,
|
||||
};
|
||||
|
||||
class boss_thekal : public CreatureScript
|
||||
{
|
||||
public:
|
||||
|
||||
boss_thekal()
|
||||
: CreatureScript("boss_thekal")
|
||||
{
|
||||
}
|
||||
|
||||
struct boss_thekalAI : public ScriptedAI
|
||||
{
|
||||
boss_thekalAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
uint32 MortalCleave_Timer;
|
||||
uint32 Silence_Timer;
|
||||
uint32 Frenzy_Timer;
|
||||
uint32 ForcePunch_Timer;
|
||||
uint32 Charge_Timer;
|
||||
uint32 Enrage_Timer;
|
||||
uint32 SummonTigers_Timer;
|
||||
uint32 Check_Timer;
|
||||
uint32 Resurrect_Timer;
|
||||
|
||||
InstanceScript* instance;
|
||||
bool Enraged;
|
||||
bool PhaseTwo;
|
||||
bool WasDead;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
MortalCleave_Timer = 4000;
|
||||
Silence_Timer = 9000;
|
||||
Frenzy_Timer = 30000;
|
||||
ForcePunch_Timer = 4000;
|
||||
Charge_Timer = 12000;
|
||||
Enrage_Timer = 32000;
|
||||
SummonTigers_Timer = 25000;
|
||||
Check_Timer = 10000;
|
||||
Resurrect_Timer = 10000;
|
||||
|
||||
Enraged = false;
|
||||
PhaseTwo = false;
|
||||
WasDead = false;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
if (instance)
|
||||
instance->SetData(DATA_THEKAL, DONE);
|
||||
}
|
||||
|
||||
void JustReachedHome()
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(DATA_THEKAL, NOT_STARTED);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//Check_Timer for the death of LorKhan and Zath.
|
||||
if (!WasDead && Check_Timer <= diff)
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
if (instance->GetData(DATA_LORKHAN) == SPECIAL)
|
||||
{
|
||||
//Resurrect LorKhan
|
||||
if (Unit* pLorKhan = Unit::GetUnit(*me, instance->GetData64(DATA_LORKHAN)))
|
||||
{
|
||||
pLorKhan->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
pLorKhan->setFaction(14);
|
||||
pLorKhan->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
pLorKhan->SetFullHealth();
|
||||
|
||||
instance->SetData(DATA_LORKHAN, DONE);
|
||||
}
|
||||
}
|
||||
|
||||
if (instance->GetData(DATA_ZATH) == SPECIAL)
|
||||
{
|
||||
//Resurrect Zath
|
||||
Unit* pZath = Unit::GetUnit(*me, instance->GetData64(DATA_ZATH));
|
||||
if (pZath)
|
||||
{
|
||||
pZath->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
pZath->setFaction(14);
|
||||
pZath->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
pZath->SetFullHealth();
|
||||
|
||||
instance->SetData(DATA_ZATH, DONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Check_Timer = 5000;
|
||||
} else Check_Timer -= diff;
|
||||
|
||||
if (!PhaseTwo && MortalCleave_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_MORTALCLEAVE);
|
||||
MortalCleave_Timer = urand(15000, 20000);
|
||||
} else MortalCleave_Timer -= diff;
|
||||
|
||||
if (!PhaseTwo && Silence_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SILENCE);
|
||||
Silence_Timer = urand(20000, 25000);
|
||||
} else Silence_Timer -= diff;
|
||||
|
||||
if (!PhaseTwo && !WasDead && !HealthAbovePct(5))
|
||||
{
|
||||
me->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE_PERCENT);
|
||||
me->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE);
|
||||
me->RemoveAurasByType(SPELL_AURA_PERIODIC_LEECH);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetStandState(UNIT_STAND_STATE_SLEEP);
|
||||
me->AttackStop();
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_THEKAL, SPECIAL);
|
||||
|
||||
WasDead=true;
|
||||
}
|
||||
|
||||
//Thekal will transform to Tiger if he died and was not resurrected after 10 seconds.
|
||||
if (!PhaseTwo && WasDead)
|
||||
{
|
||||
if (Resurrect_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_TIGER_FORM);
|
||||
me->SetObjectScale(2.00f);
|
||||
me->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetFullHealth();
|
||||
const CreatureTemplate* cinfo = me->GetCreatureTemplate();
|
||||
me->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 40)));
|
||||
me->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 40)));
|
||||
me->UpdateDamagePhysical(BASE_ATTACK);
|
||||
DoResetThreat();
|
||||
PhaseTwo = true;
|
||||
} else Resurrect_Timer -= diff;
|
||||
}
|
||||
|
||||
if (me->IsFullHealth() && WasDead)
|
||||
{
|
||||
WasDead = false;
|
||||
}
|
||||
|
||||
if (PhaseTwo)
|
||||
{
|
||||
if (Charge_Timer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
DoCast(target, SPELL_CHARGE);
|
||||
DoResetThreat();
|
||||
AttackStart(target);
|
||||
}
|
||||
|
||||
Charge_Timer = urand(15000, 22000);
|
||||
} else Charge_Timer -= diff;
|
||||
|
||||
if (Frenzy_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_FRENZY);
|
||||
Frenzy_Timer = 30000;
|
||||
} else Frenzy_Timer -= diff;
|
||||
|
||||
if (ForcePunch_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SILENCE);
|
||||
ForcePunch_Timer = urand(16000, 21000);
|
||||
} else ForcePunch_Timer -= diff;
|
||||
|
||||
if (SummonTigers_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SUMMONTIGERS);
|
||||
SummonTigers_Timer = urand(10000, 14000);
|
||||
} else SummonTigers_Timer -= diff;
|
||||
|
||||
if (HealthBelowPct(11) && !Enraged)
|
||||
{
|
||||
DoCast(me, SPELL_ENRAGE);
|
||||
Enraged = true;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_thekalAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
//Zealot Lor'Khan
|
||||
class mob_zealot_lorkhan : public CreatureScript
|
||||
{
|
||||
public:
|
||||
|
||||
mob_zealot_lorkhan()
|
||||
: CreatureScript("mob_zealot_lorkhan")
|
||||
{
|
||||
}
|
||||
|
||||
struct mob_zealot_lorkhanAI : public ScriptedAI
|
||||
{
|
||||
mob_zealot_lorkhanAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
uint32 Shield_Timer;
|
||||
uint32 BloodLust_Timer;
|
||||
uint32 GreaterHeal_Timer;
|
||||
uint32 Disarm_Timer;
|
||||
uint32 Check_Timer;
|
||||
|
||||
bool FakeDeath;
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
Shield_Timer = 1000;
|
||||
BloodLust_Timer = 16000;
|
||||
GreaterHeal_Timer = 32000;
|
||||
Disarm_Timer = 6000;
|
||||
Check_Timer = 10000;
|
||||
|
||||
FakeDeath = false;
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_LORKHAN, NOT_STARTED);
|
||||
|
||||
me->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI (const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//Shield_Timer
|
||||
if (Shield_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_SHIELD);
|
||||
Shield_Timer = 61000;
|
||||
} else Shield_Timer -= diff;
|
||||
|
||||
//BloodLust_Timer
|
||||
if (BloodLust_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_BLOODLUST);
|
||||
BloodLust_Timer = 20000+rand()%8000;
|
||||
} else BloodLust_Timer -= diff;
|
||||
|
||||
//Casting Greaterheal to Thekal or Zath if they are in meele range.
|
||||
if (GreaterHeal_Timer <= diff)
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
Unit* pThekal = Unit::GetUnit(*me, instance->GetData64(DATA_THEKAL));
|
||||
Unit* pZath = Unit::GetUnit(*me, instance->GetData64(DATA_ZATH));
|
||||
|
||||
if (!pThekal || !pZath)
|
||||
return;
|
||||
|
||||
switch (urand(0, 1))
|
||||
{
|
||||
case 0:
|
||||
if (me->IsWithinMeleeRange(pThekal))
|
||||
DoCast(pThekal, SPELL_GREATERHEAL);
|
||||
break;
|
||||
case 1:
|
||||
if (me->IsWithinMeleeRange(pZath))
|
||||
DoCast(pZath, SPELL_GREATERHEAL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
GreaterHeal_Timer = 15000+rand()%5000;
|
||||
} else GreaterHeal_Timer -= diff;
|
||||
|
||||
//Disarm_Timer
|
||||
if (Disarm_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_DISARM);
|
||||
Disarm_Timer = 15000+rand()%10000;
|
||||
} else Disarm_Timer -= diff;
|
||||
|
||||
//Check_Timer for the death of LorKhan and Zath.
|
||||
if (!FakeDeath && Check_Timer <= diff)
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
if (instance->GetData(DATA_THEKAL) == SPECIAL)
|
||||
{
|
||||
//Resurrect Thekal
|
||||
if (Unit* pThekal = Unit::GetUnit(*me, instance->GetData64(DATA_THEKAL)))
|
||||
{
|
||||
pThekal->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
pThekal->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
pThekal->setFaction(14);
|
||||
pThekal->SetFullHealth();
|
||||
}
|
||||
}
|
||||
|
||||
if (instance->GetData(DATA_ZATH) == SPECIAL)
|
||||
{
|
||||
//Resurrect Zath
|
||||
if (Unit* pZath = Unit::GetUnit(*me, instance->GetData64(DATA_ZATH)))
|
||||
{
|
||||
pZath->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
pZath->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
pZath->setFaction(14);
|
||||
pZath->SetFullHealth();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Check_Timer = 5000;
|
||||
} else Check_Timer -= diff;
|
||||
|
||||
if (!HealthAbovePct(5))
|
||||
{
|
||||
me->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE_PERCENT);
|
||||
me->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE);
|
||||
me->RemoveAurasByType(SPELL_AURA_PERIODIC_LEECH);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetStandState(UNIT_STAND_STATE_SLEEP);
|
||||
me->setFaction(35);
|
||||
me->AttackStop();
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_LORKHAN, SPECIAL);
|
||||
|
||||
FakeDeath = true;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new mob_zealot_lorkhanAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
//Zealot Zath
|
||||
class mob_zealot_zath : public CreatureScript
|
||||
{
|
||||
public:
|
||||
|
||||
mob_zealot_zath()
|
||||
: CreatureScript("mob_zealot_zath")
|
||||
{
|
||||
}
|
||||
|
||||
struct mob_zealot_zathAI : public ScriptedAI
|
||||
{
|
||||
mob_zealot_zathAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
uint32 SweepingStrikes_Timer;
|
||||
uint32 SinisterStrike_Timer;
|
||||
uint32 Gouge_Timer;
|
||||
uint32 Kick_Timer;
|
||||
uint32 Blind_Timer;
|
||||
uint32 Check_Timer;
|
||||
|
||||
bool FakeDeath;
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
SweepingStrikes_Timer = 13000;
|
||||
SinisterStrike_Timer = 8000;
|
||||
Gouge_Timer = 25000;
|
||||
Kick_Timer = 18000;
|
||||
Blind_Timer = 5000;
|
||||
Check_Timer = 10000;
|
||||
|
||||
FakeDeath = false;
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_ZATH, NOT_STARTED);
|
||||
|
||||
me->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI (const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//SweepingStrikes_Timer
|
||||
if (SweepingStrikes_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SWEEPINGSTRIKES);
|
||||
SweepingStrikes_Timer = 22000+rand()%4000;
|
||||
} else SweepingStrikes_Timer -= diff;
|
||||
|
||||
//SinisterStrike_Timer
|
||||
if (SinisterStrike_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SINISTERSTRIKE);
|
||||
SinisterStrike_Timer = 8000+rand()%8000;
|
||||
} else SinisterStrike_Timer -= diff;
|
||||
|
||||
//Gouge_Timer
|
||||
if (Gouge_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_GOUGE);
|
||||
|
||||
if (DoGetThreat(me->getVictim()))
|
||||
DoModifyThreatPercent(me->getVictim(), -100);
|
||||
|
||||
Gouge_Timer = 17000+rand()%10000;
|
||||
} else Gouge_Timer -= diff;
|
||||
|
||||
//Kick_Timer
|
||||
if (Kick_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_KICK);
|
||||
Kick_Timer = 15000+rand()%10000;
|
||||
} else Kick_Timer -= diff;
|
||||
|
||||
//Blind_Timer
|
||||
if (Blind_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_BLIND);
|
||||
Blind_Timer = 10000+rand()%10000;
|
||||
} else Blind_Timer -= diff;
|
||||
|
||||
//Check_Timer for the death of LorKhan and Zath.
|
||||
if (!FakeDeath && Check_Timer <= diff)
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
if (instance->GetData(DATA_LORKHAN) == SPECIAL)
|
||||
{
|
||||
//Resurrect LorKhan
|
||||
if (Unit* pLorKhan = Unit::GetUnit(*me, instance->GetData64(DATA_LORKHAN)))
|
||||
{
|
||||
pLorKhan->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
pLorKhan->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
pLorKhan->setFaction(14);
|
||||
pLorKhan->SetFullHealth();
|
||||
}
|
||||
}
|
||||
|
||||
if (instance->GetData(DATA_THEKAL) == SPECIAL)
|
||||
{
|
||||
//Resurrect Thekal
|
||||
if (Unit* pThekal = Unit::GetUnit(*me, instance->GetData64(DATA_THEKAL)))
|
||||
{
|
||||
pThekal->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
pThekal->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
pThekal->setFaction(14);
|
||||
pThekal->SetFullHealth();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Check_Timer = 5000;
|
||||
} else Check_Timer -= diff;
|
||||
|
||||
if (!HealthAbovePct(5))
|
||||
{
|
||||
me->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE_PERCENT);
|
||||
me->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE);
|
||||
me->RemoveAurasByType(SPELL_AURA_PERIODIC_LEECH);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetStandState(UNIT_STAND_STATE_SLEEP);
|
||||
me->setFaction(35);
|
||||
me->AttackStop();
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_ZATH, SPECIAL);
|
||||
|
||||
FakeDeath = true;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new mob_zealot_zathAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_thekal()
|
||||
{
|
||||
new boss_thekal();
|
||||
new mob_zealot_lorkhan();
|
||||
new mob_zealot_zath();
|
||||
}
|
||||
|
||||
@@ -22,75 +22,22 @@
|
||||
#include "Spell.h"
|
||||
#include "zulgurub.h"
|
||||
|
||||
/*
|
||||
* TODO:
|
||||
* - Fix timers (research some more)
|
||||
*/
|
||||
|
||||
enum Texts
|
||||
enum Yells
|
||||
{
|
||||
SAY_VENOXIS_TRANSFORM = 1, // Let the coils of hate unfurl!
|
||||
SAY_VENOXIS_DEATH = 2, // Ssserenity.. at lassst!
|
||||
};
|
||||
|
||||
enum Spells
|
||||
{
|
||||
// troll form
|
||||
SPELL_THRASH = 3391,
|
||||
SPELL_DISPEL_MAGIC = 23859,
|
||||
SPELL_RENEW = 23895,
|
||||
SPELL_HOLY_NOVA = 23858,
|
||||
SPELL_HOLY_FIRE = 23860,
|
||||
SPELL_HOLY_WRATH = 23979,
|
||||
|
||||
// snake form
|
||||
SPELL_POISON_CLOUD = 23861,
|
||||
SPELL_VENOM_SPIT = 23862,
|
||||
|
||||
SPELL_PARASITIC_SERPENT = 23865,
|
||||
SPELL_SUMMON_PARASITIC_SERPENT = 23866,
|
||||
SPELL_PARASITIC_SERPENT_TRIGGER = 23867,
|
||||
|
||||
// used when swapping event-stages
|
||||
SPELL_VENOXIS_TRANSFORM = 23849, // 50% health - shapechange to cobra
|
||||
SPELL_FRENZY = 8269, // 20% health - frenzy
|
||||
};
|
||||
|
||||
enum NPCs
|
||||
{
|
||||
NPC_PARASITIC_SERPENT = 14884,
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
// troll form
|
||||
EVENT_THRASH = 1,
|
||||
EVENT_DISPEL_MAGIC = 2,
|
||||
EVENT_RENEW = 3,
|
||||
EVENT_HOLY_NOVA = 4,
|
||||
EVENT_HOLY_FIRE = 5,
|
||||
EVENT_HOLY_WRATH = 6,
|
||||
|
||||
// phase-changing
|
||||
EVENT_TRANSFORM = 7,
|
||||
|
||||
// snake form events
|
||||
EVENT_POISON_CLOUD = 8,
|
||||
EVENT_VENOM_SPIT = 9,
|
||||
EVENT_PARASITIC_SERPENT = 10,
|
||||
EVENT_FRENZY = 11,
|
||||
};
|
||||
|
||||
enum Phases
|
||||
{
|
||||
PHASE_ONE = 1, // troll form
|
||||
PHASE_TWO = 2, // snake form
|
||||
};
|
||||
|
||||
class boss_venoxis : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_venoxis() : CreatureScript("boss_venoxis") {}
|
||||
boss_venoxis() : CreatureScript("boss_venoxis") { }
|
||||
|
||||
struct boss_venoxisAI : public BossAI
|
||||
{
|
||||
@@ -100,184 +47,42 @@ class boss_venoxis : public CreatureScript
|
||||
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
summons.DespawnAll();
|
||||
|
||||
// make sure this boss is properly reset
|
||||
instance->SetBossState(DATA_VENOXIS, NOT_STARTED);
|
||||
|
||||
// remove all spells and auras from previous attempts
|
||||
me->RemoveAllAuras();
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
|
||||
// set some internally used variables to their defaults
|
||||
_inMeleeRange = 0;
|
||||
_transformed = false;
|
||||
_frenzied = false;
|
||||
|
||||
events.SetPhase(PHASE_ONE);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
|
||||
instance->SetBossState(DATA_VENOXIS, IN_PROGRESS);
|
||||
|
||||
// Always running events
|
||||
events.ScheduleEvent(EVENT_THRASH, 5000);
|
||||
|
||||
// Phase one events (regular form)
|
||||
events.ScheduleEvent(EVENT_HOLY_NOVA, 5000, 0, PHASE_ONE);
|
||||
events.ScheduleEvent(EVENT_DISPEL_MAGIC, 35000, 0, PHASE_ONE);
|
||||
events.ScheduleEvent(EVENT_HOLY_FIRE, 10000, 0, PHASE_ONE);
|
||||
events.ScheduleEvent(EVENT_RENEW, 30000, 0, PHASE_ONE);
|
||||
events.ScheduleEvent(EVENT_HOLY_WRATH, 60000, 0, PHASE_ONE);
|
||||
|
||||
events.SetPhase(PHASE_ONE);
|
||||
|
||||
// Set zone in combat
|
||||
DoZoneInCombat();
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/)
|
||||
{
|
||||
// check if venoxis is ready to transform
|
||||
if (!_transformed && !HealthAbovePct(50))
|
||||
{
|
||||
_transformed = true;
|
||||
// schedule the event that changes our phase
|
||||
events.ScheduleEvent(EVENT_TRANSFORM, 100);
|
||||
}
|
||||
// we're losing health, bad, go frenzy
|
||||
else if (!_frenzied && !HealthAbovePct(20))
|
||||
{
|
||||
_frenzied = true;
|
||||
events.ScheduleEvent(EVENT_FRENZY, 100);
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
Talk(SAY_VENOXIS_DEATH);
|
||||
// venoxis is dead, mark him as such for the instance
|
||||
instance->SetBossState(DATA_VENOXIS, DONE);
|
||||
me->RemoveAllAuras();
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
void UpdateAI(uint32 const diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
// return back to main code if we're still casting
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
/*
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
// thrash is available in all phases
|
||||
case EVENT_THRASH:
|
||||
DoCast(me, SPELL_THRASH, true);
|
||||
events.ScheduleEvent(EVENT_THRASH, urand(10000, 20000));
|
||||
break;
|
||||
|
||||
// troll form spells and Actions (first part)
|
||||
case EVENT_DISPEL_MAGIC:
|
||||
DoCast(me, SPELL_DISPEL_MAGIC);
|
||||
events.ScheduleEvent(EVENT_DISPEL_MAGIC, urand(15000, 20000), 0, PHASE_ONE);
|
||||
break;
|
||||
case EVENT_RENEW:
|
||||
DoCast(me, SPELL_RENEW);
|
||||
events.ScheduleEvent(EVENT_RENEW, urand(25000, 30000), 0, PHASE_ONE);
|
||||
break;
|
||||
case EVENT_HOLY_NOVA:
|
||||
_inMeleeRange = 0;
|
||||
|
||||
for (uint8 i = 0; i < 10; ++i)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_TOPAGGRO, i))
|
||||
// check if target is within melee-distance
|
||||
if (me->IsWithinMeleeRange(target))
|
||||
++_inMeleeRange;
|
||||
}
|
||||
|
||||
// trigger spellcast only if we have 3 or more targets to affect
|
||||
if (_inMeleeRange >= 3)
|
||||
DoCast(me->getVictim(), SPELL_HOLY_NOVA);
|
||||
|
||||
events.ScheduleEvent(EVENT_HOLY_NOVA, urand(45000, 75000), 0, PHASE_ONE);
|
||||
break;
|
||||
case EVENT_HOLY_FIRE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
|
||||
DoCast(target, SPELL_HOLY_FIRE);
|
||||
events.ScheduleEvent(EVENT_HOLY_FIRE, urand(45000, 60000), 0, PHASE_ONE);
|
||||
break;
|
||||
case EVENT_HOLY_WRATH:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
|
||||
DoCast(target, SPELL_HOLY_WRATH);
|
||||
events.ScheduleEvent(EVENT_HOLY_WRATH, urand(45000, 60000), 0, PHASE_ONE);
|
||||
break;
|
||||
|
||||
//
|
||||
// snake form spells and Actions
|
||||
//
|
||||
|
||||
case EVENT_VENOM_SPIT:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
|
||||
DoCast(target, SPELL_VENOM_SPIT);
|
||||
events.ScheduleEvent(EVENT_VENOM_SPIT, urand(5000, 15000), 0, PHASE_TWO);
|
||||
break;
|
||||
case EVENT_POISON_CLOUD:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
|
||||
DoCast(target, SPELL_POISON_CLOUD);
|
||||
events.ScheduleEvent(EVENT_POISON_CLOUD, urand(15000, 20000), 0, PHASE_TWO);
|
||||
break;
|
||||
case EVENT_PARASITIC_SERPENT:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
|
||||
DoCast(target, SPELL_SUMMON_PARASITIC_SERPENT);
|
||||
events.ScheduleEvent(EVENT_PARASITIC_SERPENT, 15000, 0, PHASE_TWO);
|
||||
break;
|
||||
case EVENT_FRENZY:
|
||||
// frenzy at 20% health
|
||||
DoCast(me, SPELL_FRENZY, true);
|
||||
break;
|
||||
|
||||
//
|
||||
// shape and phase-changing
|
||||
//
|
||||
|
||||
case EVENT_TRANSFORM:
|
||||
// shapeshift at 50% health
|
||||
DoCast(me, SPELL_VENOXIS_TRANSFORM);
|
||||
Talk(SAY_VENOXIS_TRANSFORM);
|
||||
DoResetThreat();
|
||||
|
||||
// phase two events (snakeform)
|
||||
events.ScheduleEvent(EVENT_VENOM_SPIT, 5000, 0, PHASE_TWO);
|
||||
events.ScheduleEvent(EVENT_POISON_CLOUD, 10000, 0, PHASE_TWO);
|
||||
events.ScheduleEvent(EVENT_PARASITIC_SERPENT, 30000, 0, PHASE_TWO);
|
||||
|
||||
// transformed, start phase two
|
||||
events.SetPhase(PHASE_TWO);
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
uint8 _inMeleeRange;
|
||||
bool _transformed;
|
||||
bool _frenzied;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
@@ -16,67 +15,65 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Wushoolay
|
||||
SD%Complete: 100
|
||||
SDComment:
|
||||
SDCategory: Zul'Gurub
|
||||
EndScriptData */
|
||||
|
||||
#include "ObjectMgr.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "zulgurub.h"
|
||||
|
||||
#define SPELL_LIGHTNINGCLOUD 25033
|
||||
#define SPELL_LIGHTNINGWAVE 24819
|
||||
enum Yells
|
||||
{
|
||||
};
|
||||
|
||||
enum Spells
|
||||
{
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
};
|
||||
|
||||
class boss_wushoolay : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_wushoolay() : CreatureScript("boss_wushoolay") { }
|
||||
|
||||
boss_wushoolay()
|
||||
: CreatureScript("boss_wushoolay")
|
||||
struct boss_wushoolayAI : public BossAI
|
||||
{
|
||||
}
|
||||
|
||||
struct boss_wushoolayAI : public ScriptedAI
|
||||
{
|
||||
boss_wushoolayAI(Creature* creature) : ScriptedAI(creature) {}
|
||||
|
||||
uint32 LightningCloud_Timer;
|
||||
uint32 LightningWave_Timer;
|
||||
boss_wushoolayAI(Creature* creature) : BossAI(creature, DATA_HAZZARAH)
|
||||
{
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
LightningCloud_Timer = urand(5000, 10000);
|
||||
LightningWave_Timer = urand(8000, 16000);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 const diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//LightningCloud_Timer
|
||||
if (LightningCloud_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_LIGHTNINGCLOUD);
|
||||
LightningCloud_Timer = urand(15000, 20000);
|
||||
} else LightningCloud_Timer -= diff;
|
||||
events.Update(diff);
|
||||
|
||||
//LightningWave_Timer
|
||||
if (LightningWave_Timer <= diff)
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
/*
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
Unit* target = NULL;
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (target) DoCast(target, SPELL_LIGHTNINGWAVE);
|
||||
|
||||
LightningWave_Timer = urand(12000, 16000);
|
||||
} else LightningWave_Timer -= diff;
|
||||
switch (eventId)
|
||||
{
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
@@ -92,4 +89,3 @@ void AddSC_boss_wushoolay()
|
||||
{
|
||||
new boss_wushoolay();
|
||||
}
|
||||
|
||||
|
||||
91
src/server/scripts/EasternKingdoms/ZulGurub/boss_zanzil.cpp
Normal file
91
src/server/scripts/EasternKingdoms/ZulGurub/boss_zanzil.cpp
Normal file
@@ -0,0 +1,91 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ObjectMgr.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "zulgurub.h"
|
||||
|
||||
enum Yells
|
||||
{
|
||||
};
|
||||
|
||||
enum Spells
|
||||
{
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
};
|
||||
|
||||
class boss_zanzil : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_zanzil() : CreatureScript("boss_zanzil") { }
|
||||
|
||||
struct boss_zanzilAI : public BossAI
|
||||
{
|
||||
boss_zanzilAI(Creature* creature) : BossAI(creature, DATA_ZANZIL)
|
||||
{
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 const diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
/*
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_zanzilAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_zanzil()
|
||||
{
|
||||
new boss_zanzil();
|
||||
}
|
||||
@@ -16,13 +16,6 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Instance_ZulGurub
|
||||
SD%Complete: 80
|
||||
SDComment: Missing reset function after killing a boss for Ohgan, Thekal.
|
||||
SDCategory: Zul'Gurub
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "zulgurub.h"
|
||||
@@ -30,128 +23,186 @@ EndScriptData */
|
||||
class instance_zulgurub : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_zulgurub()
|
||||
: InstanceMapScript("instance_zulgurub", 309)
|
||||
{
|
||||
}
|
||||
instance_zulgurub() : InstanceMapScript(ZGScriptName, 309) { }
|
||||
|
||||
struct instance_zulgurub_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_zulgurub_InstanceMapScript(Map* map) : InstanceScript(map) {}
|
||||
|
||||
//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()
|
||||
instance_zulgurub_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
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;
|
||||
SetBossNumber(EncounterCount);
|
||||
venoxisGUID = 0;
|
||||
mandokirGUID = 0;
|
||||
kilnaraGUID = 0;
|
||||
zanzilGUID = 0;
|
||||
jindoGUID = 0;
|
||||
hazzarahGUID = 0;
|
||||
renatakiGUID = 0;
|
||||
wushoolayGUID = 0;
|
||||
grilekGUID = 0;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature)
|
||||
{
|
||||
switch (creature->GetEntry())
|
||||
{
|
||||
case 11347: m_uiLorKhanGUID = creature->GetGUID(); break;
|
||||
case 11348: m_uiZathGUID = creature->GetGUID(); break;
|
||||
case 14509: m_uiThekalGUID = creature->GetGUID(); break;
|
||||
case 11380: m_uiJindoGUID = creature->GetGUID(); break;
|
||||
case NPC_VENOXIS:
|
||||
venoxisGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_MANDOKIR:
|
||||
mandokirGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_KILNARA:
|
||||
kilnaraGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_ZANZIL:
|
||||
zanzilGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_JINDO:
|
||||
jindoGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_HAZZARAH:
|
||||
hazzarahGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_RENATAKI:
|
||||
renatakiGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_WUSHOOLAY:
|
||||
wushoolayGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_GRILEK:
|
||||
grilekGUID = creature->GetGUID();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void SetData(uint32 uiType, uint32 uiData)
|
||||
bool SetBossState(uint32 type, EncounterState state)
|
||||
{
|
||||
switch (uiType)
|
||||
if (!InstanceScript::SetBossState(type, state))
|
||||
return false;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case DATA_ARLOKK:
|
||||
m_auiEncounter[0] = uiData;
|
||||
break;
|
||||
case DATA_VENOXIS:
|
||||
case DATA_MANDOKIR:
|
||||
case DATA_KILNARA:
|
||||
case DATA_ZANZIL:
|
||||
case DATA_JINDO:
|
||||
case DATA_HAZZARAH:
|
||||
case DATA_RENATAKI:
|
||||
case DATA_WUSHOOLAY:
|
||||
case DATA_GRILEK:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
case DATA_JEKLIK:
|
||||
m_auiEncounter[1] = uiData;
|
||||
break;
|
||||
|
||||
case DATA_VENOXIS:
|
||||
m_auiEncounter[2] = uiData;
|
||||
break;
|
||||
|
||||
case DATA_MARLI:
|
||||
m_auiEncounter[3] = uiData;
|
||||
break;
|
||||
|
||||
case DATA_THEKAL:
|
||||
m_auiEncounter[4] = uiData;
|
||||
break;
|
||||
|
||||
case DATA_LORKHAN:
|
||||
m_auiEncounter[5] = uiData;
|
||||
break;
|
||||
|
||||
case DATA_ZATH:
|
||||
m_auiEncounter[6] = uiData;
|
||||
break;
|
||||
|
||||
case DATA_OHGAN:
|
||||
m_auiEncounter[7] = uiData;
|
||||
break;
|
||||
/*
|
||||
void SetData(uint32 type, uint32 data)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 uiType)
|
||||
uint32 GetData(uint32 type)
|
||||
{
|
||||
switch (uiType)
|
||||
switch (type)
|
||||
{
|
||||
case DATA_ARLOKK:
|
||||
return m_auiEncounter[0];
|
||||
case DATA_JEKLIK:
|
||||
return m_auiEncounter[1];
|
||||
case DATA_VENOXIS:
|
||||
return m_auiEncounter[2];
|
||||
case DATA_MARLI:
|
||||
return m_auiEncounter[3];
|
||||
case DATA_THEKAL:
|
||||
return m_auiEncounter[4];
|
||||
case DATA_LORKHAN:
|
||||
return m_auiEncounter[5];
|
||||
case DATA_ZATH:
|
||||
return m_auiEncounter[6];
|
||||
case DATA_OHGAN:
|
||||
return m_auiEncounter[7];
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
*/
|
||||
|
||||
uint64 GetData64(uint32 uiData)
|
||||
uint64 GetData64(uint32 type)
|
||||
{
|
||||
switch (uiData)
|
||||
switch (type)
|
||||
{
|
||||
case DATA_LORKHAN:
|
||||
return m_uiLorKhanGUID;
|
||||
case DATA_ZATH:
|
||||
return m_uiZathGUID;
|
||||
case DATA_THEKAL:
|
||||
return m_uiThekalGUID;
|
||||
case DATA_VENOXIS:
|
||||
return venoxisGUID;
|
||||
case DATA_MANDOKIR:
|
||||
return mandokirGUID;
|
||||
case DATA_KILNARA:
|
||||
return kilnaraGUID;
|
||||
case DATA_ZANZIL:
|
||||
return zanzilGUID;
|
||||
case DATA_JINDO:
|
||||
return m_uiJindoGUID;
|
||||
return jindoGUID;
|
||||
case DATA_HAZZARAH:
|
||||
return hazzarahGUID;
|
||||
case DATA_RENATAKI:
|
||||
return renatakiGUID;
|
||||
case DATA_WUSHOOLAY:
|
||||
return wushoolayGUID;
|
||||
case DATA_GRILEK:
|
||||
return grilekGUID;
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::string GetSaveData()
|
||||
{
|
||||
OUT_SAVE_INST_DATA;
|
||||
|
||||
std::ostringstream saveStream;
|
||||
saveStream << "Z G " << GetBossSaveData();
|
||||
|
||||
OUT_SAVE_INST_DATA_COMPLETE;
|
||||
return saveStream.str();
|
||||
}
|
||||
|
||||
void Load(char const* str)
|
||||
{
|
||||
if (!str)
|
||||
{
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
return;
|
||||
}
|
||||
|
||||
OUT_LOAD_INST_DATA(str);
|
||||
|
||||
char dataHead1, dataHead2;
|
||||
|
||||
std::istringstream loadStream(str);
|
||||
loadStream >> dataHead1 >> dataHead2;
|
||||
|
||||
if (dataHead1 == 'Z' && dataHead2 == 'G')
|
||||
{
|
||||
for (uint8 i = 0; i < EncounterCount; ++i)
|
||||
{
|
||||
uint32 tmpState;
|
||||
loadStream >> tmpState;
|
||||
if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
|
||||
tmpState = NOT_STARTED;
|
||||
|
||||
SetBossState(i, EncounterState(tmpState));
|
||||
}
|
||||
}
|
||||
else
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
}
|
||||
|
||||
protected:
|
||||
uint64 venoxisGUID;
|
||||
uint64 mandokirGUID;
|
||||
uint64 kilnaraGUID;
|
||||
uint64 zanzilGUID;
|
||||
uint64 jindoGUID;
|
||||
uint64 hazzarahGUID;
|
||||
uint64 renatakiGUID;
|
||||
uint64 wushoolayGUID;
|
||||
uint64 grilekGUID;
|
||||
};
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const
|
||||
|
||||
@@ -19,20 +19,49 @@
|
||||
#ifndef DEF_ZULGURUB_H
|
||||
#define DEF_ZULGURUB_H
|
||||
|
||||
#define ZGScriptName "instance_zulgurub"
|
||||
|
||||
uint32 const EncounterCount = 5;
|
||||
|
||||
enum DataTypes
|
||||
{
|
||||
MAX_ENCOUNTERS = 8,
|
||||
DATA_VENOXIS = 0,
|
||||
DATA_MANDOKIR = 1,
|
||||
DATA_KILNARA = 2,
|
||||
DATA_ZANZIL = 3,
|
||||
DATA_JINDO = 4,
|
||||
|
||||
DATA_ARLOKK = 1,
|
||||
DATA_JEKLIK = 2,
|
||||
DATA_VENOXIS = 3,
|
||||
DATA_MARLI = 4,
|
||||
DATA_OHGAN = 5,
|
||||
DATA_THEKAL = 6,
|
||||
DATA_ZATH = 7,
|
||||
DATA_LORKHAN = 8,
|
||||
DATA_JINDO = 10,
|
||||
// Cache of Madness
|
||||
DATA_HAZZARAH = 5,
|
||||
DATA_RENATAKI = 6,
|
||||
DATA_WUSHOOLAY = 7,
|
||||
DATA_GRILEK = 8,
|
||||
};
|
||||
|
||||
enum CreatureIds
|
||||
{
|
||||
NPC_VENOXIS = 52155,
|
||||
NPC_MANDOKIR = 52151,
|
||||
NPC_KILNARA = 52059,
|
||||
NPC_ZANZIL = 52053,
|
||||
NPC_JINDO = 52148,
|
||||
|
||||
// Cache of Madness
|
||||
NPC_HAZZARAH = 52271,
|
||||
NPC_RENATAKI = 52269,
|
||||
NPC_WUSHOOLAY = 52286,
|
||||
NPC_GRILEK = 52258,
|
||||
};
|
||||
|
||||
template<class AI>
|
||||
CreatureAI* GetZulGurubCitadelAI(Creature* creature)
|
||||
{
|
||||
if (InstanceMap* instance = creature->GetMap()->ToInstanceMap())
|
||||
if (instance->GetInstanceScript())
|
||||
if (instance->GetScriptId() == sObjectMgr->GetScriptId(ZGScriptName))
|
||||
return new AI(creature);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user