mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 23:50:44 +01:00
*Add script of Thaddius.
--HG-- branch : trunk
This commit is contained in:
@@ -390,6 +390,7 @@ extern void AddSC_boss_four_horsemen();
|
||||
extern void AddSC_boss_faerlina();
|
||||
extern void AddSC_boss_heigan();
|
||||
extern void AddSC_boss_gothik();
|
||||
extern void AddSC_boss_thaddius();
|
||||
extern void AddSC_instance_naxxramas();
|
||||
|
||||
//Netherstorm
|
||||
@@ -1264,6 +1265,7 @@ void ScriptsInit(char const* cfg_file = "trinitycore.conf")
|
||||
AddSC_boss_four_horsemen();
|
||||
AddSC_boss_heigan();
|
||||
AddSC_boss_gothik();
|
||||
AddSC_boss_thaddius();
|
||||
AddSC_instance_naxxramas();
|
||||
|
||||
//Netherstorm
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
/*
|
||||
* Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
@@ -14,14 +16,8 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Thaddius
|
||||
SD%Complete: 0
|
||||
SDComment: Placeholder. Includes Feugen & Stalagg.
|
||||
SDCategory: Naxxramas
|
||||
EndScriptData */
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "def_naxxramas.h"
|
||||
|
||||
//Stalagg
|
||||
#define SAY_STAL_AGGRO -1533023
|
||||
@@ -40,11 +36,14 @@ EndScriptData */
|
||||
//both
|
||||
#define SPELL_WARSTOMP 28125
|
||||
|
||||
|
||||
//generic
|
||||
#define C_TESLA_COIL 16218 //the coils (emotes "Tesla Coil overloads!")
|
||||
|
||||
|
||||
//Thaddus
|
||||
#define SAY_GREET -1533029
|
||||
#define SAY_AGGRO1 -1533030
|
||||
#define SAY_AGGRO2 -1533031
|
||||
#define SAY_AGGRO3 -1533032
|
||||
#define SAY_AGGRO RAND(-1533030,-1533031,-1533032)
|
||||
#define SAY_SLAY -1533033
|
||||
#define SAY_ELECT -1533034
|
||||
#define SAY_DEATH -1533035
|
||||
@@ -53,19 +52,92 @@ EndScriptData */
|
||||
#define SAY_SCREAM3 -1533038
|
||||
#define SAY_SCREAM4 -1533039
|
||||
|
||||
#define SPELL_BALL_LIGHTNING 28299
|
||||
#define SPELL_POLARITY_SHIFT HEROIC(39096,28089)
|
||||
#define SPELL_BALL_LIGHTNING 28299
|
||||
#define SPELL_CHAIN_LIGHTNING HEROIC(28167,54531)
|
||||
#define SPELL_BERSERK 27680
|
||||
|
||||
#define SPELL_CHARGE_POSITIVE_DMGBUFF 29659
|
||||
#define SPELL_CHARGE_POSITIVE_NEARDMG 28059
|
||||
enum Events
|
||||
{
|
||||
EVENT_SHIFT,
|
||||
EVENT_CHAIN,
|
||||
EVENT_BERSERK,
|
||||
};
|
||||
|
||||
#define SPELL_CHARGE_NEGATIVE_DMGBUFF 29660
|
||||
#define SPELL_CHARGE_NEGATIVE_NEARDMG 28084
|
||||
struct TRINITY_DLL_DECL boss_thaddiusAI : public BossAI
|
||||
{
|
||||
boss_thaddiusAI(Creature *c) : BossAI(c, BOSS_THADDIUS)
|
||||
{
|
||||
// temp
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
}
|
||||
|
||||
#define SPELL_CHAIN_LIGHTNING 28167
|
||||
#define H_SPELL_CHAIN_LIGHTNING 54531
|
||||
void KilledUnit(Unit* victim)
|
||||
{
|
||||
if(!(rand()%5))
|
||||
DoScriptText(SAY_SLAY, me);
|
||||
}
|
||||
|
||||
#define SPELL_BESERK 26662
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
_JustDied();
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
}
|
||||
|
||||
//generic
|
||||
#define C_TESLA_COIL 16218 //the coils (emotes "Tesla Coil overloads!")
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
_EnterCombat();
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
events.ScheduleEvent(EVENT_SHIFT, 30000);
|
||||
events.ScheduleEvent(EVENT_CHAIN, 10000+rand()%10000);
|
||||
events.ScheduleEvent(EVENT_BERSERK, 6*60000);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if(me->hasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
|
||||
while(uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch(eventId)
|
||||
{
|
||||
case EVENT_SHIFT:
|
||||
DoCastAOE(SPELL_POLARITY_SHIFT);
|
||||
events.ScheduleEvent(EVENT_SHIFT, 30000);
|
||||
return;
|
||||
case EVENT_CHAIN:
|
||||
DoCast(me->getVictim(), SPELL_CHAIN_LIGHTNING);
|
||||
events.ScheduleEvent(EVENT_CHAIN, 10000+rand()%10000);
|
||||
return;
|
||||
case EVENT_BERSERK:
|
||||
DoCast(me, EVENT_BERSERK);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if(events.GetTimer() > 15000 && !me->IsWithinMeleeRange(me->getVictim()))
|
||||
DoCast(me->getVictim(), SPELL_BALL_LIGHTNING);
|
||||
else
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_thaddius(Creature *_Creature)
|
||||
{
|
||||
return new boss_thaddiusAI (_Creature);
|
||||
}
|
||||
|
||||
void AddSC_boss_thaddius()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name="boss_thaddius";
|
||||
newscript->GetAI = &GetAI_boss_thaddius;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user