This commit is contained in:
Subv
2012-12-24 09:00:07 -05:00
7 changed files with 1 additions and 2020 deletions

View File

@@ -173,8 +173,6 @@ void BattlegroundMgr::BuildBattlegroundStatusPacket(WorldPacket *data, Battlegro
data->WriteBit(playerGuid[5]);
data->WriteBit(playerGuid[2]);
data->FlushBits();
data->WriteByteSeq(playerGuid[5]);
data->WriteByteSeq(playerGuid[6]);
data->WriteByteSeq(playerGuid[7]);
@@ -274,8 +272,6 @@ void BattlegroundMgr::BuildBattlegroundStatusPacket(WorldPacket *data, Battlegro
data->WriteBit(bgGuid[5]);
data->WriteBit(playerGuid[0]);
data->FlushBits();
data->WriteByteSeq(bgGuid[6]);
data->WriteByteSeq(bgGuid[5]);
data->WriteByteSeq(bgGuid[7]);
@@ -346,7 +342,7 @@ void BattlegroundMgr::BuildBattlegroundStatusPacket(WorldPacket *data, Battlegro
data->WriteByteSeq(playerGuid[0]);
data->WriteByteSeq(playerGuid[3]);
data->WriteByteSeq(playerGuid[2]);
data->WriteByteSeq(bgGuid[2]);
*data << uint32(bg->GetClientInstanceID()); // Client Instance ID or faction ?

View File

@@ -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 = 0,
SAY_FEAST_PANTHER = 1,
SAY_DEATH = 2,
};
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*/)
{
Talk(SAY_AGGRO);
}
void JustReachedHome()
{
if (instance)
instance->SetData(DATA_ARLOKK, NOT_STARTED);
//we should be summoned, so despawn
me->DespawnOrUnsummon();
}
void JustDied(Unit* /*killer*/)
{
Talk(SAY_DEATH);
me->SetDisplayId(MODEL_ID_NORMAL);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
if (instance)
instance->SetData(DATA_ARLOKK, DONE);
}
void DoSummonPhanters()
{
if (MarkedTargetGUID)
Talk(SAY_FEAST_PANTHER, MarkedTargetGUID);
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();
}

View File

@@ -1,262 +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"
enum Hakkar
{
SAY_AGGRO = 0,
SAY_FLEEING = 1,
SAY_MINION_DESTROY = 2, //where does it belong?
SAY_PROTECT_ALTAR = 3, //where does it belong?
SPELL_BLOODSIPHON = 24322,
SPELL_CORRUPTEDBLOOD = 24328,
SPELL_CAUSEINSANITY = 24327, //Not working disabled.
SPELL_WILLOFHAKKAR = 24178,
SPELL_ENRAGE = 24318,
// The Aspects of all High Priests
SPELL_ASPECT_OF_JEKLIK = 24687,
SPELL_ASPECT_OF_VENOXIS = 24688,
SPELL_ASPECT_OF_MARLI = 24686,
SPELL_ASPECT_OF_THEKAL = 24689,
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*/)
{
Talk(SAY_AGGRO);
}
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();
}

View File

@@ -1,308 +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"
enum Jeklik
{
SAY_AGGRO = 0,
SAY_RAIN_FIRE = 1,
SAY_DEATH = 2,
SPELL_CHARGE = 22911,
SPELL_SONICBURST = 23918,
SPELL_SCREECH = 6605,
SPELL_SHADOW_WORD_PAIN = 23952,
SPELL_MIND_FLAY = 23953,
SPELL_CHAIN_MIND_FLAY = 26044, //Right ID unknown. So disabled
SPELL_GREATERHEAL = 23954,
SPELL_BAT_FORM = 23966,
// Batriders Spell
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*/)
{
Talk(SAY_AGGRO);
DoCast(me, SPELL_BAT_FORM);
}
void JustDied(Unit* /*killer*/)
{
Talk(SAY_DEATH);
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();
}

View File

@@ -1,286 +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"
enum Jindo
{
SAY_AGGRO = 1,
SPELL_BRAINWASHTOTEM = 24262,
SPELL_POWERFULLHEALINGWARD = 24309, //We will not use this spell. We will summon a totem by script cause the spell totems will not cast.
SPELL_HEX = 24053,
SPELL_DELUSIONSOFJINDO = 24306,
SPELL_SHADEOFJINDO = 24308, //We will not use this spell. We will summon a shade by script.
//Healing Ward Spell
SPELL_HEAL = 38588, //Totems are not working right. Right heal spell ID is 24311 but this spell is not casting...
//Shade of Jindo Spell
SPELL_SHADOWSHOCK = 19460,
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*/)
{
Talk(SAY_AGGRO);
}
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();
}

View File

@@ -1,278 +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"
enum Marli
{
SAY_AGGRO = 0,
SAY_TRANSFORM = 1,
SAY_SPIDER_SPAWN = 2,
SAY_DEATH = 3,
SPELL_CHARGE = 22911,
SPELL_ASPECT_OF_MARLI = 24686, // A stun spell
SPELL_ENVOLWINGWEB = 24110,
SPELL_POISONVOLLEY = 24099,
SPELL_SPIDER_FORM = 24084,
//The Spider Spells
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*/)
{
Talk(SAY_AGGRO);
}
void JustDied(Unit* /*killer*/)
{
Talk(SAY_DEATH);
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)
{
Talk(SAY_SPIDER_SPAWN);
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)
{
Talk(SAY_TRANSFORM);
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();
}

View File

@@ -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"
enum Thekal
{
SAY_AGGRO = 0,
SAY_DEATH = 1,
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*/)
{
Talk(SAY_AGGRO);
}
void JustDied(Unit* /*killer*/)
{
Talk(SAY_DEATH);
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();
}