mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 02:04:52 +01:00
Spell improvements and check for Stalagg/Feugen
--HG-- branch : trunk
This commit is contained in:
@@ -24,20 +24,19 @@
|
||||
#define SAY_STAL_SLAY -1533024 //not used
|
||||
#define SAY_STAL_DEATH -1533025 //not used
|
||||
|
||||
#define SPELL_POWERSURGE 28134
|
||||
#define SPELL_POWERSURGE 54529
|
||||
#define SPELL_POWERSURGE_H 28134
|
||||
|
||||
//Feugen
|
||||
#define SAY_FEUG_AGGRO -1533026 //not used
|
||||
#define SAY_FEUG_SLAY -1533027 //not used
|
||||
#define SAY_FEUG_DEATH -1533028 //not used
|
||||
|
||||
#define SPELL_MANABURN 28135
|
||||
#define SPELL_STATICFIELD 28135
|
||||
#define SPELL_STATICFIELD_H 54528
|
||||
|
||||
//both
|
||||
#define SPELL_WARSTOMP 28125
|
||||
|
||||
//generic
|
||||
#define C_TESLA_COIL 16218 //the coils (emotes "Tesla Coil overloads!")
|
||||
//generic
|
||||
#define C_TESLA_COIL 16218 //the coils (emotes "Tesla Coil overloads!")
|
||||
|
||||
//Thaddus
|
||||
#define SAY_GREET -1533029 //not used
|
||||
@@ -62,12 +61,14 @@ enum Events
|
||||
EVENT_BERSERK,
|
||||
};
|
||||
|
||||
bool CheckStalaggAlive = true;
|
||||
bool CheckFeugenAlive = true;
|
||||
|
||||
struct TRINITY_DLL_DECL boss_thaddiusAI : public BossAI
|
||||
{
|
||||
boss_thaddiusAI(Creature *c) : BossAI(c, BOSS_THADDIUS)
|
||||
{
|
||||
// temp
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_STUNNED);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_STUNNED);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim)
|
||||
@@ -96,7 +97,10 @@ struct TRINITY_DLL_DECL boss_thaddiusAI : public BossAI
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
if (CheckStalaggAlive == false && CheckFeugenAlive == false)
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_STUNNED);
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->hasUnitState(UNIT_STAT_CASTING))
|
||||
return;
|
||||
@@ -126,11 +130,90 @@ struct TRINITY_DLL_DECL boss_thaddiusAI : public BossAI
|
||||
}
|
||||
};
|
||||
|
||||
struct TRINITY_DLL_DECL mob_stalaggAI : public CombatAI
|
||||
{
|
||||
mob_stalaggAI(Creature *c) : CombatAI(c)
|
||||
{
|
||||
m_pInstance = (ScriptedInstance*)c->GetInstanceData();
|
||||
m_bIsHeroicMode = c->GetMap()->IsHeroic();
|
||||
Reset();
|
||||
}
|
||||
|
||||
ScriptedInstance* m_pInstance;
|
||||
bool m_bIsHeroicMode;
|
||||
uint32 PowerSurge_Timer;
|
||||
|
||||
void reset()
|
||||
{
|
||||
PowerSurge_Timer = 20000+rand()%5000;
|
||||
}
|
||||
|
||||
void JustDied(Unit *killer)
|
||||
{
|
||||
CheckStalaggAlive = false;
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
if (PowerSurge_Timer < uiDiff)
|
||||
{
|
||||
DoCast(m_creature, m_bIsHeroicMode ? SPELL_POWERSURGE_H : SPELL_POWERSURGE);
|
||||
PowerSurge_Timer = 15000+rand()%5000;
|
||||
}else PowerSurge_Timer -= uiDiff;
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
struct TRINITY_DLL_DECL mob_feugenAI : public CombatAI
|
||||
{
|
||||
mob_feugenAI(Creature *c) : CombatAI(c)
|
||||
{
|
||||
m_pInstance = (ScriptedInstance*)c->GetInstanceData();
|
||||
m_bIsHeroicMode = c->GetMap()->IsHeroic();
|
||||
Reset();
|
||||
}
|
||||
|
||||
ScriptedInstance* m_pInstance;
|
||||
bool m_bIsHeroicMode;
|
||||
uint32 StaticField_Timer;
|
||||
uint32 Checktimer;
|
||||
|
||||
void reset()
|
||||
{
|
||||
StaticField_Timer = 5000;
|
||||
}
|
||||
|
||||
void JustDied(Unit *killer)
|
||||
{
|
||||
CheckFeugenAlive = false;
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
if (StaticField_Timer < uiDiff)
|
||||
{
|
||||
DoCast(m_creature, m_bIsHeroicMode ? SPELL_STATICFIELD_H : SPELL_STATICFIELD);
|
||||
StaticField_Timer = 5000;
|
||||
}else StaticField_Timer -= uiDiff;
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_thaddius(Creature* pCreature)
|
||||
{
|
||||
return new boss_thaddiusAI (pCreature);
|
||||
}
|
||||
|
||||
CreatureAI* GetAI_mob_stalagg(Creature* pCreature)
|
||||
{
|
||||
return new mob_stalaggAI(pCreature);
|
||||
}
|
||||
|
||||
CreatureAI* GetAI_mob_feugen(Creature* pCreature)
|
||||
{
|
||||
return new mob_feugenAI(pCreature);
|
||||
}
|
||||
|
||||
void AddSC_boss_thaddius()
|
||||
{
|
||||
Script *newscript;
|
||||
@@ -138,4 +221,14 @@ void AddSC_boss_thaddius()
|
||||
newscript->Name = "boss_thaddius";
|
||||
newscript->GetAI = &GetAI_boss_thaddius;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "mob_stalagg";
|
||||
newscript->GetAI = &GetAI_mob_stalagg;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "mob_feugen";
|
||||
newscript->GetAI = &GetAI_mob_feugen;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user