mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 02:25:38 +01:00
Implemented basic support instance Trial of the Champion. original autor Syntec, thx destros.
--HG-- branch : trunk
This commit is contained in:
13
sql/updates/6771_world_scriptnames.sql
Normal file
13
sql/updates/6771_world_scriptnames.sql
Normal file
@@ -0,0 +1,13 @@
|
||||
-- Trial of the Champion
|
||||
UPDATE instance_template SET script='instance_trial_of_the_champion' WHERE map=650;
|
||||
UPDATE creature_template SET npcflag=1, scriptname='npc_toc5_announcer' WHERE entry IN (35004, 35005);
|
||||
UPDATE creature_template SET scriptname='mob_toc5_warrior' WHERE entry IN (34705, 35572);
|
||||
UPDATE creature_template SET scriptname='mob_toc5_mage' WHERE entry IN (34702, 35569);
|
||||
UPDATE creature_template SET scriptname='mob_toc5_shaman' WHERE entry IN (34701, 35571);
|
||||
UPDATE creature_template SET scriptname='mob_toc5_hunter' WHERE entry IN (34657, 35570);
|
||||
UPDATE creature_template SET scriptname='mob_toc5_rogue' WHERE entry IN (34703, 35617);
|
||||
UPDATE creature_template SET scriptname='boss_eadric' WHERE entry=35119;
|
||||
UPDATE creature_template SET scriptname='boss_paletress' WHERE entry=34928;
|
||||
UPDATE creature_template SET scriptname='mob_toc5_memory' WHERE entry IN (35052, 35041, 35033, 35046, 35043, 35047, 35044, 35039, 35034, 35049, 35030, 34942, 35050, 35042, 35045, 35037, 35031, 35038, 35029, 35048, 35032, 35028, 35040, 35036, 35051);
|
||||
UPDATE creature_template SET scriptname='mob_toc5_risen_ghoul' WHERE entry IN (35545, 35564);
|
||||
UPDATE creature_template SET scriptname='boss_black_knight' WHERE entry=35451;
|
||||
@@ -311,6 +311,12 @@ SET(trinityscript_LIB_SRCS
|
||||
scripts/northrend/azjol_nerub/ahnkahet/boss_herald_volazj.cpp
|
||||
scripts/northrend/azjol_nerub/ahnkahet/boss_amanitar.cpp
|
||||
scripts/northrend/azjol_nerub/ahnkahet/ahnkahet.h
|
||||
scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp
|
||||
scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp
|
||||
scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp
|
||||
scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp
|
||||
scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp
|
||||
scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h
|
||||
scripts/northrend/draktharon_keep/instance_drak_tharon_keep.cpp
|
||||
scripts/northrend/draktharon_keep/boss_trollgore.cpp
|
||||
scripts/northrend/draktharon_keep/boss_novos.cpp
|
||||
@@ -550,4 +556,3 @@ target_link_libraries(trinityscript)
|
||||
|
||||
set_target_properties(trinityscript PROPERTIES VERSION 4.2.0 SOVERSION 4)
|
||||
install(TARGETS trinityscript DESTINATION lib)
|
||||
|
||||
|
||||
@@ -1783,6 +1783,34 @@
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Trial of the Champion"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\scripts\northrend\crusaders_coliseum\trial_of_the_champion\boss_argent_challenge.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\scripts\northrend\crusaders_coliseum\trial_of_the_champion\boss_black_knight.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\scripts\northrend\crusaders_coliseum\trial_of_the_champion\boss_grand_champions.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\scripts\northrend\crusaders_coliseum\trial_of_the_champion\instance_trial_of_the_champion.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\scripts\northrend\crusaders_coliseum\trial_of_the_champion\trial_of_the_champion.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\scripts\northrend\crusaders_coliseum\trial_of_the_champion\trial_of_the_champion.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Gundrak"
|
||||
>
|
||||
|
||||
@@ -0,0 +1,557 @@
|
||||
/* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: boss_argent_challenge
|
||||
SD%Complete: 92%
|
||||
SDComment: missing yells. radiance is "wrong"
|
||||
SDCategory: Trial Of the Champion
|
||||
EndScriptData */
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "trial_of_the_champion.h"
|
||||
|
||||
enum
|
||||
{
|
||||
//yells
|
||||
|
||||
//eadric
|
||||
SPELL_VENGEANCE = 66889,
|
||||
SPELL_RADIANCE = 66862,
|
||||
SPELL_RADIANCE_H = 67681,
|
||||
SPELL_HAMMER_OF_JUSTICE = 66940,
|
||||
SPELL_HAMMER = 67680,
|
||||
//paletress
|
||||
SPELL_SMITE = 66536,
|
||||
SPELL_SMITE_H = 67674,
|
||||
SPELL_HOLY_FIRE = 66538,
|
||||
SPELL_HOLY_FIRE_H = 67676,
|
||||
SPELL_RENEW = 66537,
|
||||
SPELL_RENEW_H = 67675,
|
||||
SPELL_HOLY_NOVA = 66546,
|
||||
SPELL_SHIELD = 66515,
|
||||
SPELL_CONFESS = 66547,
|
||||
//memory
|
||||
SPELL_FEAR = 66552,
|
||||
SPELL_FEAR_H = 67677,
|
||||
SPELL_SHADOWS = 66619,
|
||||
SPELL_SHADOWS_H = 67678,
|
||||
SPELL_OLD_WOUNDS = 66620,
|
||||
SPELL_OLD_WOUNDS_H = 67679,
|
||||
};
|
||||
|
||||
// Eadric The Pure
|
||||
struct TRINITY_DLL_DECL boss_eadricAI : public ScriptedAI
|
||||
{
|
||||
boss_eadricAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
{
|
||||
Reset();
|
||||
m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData();
|
||||
}
|
||||
|
||||
ScriptedInstance* m_pInstance;
|
||||
bool m_bIsRegularMode;
|
||||
|
||||
uint32 Vengeance_Timer;
|
||||
uint32 Radiance_Timer;
|
||||
uint32 Hammer_Timer;
|
||||
uint32 Hammer_Dmg_Timer;
|
||||
|
||||
uint64 HammerTarget;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
m_creature->SetRespawnDelay(999999999);
|
||||
Vengeance_Timer = 1000;
|
||||
Radiance_Timer = 15000;
|
||||
Hammer_Timer = 40000;
|
||||
Hammer_Dmg_Timer = 45000;
|
||||
HammerTarget = 0;
|
||||
}
|
||||
|
||||
void EnterEvadeMode()
|
||||
{
|
||||
Vengeance_Timer = 1000;
|
||||
Radiance_Timer = 15000;
|
||||
Hammer_Timer = 40000;
|
||||
Hammer_Dmg_Timer = 45000;
|
||||
HammerTarget = 0;
|
||||
m_creature->RemoveArenaAuras(true);
|
||||
m_creature->SendMonsterMove(746.864441, 660.918762, 411.695465, 4.698700, 3, 1);
|
||||
m_creature->GetMap()->CreatureRelocation(m_creature, 754.360779, 660.816162, 412.395996, 4.698700);
|
||||
m_creature->SetHealth(m_creature->GetMaxHealth());
|
||||
}
|
||||
|
||||
void Aggro(Unit* pWho)
|
||||
{
|
||||
if (!m_pInstance)
|
||||
return;
|
||||
if (m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == DONE)
|
||||
m_creature->ForcedDespawn();
|
||||
else
|
||||
m_pInstance->SetData(TYPE_ARGENT_CHALLENGE, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit* pKiller)
|
||||
{
|
||||
if (!m_pInstance)
|
||||
return;
|
||||
m_pInstance->SetData(TYPE_ARGENT_CHALLENGE, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectVictim() || !m_creature->getVictim())
|
||||
return;
|
||||
|
||||
if (Vengeance_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_VENGEANCE);
|
||||
Vengeance_Timer = 12000;
|
||||
}else Vengeance_Timer -= diff;
|
||||
|
||||
if (Radiance_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature, m_bIsRegularMode ? SPELL_RADIANCE : SPELL_RADIANCE_H);
|
||||
Radiance_Timer = 20000;
|
||||
}else Radiance_Timer -= diff;
|
||||
|
||||
if (Hammer_Timer < diff)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
{
|
||||
DoCast(target, SPELL_HAMMER_OF_JUSTICE);
|
||||
HammerTarget = target->GetGUID();
|
||||
}
|
||||
Hammer_Timer = 50000;
|
||||
}else Hammer_Timer -= diff;
|
||||
|
||||
if (Hammer_Dmg_Timer < diff)
|
||||
{
|
||||
if (Unit* pHammerTarget = Unit::GetUnit(*m_creature, HammerTarget))
|
||||
DoCast(pHammerTarget, SPELL_HAMMER);
|
||||
Hammer_Dmg_Timer = 50000;
|
||||
}
|
||||
else Hammer_Dmg_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_eadric(Creature* pCreature)
|
||||
{
|
||||
return new boss_eadricAI(pCreature);
|
||||
}
|
||||
|
||||
// Argent Confessor Paletress
|
||||
struct TRINITY_DLL_DECL boss_paletressAI : public ScriptedAI
|
||||
{
|
||||
boss_paletressAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
{
|
||||
Reset();
|
||||
m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData();
|
||||
}
|
||||
|
||||
ScriptedInstance* m_pInstance;
|
||||
bool m_bIsRegularMode;
|
||||
|
||||
uint32 Smite_Timer;
|
||||
uint32 Holy_Fire_Timer;
|
||||
uint32 Renew_Timer;
|
||||
uint32 Shield_Delay;
|
||||
uint32 Shield_Check;
|
||||
|
||||
bool summoned;
|
||||
bool shielded;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
m_creature->SetRespawnDelay(999999999);
|
||||
m_creature->RemoveAurasDueToSpell(SPELL_SHIELD);
|
||||
Smite_Timer = 5000;
|
||||
Holy_Fire_Timer = 10000;
|
||||
Renew_Timer = 7000;
|
||||
Shield_Delay = 0;
|
||||
Shield_Check = 1000;
|
||||
summoned = false;
|
||||
shielded = false;
|
||||
}
|
||||
|
||||
void EnterEvadeMode()
|
||||
{
|
||||
m_creature->RemoveAurasDueToSpell(SPELL_SHIELD);
|
||||
Smite_Timer = 2000;
|
||||
Holy_Fire_Timer = 10000;
|
||||
Renew_Timer = 7000;
|
||||
Shield_Delay = 0;
|
||||
Shield_Check = 1000;
|
||||
summoned = false;
|
||||
shielded = false;
|
||||
m_creature->RemoveArenaAuras(true);
|
||||
m_creature->SendMonsterMove(746.864441, 660.918762, 411.695465, 4.698700, m_creature->GetDefaultMovementType(), 1);
|
||||
m_creature->GetMap()->CreatureRelocation(m_creature, 754.360779, 660.816162, 412.395996, 4.698700);
|
||||
m_creature->SetHealth(m_creature->GetMaxHealth());
|
||||
}
|
||||
|
||||
void Aggro(Unit* pWho)
|
||||
{
|
||||
if (!m_pInstance)
|
||||
return;
|
||||
m_pInstance->SetData(TYPE_ARGENT_CHALLENGE, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit* pKiller)
|
||||
{
|
||||
if (!m_pInstance)
|
||||
return;
|
||||
m_pInstance->SetData(TYPE_ARGENT_CHALLENGE, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectVictim() || !m_creature->getVictim())
|
||||
return;
|
||||
|
||||
if (Smite_Timer < diff)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target, m_bIsRegularMode ? SPELL_SMITE : SPELL_SMITE_H);
|
||||
Smite_Timer = 2000;
|
||||
}else Smite_Timer -= diff;
|
||||
|
||||
if (Holy_Fire_Timer < diff)
|
||||
{
|
||||
m_creature->CastStop(m_bIsRegularMode ? SPELL_SMITE : SPELL_SMITE_H);
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target, m_bIsRegularMode ? SPELL_HOLY_FIRE : SPELL_HOLY_FIRE_H);
|
||||
Holy_Fire_Timer = 10000;
|
||||
}else Holy_Fire_Timer -= diff;
|
||||
|
||||
if (Renew_Timer < diff)
|
||||
{
|
||||
m_creature->CastStop(m_bIsRegularMode ? SPELL_SMITE : SPELL_SMITE_H);
|
||||
m_creature->CastStop(m_bIsRegularMode ? SPELL_HOLY_FIRE : SPELL_HOLY_FIRE_H);
|
||||
switch(urand(0, 1))
|
||||
{
|
||||
case 0:
|
||||
if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_MEMORY))))
|
||||
if (pTemp->isAlive())
|
||||
DoCast(pTemp, m_bIsRegularMode ? SPELL_RENEW : SPELL_RENEW_H);
|
||||
else
|
||||
DoCast(pTemp, m_bIsRegularMode ? SPELL_RENEW : SPELL_RENEW_H);
|
||||
break;
|
||||
case 1:
|
||||
DoCast(m_creature, m_bIsRegularMode ? SPELL_RENEW : SPELL_RENEW_H);
|
||||
break;
|
||||
}
|
||||
Renew_Timer = 15000;
|
||||
}else Renew_Timer -= diff;
|
||||
|
||||
if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 35 && !summoned)
|
||||
{
|
||||
m_creature->CastStop(m_bIsRegularMode ? SPELL_SMITE : SPELL_SMITE_H);
|
||||
m_creature->CastStop(m_bIsRegularMode ? SPELL_HOLY_FIRE : SPELL_HOLY_FIRE_H);
|
||||
DoCast(m_creature, SPELL_HOLY_NOVA);
|
||||
switch(urand(0, 24))
|
||||
{
|
||||
case 0:
|
||||
if (Creature* pTemp = m_creature->SummonCreature(MEMORY_ALGALON, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000))
|
||||
{
|
||||
pTemp->AddThreat(m_creature->getVictim(),1000.0f);
|
||||
pTemp->AI()->AttackStart(m_creature->getVictim());
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (Creature* pTemp = m_creature->SummonCreature(MEMORY_CHROMAGGUS, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000))
|
||||
{
|
||||
pTemp->AddThreat(m_creature->getVictim(),1000.0f);
|
||||
pTemp->AI()->AttackStart(m_creature->getVictim());
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (Creature* pTemp = m_creature->SummonCreature(MEMORY_CYANIGOSA, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000))
|
||||
{
|
||||
pTemp->AddThreat(m_creature->getVictim(),1000.0f);
|
||||
pTemp->AI()->AttackStart(m_creature->getVictim());
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (Creature* pTemp = m_creature->SummonCreature(MEMORY_DELRISSA, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000))
|
||||
{
|
||||
pTemp->AddThreat(m_creature->getVictim(),1000.0f);
|
||||
pTemp->AI()->AttackStart(m_creature->getVictim());
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (Creature* pTemp = m_creature->SummonCreature(MEMORY_ECK, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000))
|
||||
{
|
||||
pTemp->AddThreat(m_creature->getVictim(),1000.0f);
|
||||
pTemp->AI()->AttackStart(m_creature->getVictim());
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (Creature* pTemp = m_creature->SummonCreature(MEMORY_ENTROPIUS, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000))
|
||||
{
|
||||
pTemp->AddThreat(m_creature->getVictim(),1000.0f);
|
||||
pTemp->AI()->AttackStart(m_creature->getVictim());
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
if (Creature* pTemp = m_creature->SummonCreature(MEMORY_GRUUL, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000))
|
||||
{
|
||||
pTemp->AddThreat(m_creature->getVictim(),1000.0f);
|
||||
pTemp->AI()->AttackStart(m_creature->getVictim());
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
if (Creature* pTemp = m_creature->SummonCreature(MEMORY_HAKKAR, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000))
|
||||
{
|
||||
pTemp->AddThreat(m_creature->getVictim(),1000.0f);
|
||||
pTemp->AI()->AttackStart(m_creature->getVictim());
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
if (Creature* pTemp = m_creature->SummonCreature(MEMORY_HEIGAN, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000))
|
||||
{
|
||||
pTemp->AddThreat(m_creature->getVictim(),1000.0f);
|
||||
pTemp->AI()->AttackStart(m_creature->getVictim());
|
||||
}
|
||||
break;
|
||||
case 9:
|
||||
if (Creature* pTemp = m_creature->SummonCreature(MEMORY_HEROD, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000))
|
||||
{
|
||||
pTemp->AddThreat(m_creature->getVictim(),1000.0f);
|
||||
pTemp->AI()->AttackStart(m_creature->getVictim());
|
||||
}
|
||||
break;
|
||||
case 10:
|
||||
if (Creature* pTemp = m_creature->SummonCreature(MEMORY_HOGGER, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000))
|
||||
{
|
||||
pTemp->AddThreat(m_creature->getVictim(),1000.0f);
|
||||
pTemp->AI()->AttackStart(m_creature->getVictim());
|
||||
}
|
||||
break;
|
||||
case 11:
|
||||
if (Creature* pTemp = m_creature->SummonCreature(MEMORY_IGNIS, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000))
|
||||
{
|
||||
pTemp->AddThreat(m_creature->getVictim(),1000.0f);
|
||||
pTemp->AI()->AttackStart(m_creature->getVictim());
|
||||
}
|
||||
break;
|
||||
case 12:
|
||||
if (Creature* pTemp = m_creature->SummonCreature(MEMORY_ILLIDAN, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000))
|
||||
{
|
||||
pTemp->AddThreat(m_creature->getVictim(),1000.0f);
|
||||
pTemp->AI()->AttackStart(m_creature->getVictim());
|
||||
}
|
||||
break;
|
||||
case 13:
|
||||
if (Creature* pTemp = m_creature->SummonCreature(MEMORY_INGVAR, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000))
|
||||
{
|
||||
pTemp->AddThreat(m_creature->getVictim(),1000.0f);
|
||||
pTemp->AI()->AttackStart(m_creature->getVictim());
|
||||
}
|
||||
break;
|
||||
case 14:
|
||||
if (Creature* pTemp = m_creature->SummonCreature(MEMORY_KALITHRESH, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000))
|
||||
{
|
||||
pTemp->AddThreat(m_creature->getVictim(),1000.0f);
|
||||
pTemp->AI()->AttackStart(m_creature->getVictim());
|
||||
}
|
||||
break;
|
||||
case 15:
|
||||
if (Creature* pTemp = m_creature->SummonCreature(MEMORY_LUCIFRON, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000))
|
||||
{
|
||||
pTemp->AddThreat(m_creature->getVictim(),1000.0f);
|
||||
pTemp->AI()->AttackStart(m_creature->getVictim());
|
||||
}
|
||||
break;
|
||||
case 16:
|
||||
if (Creature* pTemp = m_creature->SummonCreature(MEMORY_MALCHEZAAR, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000))
|
||||
{
|
||||
pTemp->AddThreat(m_creature->getVictim(),1000.0f);
|
||||
pTemp->AI()->AttackStart(m_creature->getVictim());
|
||||
}
|
||||
break;
|
||||
case 17:
|
||||
if (Creature* pTemp = m_creature->SummonCreature(MEMORY_MUTANUS, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000))
|
||||
{
|
||||
pTemp->AddThreat(m_creature->getVictim(),1000.0f);
|
||||
pTemp->AI()->AttackStart(m_creature->getVictim());
|
||||
}
|
||||
break;
|
||||
case 18:
|
||||
if (Creature* pTemp = m_creature->SummonCreature(MEMORY_ONYXIA, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000))
|
||||
{
|
||||
pTemp->AddThreat(m_creature->getVictim(),1000.0f);
|
||||
pTemp->AI()->AttackStart(m_creature->getVictim());
|
||||
}
|
||||
break;
|
||||
case 19:
|
||||
if (Creature* pTemp = m_creature->SummonCreature(MEMORY_THUNDERAAN, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000))
|
||||
{
|
||||
pTemp->AddThreat(m_creature->getVictim(),1000.0f);
|
||||
pTemp->AI()->AttackStart(m_creature->getVictim());
|
||||
}
|
||||
break;
|
||||
case 20:
|
||||
if (Creature* pTemp = m_creature->SummonCreature(MEMORY_VANCLEEF, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000))
|
||||
{
|
||||
pTemp->AddThreat(m_creature->getVictim(),1000.0f);
|
||||
pTemp->AI()->AttackStart(m_creature->getVictim());
|
||||
}
|
||||
break;
|
||||
case 21:
|
||||
if (Creature* pTemp = m_creature->SummonCreature(MEMORY_VASHJ, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000))
|
||||
{
|
||||
pTemp->AddThreat(m_creature->getVictim(),1000.0f);
|
||||
pTemp->AI()->AttackStart(m_creature->getVictim());
|
||||
}
|
||||
break;
|
||||
case 22:
|
||||
if (Creature* pTemp = m_creature->SummonCreature(MEMORY_VEKNILASH, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000))
|
||||
{
|
||||
pTemp->AddThreat(m_creature->getVictim(),1000.0f);
|
||||
pTemp->AI()->AttackStart(m_creature->getVictim());
|
||||
}
|
||||
break;
|
||||
case 23:
|
||||
if (Creature* pTemp = m_creature->SummonCreature(MEMORY_VEZAX, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000))
|
||||
{
|
||||
pTemp->AddThreat(m_creature->getVictim(),1000.0f);
|
||||
pTemp->AI()->AttackStart(m_creature->getVictim());
|
||||
}
|
||||
break;
|
||||
case 24:
|
||||
if (Creature* pTemp = m_creature->SummonCreature(MEMORY_ARCHIMONDE, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000))
|
||||
{
|
||||
pTemp->AddThreat(m_creature->getVictim(),1000.0f);
|
||||
pTemp->AI()->AttackStart(m_creature->getVictim());
|
||||
}
|
||||
break;
|
||||
}
|
||||
summoned = true;
|
||||
Shield_Delay = 1000;
|
||||
}
|
||||
|
||||
if (Shield_Delay < diff && !shielded && summoned)
|
||||
{
|
||||
m_creature->CastStop(m_bIsRegularMode ? SPELL_SMITE : SPELL_SMITE_H);
|
||||
m_creature->CastStop(m_bIsRegularMode ? SPELL_HOLY_FIRE : SPELL_HOLY_FIRE_H);
|
||||
DoCast(m_creature, SPELL_SHIELD);
|
||||
shielded = true;
|
||||
Shield_Check = 1000;
|
||||
}else Shield_Delay -= diff;
|
||||
|
||||
if (!m_creature->FindNearestCreature(35052, 200, true) && !m_creature->FindNearestCreature(35041, 200, true) && !m_creature->FindNearestCreature(35033, 200, true) &&
|
||||
!m_creature->FindNearestCreature(35046, 200, true) && !m_creature->FindNearestCreature(35043, 200, true) && !m_creature->FindNearestCreature(35047, 200, true) &&
|
||||
!m_creature->FindNearestCreature(35044, 200, true) && !m_creature->FindNearestCreature(35039, 200, true) && !m_creature->FindNearestCreature(35034, 200, true) &&
|
||||
!m_creature->FindNearestCreature(35049, 200, true) && !m_creature->FindNearestCreature(34942, 200, true) && !m_creature->FindNearestCreature(35030, 200, true) &&
|
||||
!m_creature->FindNearestCreature(35050, 200, true) && !m_creature->FindNearestCreature(35042, 200, true) && !m_creature->FindNearestCreature(35045, 200, true) &&
|
||||
!m_creature->FindNearestCreature(35037, 200, true) && !m_creature->FindNearestCreature(35031, 200, true) && !m_creature->FindNearestCreature(35038, 200, true) &&
|
||||
!m_creature->FindNearestCreature(35029, 200, true) && !m_creature->FindNearestCreature(35048, 200, true) && !m_creature->FindNearestCreature(35032, 200, true) &&
|
||||
!m_creature->FindNearestCreature(35028, 200, true) && !m_creature->FindNearestCreature(35040, 200, true) && !m_creature->FindNearestCreature(35036, 200, true) &&
|
||||
!m_creature->FindNearestCreature(35051, 200, true) && shielded)
|
||||
{
|
||||
m_creature->RemoveAurasDueToSpell(SPELL_SHIELD);
|
||||
shielded = false;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_paletress(Creature* pCreature)
|
||||
{
|
||||
return new boss_paletressAI(pCreature);
|
||||
}
|
||||
|
||||
// Summoned Memory
|
||||
struct TRINITY_DLL_DECL mob_toc5_memoryAI : public ScriptedAI
|
||||
{
|
||||
mob_toc5_memoryAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
{
|
||||
Reset();
|
||||
m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData();
|
||||
}
|
||||
|
||||
ScriptedInstance* m_pInstance;
|
||||
bool m_bIsRegularMode;
|
||||
|
||||
uint32 Old_Wounds_Timer;
|
||||
uint32 Shadows_Timer;
|
||||
uint32 Fear_Timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
Old_Wounds_Timer = 5000;
|
||||
Shadows_Timer = 8000;
|
||||
Fear_Timer = 13000;
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectVictim() || !m_creature->getVictim())
|
||||
return;
|
||||
|
||||
if (Old_Wounds_Timer < diff)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target, m_bIsRegularMode ? SPELL_OLD_WOUNDS : SPELL_OLD_WOUNDS_H);
|
||||
Old_Wounds_Timer = 10000;
|
||||
}else Old_Wounds_Timer -= diff;
|
||||
|
||||
if (Fear_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature, m_bIsRegularMode ? SPELL_FEAR : SPELL_FEAR_H);
|
||||
Fear_Timer = 40000;
|
||||
}else Fear_Timer -= diff;
|
||||
|
||||
if (Shadows_Timer < diff)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1))
|
||||
DoCast(target, m_bIsRegularMode ? SPELL_SHADOWS : SPELL_SHADOWS_H);
|
||||
Shadows_Timer = 10000;
|
||||
}else Shadows_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_mob_toc5_memory(Creature* pCreature)
|
||||
{
|
||||
return new mob_toc5_memoryAI(pCreature);
|
||||
}
|
||||
|
||||
void AddSC_boss_argent_challenge()
|
||||
{
|
||||
Script* NewScript;
|
||||
|
||||
NewScript = new Script;
|
||||
NewScript->Name = "boss_eadric";
|
||||
NewScript->GetAI = &GetAI_boss_eadric;
|
||||
NewScript->RegisterSelf();
|
||||
|
||||
NewScript = new Script;
|
||||
NewScript->Name = "boss_paletress";
|
||||
NewScript->GetAI = &GetAI_boss_paletress;
|
||||
NewScript->RegisterSelf();
|
||||
|
||||
NewScript = new Script;
|
||||
NewScript->Name = "mob_toc5_memory";
|
||||
NewScript->GetAI = &GetAI_mob_toc5_memory;
|
||||
NewScript->RegisterSelf();
|
||||
}
|
||||
@@ -0,0 +1,315 @@
|
||||
/* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: boss_black_knight
|
||||
SD%Complete: 92%
|
||||
SDComment: missing yells. not sure about timers.
|
||||
SDCategory: Trial Of the Champion
|
||||
EndScriptData */
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "trial_of_the_champion.h"
|
||||
|
||||
enum
|
||||
{
|
||||
//yells
|
||||
|
||||
//undead
|
||||
SPELL_PLAGUE_STRIKE = 67724,
|
||||
SPELL_PLAGUE_STRIKE_H = 67884,
|
||||
SPELL_ICY_TOUCH = 67718,
|
||||
SPELL_ICY_TOUCH_H = 67881,
|
||||
SPELL_OBLITERATE = 67725,
|
||||
SPELL_OBLITERATE_H = 67883,
|
||||
SPELL_CHOKE = 68306,
|
||||
//skeleton
|
||||
SPELL_ARMY = 42650, //replacing original one, since that one spawns millions of ghouls!!
|
||||
//ghost
|
||||
SPELL_DEATH = 67808,
|
||||
SPELL_DEATH_H = 67875,
|
||||
SPELL_MARK = 67823,
|
||||
|
||||
//risen ghoul
|
||||
SPELL_CLAW = 67879,
|
||||
SPELL_EXPLODE = 67729,
|
||||
SPELL_EXPLODE_H = 67886,
|
||||
SPELL_LEAP = 67749,
|
||||
SPELL_LEAP_H = 67880,
|
||||
|
||||
//sword ID
|
||||
EQUIP_SWORD = 40343
|
||||
};
|
||||
|
||||
// Risen Ghoul
|
||||
struct TRINITY_DLL_DECL mob_toc5_risen_ghoulAI : public ScriptedAI
|
||||
{
|
||||
mob_toc5_risen_ghoulAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
{
|
||||
Reset();
|
||||
m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData();
|
||||
}
|
||||
|
||||
ScriptedInstance* m_pInstance;
|
||||
bool m_bIsRegularMode;
|
||||
|
||||
uint32 Attack;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
Attack = 2500;
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectVictim() || !m_creature->getVictim())
|
||||
return;
|
||||
|
||||
if (Attack < diff)
|
||||
{
|
||||
if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_BLACK_KNIGHT))))
|
||||
if (pTemp->isAlive())
|
||||
if ((pTemp->GetHealth()*100 / pTemp->GetMaxHealth()) < 25)
|
||||
DoCast(m_creature, m_bIsRegularMode ? SPELL_EXPLODE : SPELL_EXPLODE_H);
|
||||
if (m_creature->IsWithinDistInMap(m_creature->getVictim(), 4))
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_CLAW);
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1))
|
||||
m_creature->AI()->AttackStart(target);
|
||||
Attack = 2500;
|
||||
}else
|
||||
if (m_creature->IsWithinDistInMap(m_creature->getVictim(), 30))
|
||||
{
|
||||
DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_LEAP : SPELL_LEAP_H);
|
||||
Attack = 2500;
|
||||
}
|
||||
}else Attack -= diff;
|
||||
|
||||
if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 25)
|
||||
DoCast(m_creature, m_bIsRegularMode ? SPELL_EXPLODE : SPELL_EXPLODE_H);
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_mob_toc5_risen_ghoul(Creature* pCreature)
|
||||
{
|
||||
return new mob_toc5_risen_ghoulAI(pCreature);
|
||||
}
|
||||
|
||||
// The Black Knight
|
||||
struct TRINITY_DLL_DECL boss_black_knightAI : public ScriptedAI
|
||||
{
|
||||
boss_black_knightAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
{
|
||||
Reset();
|
||||
m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData();
|
||||
}
|
||||
|
||||
ScriptedInstance* m_pInstance;
|
||||
bool m_bIsRegularMode;
|
||||
|
||||
uint32 Plague_Strike_Timer;
|
||||
uint32 Icy_Touch_Timer;
|
||||
uint32 Obliterate_Timer;
|
||||
uint32 Choke_Timer;
|
||||
uint32 Death_Timer;
|
||||
uint32 Mark_Timer;
|
||||
uint32 Phase_Delay;
|
||||
uint32 Summon_Ghoul;
|
||||
|
||||
bool phase1;
|
||||
bool phase2;
|
||||
bool phase3;
|
||||
bool ghoul;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
m_creature->SetRespawnDelay(999999999);
|
||||
m_creature->SetDisplayId(29837);
|
||||
SetEquipmentSlots(false, EQUIP_SWORD, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE);
|
||||
Plague_Strike_Timer = 5000;
|
||||
Icy_Touch_Timer = 10000;
|
||||
Obliterate_Timer = 16000;
|
||||
Choke_Timer = 15000;
|
||||
Summon_Ghoul = 4000;
|
||||
phase1 = true;
|
||||
phase2 = false;
|
||||
phase3 = false;
|
||||
ghoul = false;
|
||||
}
|
||||
|
||||
void EnterEvadeMode()
|
||||
{
|
||||
m_creature->SetDisplayId(29837);
|
||||
Plague_Strike_Timer = 5000;
|
||||
Icy_Touch_Timer = 10000;
|
||||
Obliterate_Timer = 16000;
|
||||
Choke_Timer = 15000;
|
||||
Summon_Ghoul = 4000;
|
||||
phase1 = true;
|
||||
phase2 = false;
|
||||
phase3 = false;
|
||||
ghoul = false;
|
||||
m_creature->RemoveArenaAuras(true);
|
||||
m_creature->SendMonsterMove(746.864441, 660.918762, 411.695465, 4.698700, m_creature->GetDefaultMovementType(), 1);
|
||||
m_creature->GetMap()->CreatureRelocation(m_creature, 754.360779, 660.816162, 412.395996, 4.698700);
|
||||
m_creature->SetHealth(m_creature->GetMaxHealth());
|
||||
}
|
||||
|
||||
void Aggro(Unit* pWho)
|
||||
{
|
||||
if (!m_pInstance)
|
||||
return;
|
||||
if (m_pInstance->GetData(TYPE_BLACK_KNIGHT) == DONE)
|
||||
m_creature->ForcedDespawn();
|
||||
else
|
||||
m_pInstance->SetData(TYPE_BLACK_KNIGHT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* pDoneBy, uint32& uiDamage)
|
||||
{
|
||||
if (uiDamage > m_creature->GetHealth() && !phase3){
|
||||
uiDamage = 0;
|
||||
if (phase2)
|
||||
StartPhase3();
|
||||
if (phase1)
|
||||
StartPhase2();
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* pKiller)
|
||||
{
|
||||
if (!m_pInstance)
|
||||
return;
|
||||
if (phase3)
|
||||
{
|
||||
m_pInstance->SetData(TYPE_BLACK_KNIGHT, DONE);
|
||||
}
|
||||
if (phase2)
|
||||
if (!m_creature->isAlive())
|
||||
{
|
||||
m_creature->Respawn();
|
||||
StartPhase3();
|
||||
}
|
||||
if (phase1)
|
||||
if (!m_creature->isAlive())
|
||||
{
|
||||
m_creature->Respawn();
|
||||
StartPhase2();
|
||||
}
|
||||
}
|
||||
|
||||
void StartPhase2()
|
||||
{
|
||||
m_creature->SetHealth(m_creature->GetMaxHealth());
|
||||
m_creature->SetDisplayId(27550);
|
||||
phase1 = false;
|
||||
phase2 = true;
|
||||
phase3 = false;
|
||||
DoCast(m_creature, SPELL_ARMY);
|
||||
Plague_Strike_Timer = 14000;
|
||||
Icy_Touch_Timer = 12000;
|
||||
Obliterate_Timer = 18000;
|
||||
}
|
||||
|
||||
void StartPhase3()
|
||||
{
|
||||
m_creature->SetHealth(m_creature->GetMaxHealth());
|
||||
m_creature->SetDisplayId(14560);
|
||||
SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE);
|
||||
phase1 = false;
|
||||
phase2 = false;
|
||||
phase3 = true;
|
||||
Death_Timer = 5000;
|
||||
Mark_Timer = 9000;
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectVictim() || !m_creature->getVictim())
|
||||
return;
|
||||
|
||||
if (Plague_Strike_Timer < diff && !phase3)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_PLAGUE_STRIKE : SPELL_PLAGUE_STRIKE_H);
|
||||
Plague_Strike_Timer = 10500;
|
||||
}else Plague_Strike_Timer -= diff;
|
||||
|
||||
if (Icy_Touch_Timer < diff && !phase3)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_ICY_TOUCH : SPELL_ICY_TOUCH_H);
|
||||
Icy_Touch_Timer = 10000;
|
||||
}else Icy_Touch_Timer -= diff;
|
||||
|
||||
if (Obliterate_Timer < diff && !phase3)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_OBLITERATE : SPELL_OBLITERATE_H);
|
||||
Obliterate_Timer = 11000;
|
||||
}else Obliterate_Timer -= diff;
|
||||
|
||||
if (Choke_Timer < diff && phase1)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1))
|
||||
DoCast(m_creature->getVictim(), SPELL_CHOKE);
|
||||
Choke_Timer = 15000;
|
||||
}else Choke_Timer -= diff;
|
||||
|
||||
if (Summon_Ghoul < diff && phase1 && !ghoul)
|
||||
{
|
||||
if (m_pInstance->GetData(DATA_TOC5_ANNOUNCER) == m_pInstance->GetData(DATA_JAEREN))
|
||||
m_creature->SummonCreature(NPC_RISEN_JAEREN, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
else
|
||||
m_creature->SummonCreature(NPC_RISEN_ARELAS, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
ghoul = true;
|
||||
}else Summon_Ghoul -= diff;
|
||||
|
||||
if (Mark_Timer < diff && phase3)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1))
|
||||
DoCast(target, SPELL_MARK);
|
||||
Mark_Timer = 15000;
|
||||
}else Mark_Timer -= diff;
|
||||
|
||||
if (Death_Timer < diff && phase3)
|
||||
{
|
||||
DoCast(m_creature, m_bIsRegularMode ? SPELL_DEATH : SPELL_DEATH_H);
|
||||
Death_Timer = 3500;
|
||||
}else Death_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_black_knight(Creature* pCreature)
|
||||
{
|
||||
return new boss_black_knightAI(pCreature);
|
||||
}
|
||||
|
||||
void AddSC_boss_black_knight()
|
||||
{
|
||||
Script* NewScript;
|
||||
|
||||
NewScript = new Script;
|
||||
NewScript->Name = "mob_toc5_risen_ghoul";
|
||||
NewScript->GetAI = &GetAI_mob_toc5_risen_ghoul;
|
||||
NewScript->RegisterSelf();
|
||||
|
||||
NewScript = new Script;
|
||||
NewScript->Name = "boss_black_knight";
|
||||
NewScript->GetAI = &GetAI_boss_black_knight;
|
||||
NewScript->RegisterSelf();
|
||||
}
|
||||
@@ -0,0 +1,585 @@
|
||||
/* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: boss_grand_champions
|
||||
SD%Complete: 92%
|
||||
SDComment: missing yells. hunter AI sucks. no pvp diminuishing returns(is it DB related?)
|
||||
SDCategory: Trial Of the Champion
|
||||
EndScriptData */
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "trial_of_the_champion.h"
|
||||
|
||||
enum
|
||||
{
|
||||
//yells
|
||||
|
||||
//warrior
|
||||
SPELL_MORTAL_STRIKE = 68783,
|
||||
SPELL_MORTAL_STRIKE_H = 68784,
|
||||
SPELL_BLADESTORM = 63784,
|
||||
SPELL_INTERCEPT = 67540,
|
||||
SPELL_ROLLING_THROW = 47115, //need core support for spell 67546, using 47115 instead
|
||||
//mage
|
||||
SPELL_FIREBALL = 66042,
|
||||
SPELL_FIREBALL_H = 68310,
|
||||
SPELL_BLAST_WAVE = 66044,
|
||||
SPELL_BLAST_WAVE_H = 68312,
|
||||
SPELL_HASTE = 66045,
|
||||
SPELL_POLYMORPH = 66043,
|
||||
SPELL_POLYMORPH_H = 68311,
|
||||
//shaman
|
||||
SPELL_CHAIN_LIGHTNING = 67529,
|
||||
SPELL_CHAIN_LIGHTNING_H = 68319,
|
||||
SPELL_EARTH_SHIELD = 67530,
|
||||
SPELL_HEALING_WAVE = 67528,
|
||||
SPELL_HEALING_WAVE_H = 68318,
|
||||
SPELL_HEX_OF_MENDING = 67534,
|
||||
//hunter
|
||||
SPELL_DISENGAGE = 68340,
|
||||
SPELL_LIGHTNING_ARROWS = 66083,
|
||||
SPELL_MULTI_SHOT = 66081,
|
||||
SPELL_SHOOT = 66079,
|
||||
//rogue
|
||||
SPELL_EVISCERATE = 67709,
|
||||
SPELL_EVISCERATE_H = 68317,
|
||||
SPELL_FAN_OF_KNIVES = 67706,
|
||||
SPELL_POISON_BOTTLE = 67701
|
||||
};
|
||||
|
||||
// Warrior
|
||||
struct TRINITY_DLL_DECL mob_toc5_warriorAI : public ScriptedAI
|
||||
{
|
||||
mob_toc5_warriorAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
{
|
||||
Reset();
|
||||
m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData();
|
||||
}
|
||||
|
||||
ScriptedInstance* m_pInstance;
|
||||
bool m_bIsRegularMode;
|
||||
|
||||
uint32 Mortal_Strike_Timer;
|
||||
uint32 Bladestorm_Timer;
|
||||
uint32 Rolling_Throw_Timer;
|
||||
uint32 Intercept_Cooldown;
|
||||
uint32 intercept_check;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
m_creature->SetRespawnDelay(999999999);
|
||||
Mortal_Strike_Timer = 6000;
|
||||
Bladestorm_Timer = 20000;
|
||||
Rolling_Throw_Timer = 30000;
|
||||
Intercept_Cooldown = 0;
|
||||
intercept_check = 1000;
|
||||
}
|
||||
|
||||
void EnterEvadeMode()
|
||||
{
|
||||
}
|
||||
|
||||
void Aggro(Unit* pWho)
|
||||
{
|
||||
if (!m_pInstance)
|
||||
return;
|
||||
if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE)
|
||||
m_creature->ForcedDespawn();
|
||||
else
|
||||
m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit* pKiller)
|
||||
{
|
||||
if (!m_pInstance)
|
||||
return;
|
||||
|
||||
if(!m_creature->FindNearestCreature(35572, 200, true) && !m_creature->FindNearestCreature(35569, 200, true) && !m_creature->FindNearestCreature(35571, 200, true) &&
|
||||
!m_creature->FindNearestCreature(35570, 200, true) && !m_creature->FindNearestCreature(35617, 200, true) && !m_creature->FindNearestCreature(34705, 200, true)
|
||||
&& !m_creature->FindNearestCreature(34702, 200, true) && !m_creature->FindNearestCreature(34701, 200, true) && !m_creature->FindNearestCreature(34657, 200, true)
|
||||
&& !m_creature->FindNearestCreature(34703, 200, true))
|
||||
m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectVictim() || !m_creature->getVictim())
|
||||
return;
|
||||
|
||||
if (Mortal_Strike_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_MORTAL_STRIKE : SPELL_MORTAL_STRIKE_H);
|
||||
Mortal_Strike_Timer = 6000;
|
||||
}else Mortal_Strike_Timer -= diff;
|
||||
|
||||
if (Rolling_Throw_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_ROLLING_THROW);
|
||||
Rolling_Throw_Timer = 30000;
|
||||
}else Rolling_Throw_Timer -= diff;
|
||||
|
||||
if (Bladestorm_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_BLADESTORM);
|
||||
Bladestorm_Timer = 90000;
|
||||
}else Bladestorm_Timer -= diff;
|
||||
|
||||
if (intercept_check < diff)
|
||||
{
|
||||
if (!m_creature->IsWithinDistInMap(m_creature->getVictim(), 8) && m_creature->IsWithinDistInMap(m_creature->getVictim(), 25) && Intercept_Cooldown < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_INTERCEPT);
|
||||
Intercept_Cooldown = 15000;
|
||||
}
|
||||
intercept_check = 1000;
|
||||
}
|
||||
else
|
||||
{
|
||||
intercept_check -= diff;
|
||||
Intercept_Cooldown -= diff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_mob_toc5_warrior(Creature* pCreature)
|
||||
{
|
||||
return new mob_toc5_warriorAI(pCreature);
|
||||
}
|
||||
|
||||
// Mage
|
||||
struct TRINITY_DLL_DECL mob_toc5_mageAI : public ScriptedAI
|
||||
{
|
||||
mob_toc5_mageAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
{
|
||||
Reset();
|
||||
m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData();
|
||||
}
|
||||
|
||||
ScriptedInstance* m_pInstance;
|
||||
bool m_bIsRegularMode;
|
||||
|
||||
uint32 Fireball_Timer;
|
||||
uint32 Blast_Wave_Timer;
|
||||
uint32 Haste_Timer;
|
||||
uint32 Polymorph_Timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
m_creature->SetRespawnDelay(999999999);
|
||||
Fireball_Timer = 0;
|
||||
Blast_Wave_Timer = 20000;
|
||||
Haste_Timer = 9000;
|
||||
Polymorph_Timer = 15000;
|
||||
}
|
||||
|
||||
void EnterEvadeMode()
|
||||
{
|
||||
}
|
||||
|
||||
void Aggro(Unit* pWho)
|
||||
{
|
||||
if (!m_pInstance)
|
||||
return;
|
||||
if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE)
|
||||
m_creature->ForcedDespawn();
|
||||
else
|
||||
m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit* pKiller)
|
||||
{
|
||||
if (!m_pInstance)
|
||||
return;
|
||||
|
||||
if(!m_creature->FindNearestCreature(35572, 200, true) && !m_creature->FindNearestCreature(35569, 200, true) && !m_creature->FindNearestCreature(35571, 200, true) &&
|
||||
!m_creature->FindNearestCreature(35570, 200, true) && !m_creature->FindNearestCreature(35617, 200, true) && !m_creature->FindNearestCreature(34705, 200, true)
|
||||
&& !m_creature->FindNearestCreature(34702, 200, true) && !m_creature->FindNearestCreature(34701, 200, true) && !m_creature->FindNearestCreature(34657, 200, true)
|
||||
&& !m_creature->FindNearestCreature(34703, 200, true))
|
||||
m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectVictim() || !m_creature->getVictim())
|
||||
return;
|
||||
|
||||
if (Fireball_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_FIREBALL : SPELL_FIREBALL_H);
|
||||
Fireball_Timer = 3000;
|
||||
}else Fireball_Timer -= diff;
|
||||
|
||||
if (Blast_Wave_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature, m_bIsRegularMode ? SPELL_BLAST_WAVE : SPELL_BLAST_WAVE_H);
|
||||
Blast_Wave_Timer = 20000;
|
||||
}else Blast_Wave_Timer -= diff;
|
||||
|
||||
if (Haste_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_HASTE);
|
||||
Haste_Timer = 10000;
|
||||
}else Haste_Timer -= diff;
|
||||
|
||||
if (Polymorph_Timer < diff)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1))
|
||||
DoCast(target, m_bIsRegularMode ? SPELL_POLYMORPH : SPELL_POLYMORPH_H);
|
||||
Polymorph_Timer = 15000;
|
||||
}else Polymorph_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_mob_toc5_mage(Creature* pCreature)
|
||||
{
|
||||
return new mob_toc5_mageAI(pCreature);
|
||||
}
|
||||
|
||||
// Shaman
|
||||
struct TRINITY_DLL_DECL mob_toc5_shamanAI : public ScriptedAI
|
||||
{
|
||||
mob_toc5_shamanAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
{
|
||||
Reset();
|
||||
m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData();
|
||||
}
|
||||
|
||||
ScriptedInstance* m_pInstance;
|
||||
bool m_bIsRegularMode;
|
||||
|
||||
uint32 Chain_Lightning_Timer;
|
||||
uint32 Earth_Shield_Timer;
|
||||
uint32 Healing_Wave_Timer;
|
||||
uint32 Hex_Timer;
|
||||
|
||||
float mob1_health;
|
||||
float mob2_health;
|
||||
float mob3_health;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
m_creature->SetRespawnDelay(999999999);
|
||||
Chain_Lightning_Timer = 1000;
|
||||
Earth_Shield_Timer = 5000;
|
||||
Healing_Wave_Timer = 13000;
|
||||
Hex_Timer = 10000;
|
||||
}
|
||||
|
||||
void EnterEvadeMode()
|
||||
{
|
||||
}
|
||||
|
||||
void Aggro(Unit* pWho)
|
||||
{
|
||||
if (!m_pInstance)
|
||||
return;
|
||||
if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE)
|
||||
m_creature->ForcedDespawn();
|
||||
else
|
||||
m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit* pKiller)
|
||||
{
|
||||
if (!m_pInstance)
|
||||
return;
|
||||
|
||||
if(!m_creature->FindNearestCreature(35572, 200, true) && !m_creature->FindNearestCreature(35569, 200, true) && !m_creature->FindNearestCreature(35571, 200, true) &&
|
||||
!m_creature->FindNearestCreature(35570, 200, true) && !m_creature->FindNearestCreature(35617, 200, true) && !m_creature->FindNearestCreature(34705, 200, true)
|
||||
&& !m_creature->FindNearestCreature(34702, 200, true) && !m_creature->FindNearestCreature(34701, 200, true) && !m_creature->FindNearestCreature(34657, 200, true)
|
||||
&& !m_creature->FindNearestCreature(34703, 200, true))
|
||||
m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectVictim() || !m_creature->getVictim())
|
||||
return;
|
||||
|
||||
if (Chain_Lightning_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_CHAIN_LIGHTNING : SPELL_CHAIN_LIGHTNING_H);
|
||||
Chain_Lightning_Timer = 10000;
|
||||
}else Chain_Lightning_Timer -= diff;
|
||||
|
||||
if (Hex_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_HEX_OF_MENDING);
|
||||
Hex_Timer = 20000;
|
||||
}else Hex_Timer -= diff;
|
||||
|
||||
if (Healing_Wave_Timer < diff)
|
||||
{
|
||||
if(Unit* target = m_creature->SelectNearestTarget(40))
|
||||
if(target->GetHealth() == target->GetHealth() * 100 / target->GetMaxHealth() && target->IsFriendlyTo(m_creature))
|
||||
{
|
||||
DoCast(target, HEROIC(SPELL_HEALING_WAVE, SPELL_HEALING_WAVE_H));
|
||||
Healing_Wave_Timer = 8000;
|
||||
}
|
||||
}else Healing_Wave_Timer -= diff;
|
||||
|
||||
if (Earth_Shield_Timer < diff)
|
||||
{
|
||||
if(Unit* target = m_creature->SelectNearestTarget(40))
|
||||
if(!target->HasAura(SPELL_EARTH_SHIELD,m_creature->GetGUID()) && target->IsFriendlyTo(m_creature))
|
||||
{
|
||||
DoCast(target, SPELL_EARTH_SHIELD);
|
||||
Earth_Shield_Timer = 25000;
|
||||
}
|
||||
}else Earth_Shield_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_mob_toc5_shaman(Creature* pCreature)
|
||||
{
|
||||
return new mob_toc5_shamanAI(pCreature);
|
||||
}
|
||||
|
||||
// Hunter
|
||||
struct TRINITY_DLL_DECL mob_toc5_hunterAI : public ScriptedAI
|
||||
{
|
||||
mob_toc5_hunterAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
{
|
||||
Reset();
|
||||
m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData();
|
||||
}
|
||||
|
||||
ScriptedInstance* m_pInstance;
|
||||
bool m_bIsRegularMode;
|
||||
|
||||
uint32 Shoot_Timer;
|
||||
uint32 Lightning_Arrows_Timer;
|
||||
uint32 Multi_Shot_Timer;
|
||||
uint32 Disengage_Cooldown;
|
||||
uint32 enemy_check;
|
||||
uint32 disengage_check;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
m_creature->SetRespawnDelay(999999999);
|
||||
Shoot_Timer = 0;
|
||||
Lightning_Arrows_Timer = 13000;
|
||||
Multi_Shot_Timer = 10000;
|
||||
Disengage_Cooldown = 0;
|
||||
enemy_check = 1000;
|
||||
disengage_check;
|
||||
}
|
||||
|
||||
void EnterEvadeMode()
|
||||
{
|
||||
}
|
||||
|
||||
void Aggro(Unit* pWho)
|
||||
{
|
||||
if (!m_pInstance)
|
||||
return;
|
||||
if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE)
|
||||
m_creature->ForcedDespawn();
|
||||
else
|
||||
m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit* pKiller)
|
||||
{
|
||||
if (!m_pInstance)
|
||||
return;
|
||||
|
||||
if(!m_creature->FindNearestCreature(35572, 200, true) && !m_creature->FindNearestCreature(35569, 200, true) && !m_creature->FindNearestCreature(35571, 200, true) &&
|
||||
!m_creature->FindNearestCreature(35570, 200, true) && !m_creature->FindNearestCreature(35617, 200, true) && !m_creature->FindNearestCreature(34705, 200, true)
|
||||
&& !m_creature->FindNearestCreature(34702, 200, true) && !m_creature->FindNearestCreature(34701, 200, true) && !m_creature->FindNearestCreature(34657, 200, true)
|
||||
&& !m_creature->FindNearestCreature(34703, 200, true))
|
||||
m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectVictim() || !m_creature->getVictim())
|
||||
return;
|
||||
|
||||
if (enemy_check < diff)
|
||||
{
|
||||
if (!m_creature->IsWithinDistInMap(m_creature->getVictim(), 8) && m_creature->IsWithinDistInMap(m_creature->getVictim(), 30))
|
||||
{
|
||||
m_creature->SetSpeed(MOVE_RUN, 0.0001);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_creature->SetSpeed(MOVE_RUN, 1);
|
||||
}
|
||||
enemy_check = 100;
|
||||
}else enemy_check -= diff;
|
||||
|
||||
if (Disengage_Cooldown>0)
|
||||
Disengage_Cooldown -= diff;
|
||||
|
||||
if (Shoot_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_SHOOT);
|
||||
Shoot_Timer = 3000;
|
||||
}else Shoot_Timer -= diff;
|
||||
|
||||
if (Multi_Shot_Timer < diff)
|
||||
{
|
||||
m_creature->CastStop(SPELL_SHOOT);
|
||||
DoCast(m_creature->getVictim(), SPELL_MULTI_SHOT);
|
||||
Multi_Shot_Timer = 10000;
|
||||
}else Multi_Shot_Timer -= diff;
|
||||
|
||||
if (Lightning_Arrows_Timer < diff)
|
||||
{
|
||||
m_creature->CastStop(SPELL_SHOOT);
|
||||
DoCast(m_creature, SPELL_LIGHTNING_ARROWS);
|
||||
Lightning_Arrows_Timer = 25000;
|
||||
}else Lightning_Arrows_Timer -= diff;
|
||||
|
||||
if (disengage_check < diff)
|
||||
{
|
||||
if (m_creature->IsWithinDistInMap(m_creature->getVictim(), 5) && Disengage_Cooldown == 0)
|
||||
{
|
||||
DoCast(m_creature, SPELL_DISENGAGE);
|
||||
Disengage_Cooldown = 15000;
|
||||
}
|
||||
disengage_check = 1000;
|
||||
}else disengage_check -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_mob_toc5_hunter(Creature* pCreature)
|
||||
{
|
||||
return new mob_toc5_hunterAI(pCreature);
|
||||
}
|
||||
|
||||
// Rogue
|
||||
struct TRINITY_DLL_DECL mob_toc5_rogueAI : public ScriptedAI
|
||||
{
|
||||
mob_toc5_rogueAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
{
|
||||
Reset();
|
||||
m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData();
|
||||
}
|
||||
|
||||
ScriptedInstance* m_pInstance;
|
||||
bool m_bIsRegularMode;
|
||||
|
||||
uint32 Eviscerate_Timer;
|
||||
uint32 FoK_Timer;
|
||||
uint32 Poison_Timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
m_creature->SetRespawnDelay(999999999);
|
||||
Eviscerate_Timer = 15000;
|
||||
FoK_Timer = 10000;
|
||||
Poison_Timer = 7000;
|
||||
}
|
||||
|
||||
void EnterEvadeMode()
|
||||
{
|
||||
}
|
||||
|
||||
void Aggro(Unit* pWho)
|
||||
{
|
||||
if (!m_pInstance)
|
||||
return;
|
||||
if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE)
|
||||
m_creature->ForcedDespawn();
|
||||
else
|
||||
m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit* pKiller)
|
||||
{
|
||||
if (!m_pInstance)
|
||||
return;
|
||||
|
||||
if(!m_creature->FindNearestCreature(35572, 200, true) && !m_creature->FindNearestCreature(35569, 200, true) && !m_creature->FindNearestCreature(35571, 200, true) &&
|
||||
!m_creature->FindNearestCreature(35570, 200, true) && !m_creature->FindNearestCreature(35617, 200, true) && !m_creature->FindNearestCreature(34705, 200, true)
|
||||
&& !m_creature->FindNearestCreature(34702, 200, true) && !m_creature->FindNearestCreature(34701, 200, true) && !m_creature->FindNearestCreature(34657, 200, true)
|
||||
&& !m_creature->FindNearestCreature(34703, 200, true))
|
||||
m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectVictim() || !m_creature->getVictim())
|
||||
return;
|
||||
|
||||
if (Eviscerate_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_EVISCERATE : SPELL_EVISCERATE_H);
|
||||
Eviscerate_Timer = 10000;
|
||||
}else Eviscerate_Timer -= diff;
|
||||
|
||||
if (FoK_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_FAN_OF_KNIVES);
|
||||
FoK_Timer = 7000;
|
||||
}else FoK_Timer -= diff;
|
||||
|
||||
if (Poison_Timer < diff)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(m_creature, SPELL_POISON_BOTTLE);
|
||||
Poison_Timer = 6000;
|
||||
}else Poison_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_mob_toc5_rogue(Creature* pCreature)
|
||||
{
|
||||
return new mob_toc5_rogueAI(pCreature);
|
||||
}
|
||||
|
||||
void AddSC_boss_grand_champions()
|
||||
{
|
||||
Script* NewScript;
|
||||
|
||||
NewScript = new Script;
|
||||
NewScript->Name = "mob_toc5_warrior";
|
||||
NewScript->GetAI = &GetAI_mob_toc5_warrior;
|
||||
NewScript->RegisterSelf();
|
||||
|
||||
NewScript = new Script;
|
||||
NewScript->Name = "mob_toc5_mage";
|
||||
NewScript->GetAI = &GetAI_mob_toc5_mage;
|
||||
NewScript->RegisterSelf();
|
||||
|
||||
NewScript = new Script;
|
||||
NewScript->Name = "mob_toc5_shaman";
|
||||
NewScript->GetAI = &GetAI_mob_toc5_shaman;
|
||||
NewScript->RegisterSelf();
|
||||
|
||||
NewScript = new Script;
|
||||
NewScript->Name = "mob_toc5_hunter";
|
||||
NewScript->GetAI = &GetAI_mob_toc5_hunter;
|
||||
NewScript->RegisterSelf();
|
||||
|
||||
NewScript = new Script;
|
||||
NewScript->Name = "mob_toc5_rogue";
|
||||
NewScript->GetAI = &GetAI_mob_toc5_rogue;
|
||||
NewScript->RegisterSelf();
|
||||
}
|
||||
@@ -0,0 +1,349 @@
|
||||
/* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Instance_Trial_Of_the_Champion
|
||||
SD%Complete: 100
|
||||
SDComment:
|
||||
SDCategory: Trial Of the Champion
|
||||
EndScriptData */
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "trial_of_the_champion.h"
|
||||
|
||||
struct TRINITY_DLL_DECL instance_trial_of_the_champion : public ScriptedInstance
|
||||
{
|
||||
instance_trial_of_the_champion(Map* pMap) : ScriptedInstance(pMap), m_uiChampionsLootGUID(NULL), m_uiPaletressLootGUID(NULL), m_uiEadricLootGUID(NULL) { Initialize(); }
|
||||
|
||||
uint32 m_auiEncounter[MAX_ENCOUNTER];
|
||||
std::string strInstData;
|
||||
|
||||
uint64 m_uiEadricGUID;
|
||||
uint64 m_uiPaletressGUID;
|
||||
uint64 m_uiBlackKnightGUID;
|
||||
uint64 m_uiJaerenGUID;
|
||||
uint64 m_uiArelasGUID;
|
||||
uint64 m_uiAnnouncerGUID;
|
||||
uint64 m_uiBlackKnightMinionGUID;
|
||||
uint64 m_uiArgentChallenger;
|
||||
uint64 m_uiMemoryGUID;
|
||||
|
||||
GameObject* m_uiChampionsLootGUID;
|
||||
GameObject* m_uiPaletressLootGUID;
|
||||
GameObject* m_uiEadricLootGUID;
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
m_uiChampionsLootGUID = 0;
|
||||
m_uiEadricGUID = 0;
|
||||
m_uiEadricLootGUID = 0;
|
||||
m_uiPaletressGUID = 0;
|
||||
m_uiPaletressLootGUID = 0;
|
||||
m_uiBlackKnightGUID = 0;
|
||||
m_uiJaerenGUID = 0;
|
||||
m_uiArelasGUID = 0;
|
||||
m_uiAnnouncerGUID = 0;
|
||||
m_uiBlackKnightMinionGUID = 0;
|
||||
m_uiArgentChallenger = 0;
|
||||
m_uiMemoryGUID = 0;
|
||||
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
}
|
||||
|
||||
bool IsEncounterInProgress() const
|
||||
{
|
||||
for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
{
|
||||
if (m_auiEncounter[i] == IN_PROGRESS)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* pCreature, bool bAdd)
|
||||
{
|
||||
Map::PlayerList const &players = instance->GetPlayers();
|
||||
uint32 TeamInInstance = 0;
|
||||
|
||||
if (!players.isEmpty())
|
||||
{
|
||||
if (Player* pPlayer = players.begin()->getSource())
|
||||
TeamInInstance = pPlayer->GetTeam();
|
||||
}
|
||||
switch(pCreature->GetEntry())
|
||||
{
|
||||
|
||||
// Champions
|
||||
case NPC_MOKRA:
|
||||
if (TeamInInstance == HORDE)
|
||||
pCreature->UpdateEntry(NPC_JACOB, ALLIANCE);
|
||||
break;
|
||||
case NPC_ERESSEA:
|
||||
if (TeamInInstance == HORDE)
|
||||
pCreature->UpdateEntry(NPC_AMBROSE, ALLIANCE);
|
||||
break;
|
||||
case NPC_RUNOK:
|
||||
if (TeamInInstance == HORDE)
|
||||
pCreature->UpdateEntry(NPC_COLOSOS, ALLIANCE);
|
||||
break;
|
||||
case NPC_ZULTORE:
|
||||
if (TeamInInstance == HORDE)
|
||||
pCreature->UpdateEntry(NPC_JAELYNE, ALLIANCE);
|
||||
break;
|
||||
case NPC_VISCERI:
|
||||
if (TeamInInstance == HORDE)
|
||||
pCreature->UpdateEntry(NPC_LANA, ALLIANCE);
|
||||
break;
|
||||
|
||||
// Argent Challenge
|
||||
case NPC_EADRIC:
|
||||
m_uiEadricGUID = pCreature->GetGUID();
|
||||
m_uiArgentChallenger = pCreature->GetGUID();
|
||||
break;
|
||||
case NPC_PALETRESS:
|
||||
m_uiPaletressGUID = pCreature->GetGUID();
|
||||
m_uiArgentChallenger = pCreature->GetGUID();
|
||||
break;
|
||||
|
||||
// Black Knight
|
||||
case NPC_BLACK_KNIGHT:
|
||||
m_uiBlackKnightGUID = pCreature->GetGUID();
|
||||
break;
|
||||
case NPC_RISEN_JAEREN:
|
||||
m_uiBlackKnightMinionGUID = pCreature->GetGUID();
|
||||
break;
|
||||
case NPC_RISEN_ARELAS:
|
||||
m_uiBlackKnightMinionGUID = pCreature->GetGUID();
|
||||
break;
|
||||
|
||||
// Coliseum Announcers
|
||||
case NPC_JAEREN:
|
||||
m_uiJaerenGUID = pCreature->GetGUID();
|
||||
break;
|
||||
case NPC_ARELAS:
|
||||
m_uiArelasGUID = pCreature->GetGUID();
|
||||
break;
|
||||
|
||||
// memories
|
||||
case MEMORY_ALGALON:
|
||||
m_uiMemoryGUID = pCreature->GetGUID();
|
||||
break;
|
||||
case MEMORY_ARCHIMONDE:
|
||||
m_uiMemoryGUID = pCreature->GetGUID();
|
||||
break;
|
||||
case MEMORY_CHROMAGGUS:
|
||||
m_uiMemoryGUID = pCreature->GetGUID();
|
||||
break;
|
||||
case MEMORY_CYANIGOSA:
|
||||
m_uiMemoryGUID = pCreature->GetGUID();
|
||||
break;
|
||||
case MEMORY_DELRISSA:
|
||||
m_uiMemoryGUID = pCreature->GetGUID();
|
||||
break;
|
||||
case MEMORY_ECK:
|
||||
m_uiMemoryGUID = pCreature->GetGUID();
|
||||
break;
|
||||
case MEMORY_ENTROPIUS:
|
||||
m_uiMemoryGUID = pCreature->GetGUID();
|
||||
break;
|
||||
case MEMORY_GRUUL:
|
||||
m_uiMemoryGUID = pCreature->GetGUID();
|
||||
break;
|
||||
case MEMORY_HAKKAR:
|
||||
m_uiMemoryGUID = pCreature->GetGUID();
|
||||
break;
|
||||
case MEMORY_HEIGAN:
|
||||
m_uiMemoryGUID = pCreature->GetGUID();
|
||||
break;
|
||||
case MEMORY_HEROD:
|
||||
m_uiMemoryGUID = pCreature->GetGUID();
|
||||
break;
|
||||
case MEMORY_HOGGER:
|
||||
m_uiMemoryGUID = pCreature->GetGUID();
|
||||
break;
|
||||
case MEMORY_IGNIS:
|
||||
m_uiMemoryGUID = pCreature->GetGUID();
|
||||
break;
|
||||
case MEMORY_ILLIDAN:
|
||||
m_uiMemoryGUID = pCreature->GetGUID();
|
||||
break;
|
||||
case MEMORY_INGVAR:
|
||||
m_uiMemoryGUID = pCreature->GetGUID();
|
||||
break;
|
||||
case MEMORY_KALITHRESH:
|
||||
m_uiMemoryGUID = pCreature->GetGUID();
|
||||
break;
|
||||
case MEMORY_LUCIFRON:
|
||||
m_uiMemoryGUID = pCreature->GetGUID();
|
||||
break;
|
||||
case MEMORY_MALCHEZAAR:
|
||||
m_uiMemoryGUID = pCreature->GetGUID();
|
||||
break;
|
||||
case MEMORY_MUTANUS:
|
||||
m_uiMemoryGUID = pCreature->GetGUID();
|
||||
break;
|
||||
case MEMORY_ONYXIA:
|
||||
m_uiMemoryGUID = pCreature->GetGUID();
|
||||
break;
|
||||
case MEMORY_THUNDERAAN:
|
||||
m_uiMemoryGUID = pCreature->GetGUID();
|
||||
break;
|
||||
case MEMORY_VANCLEEF:
|
||||
m_uiMemoryGUID = pCreature->GetGUID();
|
||||
break;
|
||||
case MEMORY_VASHJ:
|
||||
m_uiMemoryGUID = pCreature->GetGUID();
|
||||
break;
|
||||
case MEMORY_VEKNILASH:
|
||||
m_uiMemoryGUID = pCreature->GetGUID();
|
||||
break;
|
||||
case MEMORY_VEZAX:
|
||||
m_uiMemoryGUID = pCreature->GetGUID();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* pGo, bool add)
|
||||
{
|
||||
switch(pGo->GetEntry())
|
||||
{
|
||||
case GO_CHAMPIONS_LOOT: m_uiChampionsLootGUID = add ? pGo : NULL; break;
|
||||
case GO_EADRIC_LOOT: m_uiEadricLootGUID = add ? pGo : NULL; break;
|
||||
case GO_PALETRESS_LOOT: m_uiPaletressLootGUID = add ? pGo : NULL; break;
|
||||
case GO_CHAMPIONS_LOOT_H: m_uiChampionsLootGUID = add ? pGo : NULL; break;
|
||||
case GO_EADRIC_LOOT_H: m_uiEadricLootGUID = add ? pGo : NULL; break;
|
||||
case GO_PALETRESS_LOOT_H: m_uiPaletressLootGUID = add ? pGo : NULL; break;
|
||||
}
|
||||
}
|
||||
|
||||
void SetData(uint32 Type, uint32 Data)
|
||||
{
|
||||
switch(Type)
|
||||
{
|
||||
case DATA_TOC5_ANNOUNCER:
|
||||
m_uiAnnouncerGUID = Data;
|
||||
break;
|
||||
case DATA_BLACK_KNIGHT_MINION:
|
||||
m_uiBlackKnightMinionGUID = Data;
|
||||
break;
|
||||
case TYPE_GRAND_CHAMPIONS:
|
||||
if (Data == DONE)
|
||||
m_uiChampionsLootGUID->SetRespawnTime(m_uiChampionsLootGUID->GetRespawnDelay());
|
||||
m_auiEncounter[0] = Data;
|
||||
break;
|
||||
case TYPE_ARGENT_CHALLENGE:
|
||||
if (Data == DONE)
|
||||
{
|
||||
if(m_uiEadricGUID == m_uiArgentChallenger)
|
||||
m_uiEadricLootGUID->SetRespawnTime(m_uiEadricLootGUID->GetRespawnDelay());
|
||||
if(m_uiPaletressGUID == m_uiArgentChallenger)
|
||||
m_uiPaletressLootGUID->SetRespawnTime(m_uiPaletressLootGUID->GetRespawnDelay());
|
||||
}
|
||||
m_auiEncounter[1] = Data;
|
||||
break;
|
||||
case TYPE_BLACK_KNIGHT:
|
||||
m_auiEncounter[2] = Data;
|
||||
break;
|
||||
}
|
||||
|
||||
if (Data == DONE)
|
||||
{
|
||||
OUT_SAVE_INST_DATA;
|
||||
|
||||
std::ostringstream saveStream;
|
||||
saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2];
|
||||
|
||||
strInstData = saveStream.str();
|
||||
|
||||
SaveToDB();
|
||||
OUT_SAVE_INST_DATA_COMPLETE;
|
||||
}
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 uiData)
|
||||
{
|
||||
switch(uiData)
|
||||
{
|
||||
case DATA_MEMORY:
|
||||
return m_uiMemoryGUID;
|
||||
case DATA_BLACK_KNIGHT:
|
||||
return m_uiBlackKnightGUID;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::string GetSaveData()
|
||||
{
|
||||
return strInstData;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 uiType)
|
||||
{
|
||||
switch(uiType)
|
||||
{
|
||||
case DATA_BLACK_KNIGHT_MINION:
|
||||
return m_uiBlackKnightMinionGUID;
|
||||
case DATA_TOC5_ANNOUNCER:
|
||||
return m_uiAnnouncerGUID;
|
||||
case DATA_JAEREN:
|
||||
return m_uiJaerenGUID;
|
||||
case DATA_ARELAS:
|
||||
return m_uiArelasGUID;
|
||||
case TYPE_GRAND_CHAMPIONS:
|
||||
case TYPE_ARGENT_CHALLENGE:
|
||||
case TYPE_BLACK_KNIGHT:
|
||||
return m_auiEncounter[uiType];
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void Load(const char *chrIn)
|
||||
{
|
||||
if (!chrIn)
|
||||
{
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
return;
|
||||
}
|
||||
|
||||
OUT_LOAD_INST_DATA(chrIn);
|
||||
|
||||
std::istringstream loadStream(chrIn);
|
||||
loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2];
|
||||
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
if (m_auiEncounter[i] == IN_PROGRESS)
|
||||
m_auiEncounter[i] = NOT_STARTED;
|
||||
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
}
|
||||
};
|
||||
|
||||
InstanceData* GetInstanceData_instance_trial_of_the_champion(Map* pMap)
|
||||
{
|
||||
return new instance_trial_of_the_champion(pMap);
|
||||
}
|
||||
|
||||
void AddSC_instance_trial_of_the_champion()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name = "instance_trial_of_the_champion";
|
||||
newscript->GetInstanceData = &GetInstanceData_instance_trial_of_the_champion;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
/* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Trial Of the Champion
|
||||
SD%Complete: 80%
|
||||
SDComment: event script
|
||||
SDCategory: trial_of_the_champion
|
||||
EndScriptData */
|
||||
|
||||
/* ContentData
|
||||
npc_toc5_announcer
|
||||
EndContentData */
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "trial_of_the_champion.h"
|
||||
|
||||
#define GOSSIP_START_EVENT1 "I'm ready to start challenge."
|
||||
#define GOSSIP_START_EVENT2 "I'm ready for the next challenge."
|
||||
|
||||
/*######
|
||||
## npc_toc5_announcer
|
||||
######*/
|
||||
|
||||
struct TRINITY_DLL_DECL npc_toc5_announcerAI : public ScriptedAI
|
||||
{
|
||||
npc_toc5_announcerAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
{
|
||||
pInstance = (ScriptedInstance*)pCreature->GetInstanceData();
|
||||
Reset();
|
||||
}
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
|
||||
uint32 chmp1, chmp2, chmp3, argent;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
}
|
||||
|
||||
void StartEvent(Player* pPlayer)
|
||||
{
|
||||
if(pInstance->GetData(TYPE_GRAND_CHAMPIONS) == NOT_STARTED && pInstance->GetData(TYPE_ARGENT_CHALLENGE) == NOT_STARTED && pInstance->GetData(TYPE_BLACK_KNIGHT) == NOT_STARTED)
|
||||
{
|
||||
chmp1 = RAND(35572,35569,35571,35570,35617);
|
||||
chmp2 = RAND(35572,35569,35571,35570,35617);
|
||||
chmp3 = RAND(35572,35569,35571,35570,35617);
|
||||
if(chmp1 != chmp2 && chmp2 != chmp3 && chmp1 != chmp3)
|
||||
{
|
||||
m_creature->SummonCreature(chmp1, 738.665771, 661.031433, 412.394623, 4.698702, TEMPSUMMON_MANUAL_DESPAWN, 0);
|
||||
m_creature->SummonCreature(chmp2, 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_MANUAL_DESPAWN, 0);
|
||||
m_creature->SummonCreature(chmp3, 754.360779, 660.816162, 412.395996, 4.698700, TEMPSUMMON_MANUAL_DESPAWN, 0);
|
||||
pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS);
|
||||
} else return;
|
||||
}
|
||||
|
||||
if(pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE && pInstance->GetData(TYPE_ARGENT_CHALLENGE) == NOT_STARTED && pInstance->GetData(TYPE_BLACK_KNIGHT) == NOT_STARTED)
|
||||
{
|
||||
argent = RAND(35119,34928);
|
||||
m_creature->SummonCreature(argent, 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_MANUAL_DESPAWN, 0);
|
||||
pInstance->SetData(TYPE_ARGENT_CHALLENGE, IN_PROGRESS);
|
||||
}
|
||||
|
||||
if(pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE && pInstance->GetData(TYPE_ARGENT_CHALLENGE) == DONE && pInstance->GetData(TYPE_BLACK_KNIGHT) == NOT_STARTED)
|
||||
{
|
||||
m_creature->SummonCreature(NPC_BLACK_KNIGHT, 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_MANUAL_DESPAWN, 0);
|
||||
pInstance->SetData(TYPE_BLACK_KNIGHT, IN_PROGRESS);
|
||||
m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_npc_toc5_announcer(Creature* pCreature)
|
||||
{
|
||||
return new npc_toc5_announcerAI(pCreature);
|
||||
}
|
||||
|
||||
bool GossipHello_npc_toc5_announcer(Player* pPlayer, Creature* pCreature)
|
||||
{
|
||||
ScriptedInstance* pInstance = pCreature->GetInstanceData();
|
||||
|
||||
if(pInstance->GetData(TYPE_GRAND_CHAMPIONS) == NOT_STARTED && pInstance->GetData(TYPE_ARGENT_CHALLENGE) == NOT_STARTED && pInstance->GetData(TYPE_BLACK_KNIGHT) == NOT_STARTED)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_START_EVENT1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
else
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_START_EVENT2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
|
||||
pPlayer->SEND_GOSSIP_MENU(pCreature->GetEntry(), pCreature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_toc5_announcer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
|
||||
{
|
||||
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
|
||||
{
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
CAST_AI(npc_toc5_announcerAI, pCreature->AI())->StartEvent(pPlayer);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void AddSC_trial_of_the_champion()
|
||||
{
|
||||
Script* NewScript;
|
||||
|
||||
NewScript = new Script;
|
||||
NewScript->Name = "npc_toc5_announcer";
|
||||
NewScript->GetAI = &GetAI_npc_toc5_announcer;
|
||||
NewScript->pGossipHello = &GossipHello_npc_toc5_announcer;
|
||||
NewScript->pGossipSelect = &GossipSelect_npc_toc5_announcer;
|
||||
NewScript->RegisterSelf();
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
* This program is free software licensed under GPL version 2
|
||||
* Please see the included DOCS/LICENSE.TXT for more information */
|
||||
|
||||
#ifndef DEF_TOC_H
|
||||
#define DEF_TOC_H
|
||||
|
||||
enum
|
||||
{
|
||||
MAX_ENCOUNTER = 3,
|
||||
|
||||
TYPE_GRAND_CHAMPIONS = 0,
|
||||
TYPE_ARGENT_CHALLENGE = 1,
|
||||
TYPE_BLACK_KNIGHT = 2,
|
||||
|
||||
DATA_BLACK_KNIGHT = 6,
|
||||
DATA_BLACK_KNIGHT_MINION = 7,
|
||||
DATA_TOC5_ANNOUNCER = 8,
|
||||
DATA_JAEREN = 9,
|
||||
DATA_ARELAS = 10,
|
||||
DATA_CHAMPIONID_1 = 11,
|
||||
DATA_CHAMPIONID_2 = 12,
|
||||
DATA_CHAMPIONID_3 = 13,
|
||||
DATA_MEMORY = 14,
|
||||
DATA_ARGENT_CHALLENGER = 15,
|
||||
|
||||
NPC_JACOB = 34705,
|
||||
NPC_AMBROSE = 34702,
|
||||
NPC_COLOSOS = 34701,
|
||||
NPC_JAELYNE = 34657,
|
||||
NPC_LANA = 34703,
|
||||
NPC_MOKRA = 35572,
|
||||
NPC_ERESSEA = 35569,
|
||||
NPC_RUNOK = 35571,
|
||||
NPC_ZULTORE = 35570,
|
||||
NPC_VISCERI = 35617,
|
||||
NPC_EADRIC = 35119,
|
||||
NPC_PALETRESS = 34928,
|
||||
NPC_BLACK_KNIGHT = 35451,
|
||||
NPC_RISEN_JAEREN = 35545,
|
||||
NPC_RISEN_ARELAS = 35564,
|
||||
NPC_JAEREN = 35004,
|
||||
NPC_ARELAS = 35005,
|
||||
MEMORY_ALGALON = 35052,
|
||||
MEMORY_ARCHIMONDE = 35041,
|
||||
MEMORY_CHROMAGGUS = 35033,
|
||||
MEMORY_CYANIGOSA = 35046,
|
||||
MEMORY_DELRISSA = 35043,
|
||||
MEMORY_ECK = 35047,
|
||||
MEMORY_ENTROPIUS = 35044,
|
||||
MEMORY_GRUUL = 35039,
|
||||
MEMORY_HAKKAR = 35034,
|
||||
MEMORY_HEIGAN = 35049,
|
||||
MEMORY_HEROD = 35030,
|
||||
MEMORY_HOGGER = 34942,
|
||||
MEMORY_IGNIS = 35050,
|
||||
MEMORY_ILLIDAN = 35042,
|
||||
MEMORY_INGVAR = 35045,
|
||||
MEMORY_KALITHRESH = 35037,
|
||||
MEMORY_LUCIFRON = 35031,
|
||||
MEMORY_MALCHEZAAR = 35038,
|
||||
MEMORY_MUTANUS = 35029,
|
||||
MEMORY_ONYXIA = 35048,
|
||||
MEMORY_THUNDERAAN = 35032,
|
||||
MEMORY_VANCLEEF = 35028,
|
||||
MEMORY_VASHJ = 35040,
|
||||
MEMORY_VEKNILASH = 35036,
|
||||
MEMORY_VEZAX = 35051,
|
||||
|
||||
GO_CHAMPIONS_LOOT = 195709,
|
||||
GO_CHAMPIONS_LOOT_H = 195710,
|
||||
GO_EADRIC_LOOT = 195374,
|
||||
GO_EADRIC_LOOT_H = 195375,
|
||||
GO_PALETRESS_LOOT = 195323,
|
||||
GO_PALETRESS_LOOT_H = 195324
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -290,6 +290,11 @@ extern void AddSC_boss_taldaram();
|
||||
extern void AddSC_boss_jedoga_shadowseeker();
|
||||
extern void AddSC_boss_elder_nadox();
|
||||
extern void AddSC_boss_volazj();
|
||||
extern void AddSC_boss_argent_challenge(); //Trial of the Champion
|
||||
extern void AddSC_boss_black_knight();
|
||||
extern void AddSC_boss_grand_champions();
|
||||
extern void AddSC_instance_trial_of_the_champion();
|
||||
extern void AddSC_trial_of_the_champion();
|
||||
extern void AddSC_boss_anubrekhan(); //Naxxramas
|
||||
extern void AddSC_boss_maexxna();
|
||||
extern void AddSC_boss_patchwerk();
|
||||
@@ -738,6 +743,11 @@ void AddScripts()
|
||||
AddSC_boss_jedoga_shadowseeker();
|
||||
AddSC_boss_volazj();
|
||||
AddSC_instance_ahnkahet();
|
||||
AddSC_boss_argent_challenge(); //Trial of the Champion
|
||||
AddSC_boss_black_knight();
|
||||
AddSC_boss_grand_champions();
|
||||
AddSC_instance_trial_of_the_champion();
|
||||
AddSC_trial_of_the_champion();
|
||||
AddSC_boss_krik_thir(); //Azjol-Nerub Azjol-Nerub
|
||||
AddSC_boss_hadronox();
|
||||
AddSC_boss_anub_arak();
|
||||
|
||||
Reference in New Issue
Block a user