mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-13 03:32:28 -04:00
[svn] Update some Black Temple boss scripts.
Implement some Black Temple boss spells. Update maiden of virtue and void reaver scripts. Patch provided by Blaymoira. --HG-- branch : trunk
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -32,7 +32,7 @@ EndScriptData */
|
||||
#define SPELL_ATTRACTION 40871
|
||||
#define SPELL_SILENCING_SHRIEK 40823
|
||||
#define SPELL_ENRAGE 23537
|
||||
#define SPELL_SABER_LASH 43267
|
||||
#define SPELL_SABER_LASH 40810//43267
|
||||
#define SPELL_SABER_LASH_IMM 43690
|
||||
#define SPELL_TELEPORT_VISUAL 40869
|
||||
#define SPELL_BERSERK 45078
|
||||
@@ -115,6 +115,7 @@ struct TRINITY_DLL_DECL boss_shahrazAI : public ScriptedAI
|
||||
uint32 FatalAttractionTimer;
|
||||
uint32 FatalAttractionExplodeTimer;
|
||||
uint32 ShriekTimer;
|
||||
uint32 SaberTimer;
|
||||
uint32 RandomYellTimer;
|
||||
uint32 EnrageTimer;
|
||||
uint32 ExplosionCount;
|
||||
@@ -129,13 +130,14 @@ struct TRINITY_DLL_DECL boss_shahrazAI : public ScriptedAI
|
||||
for(uint8 i = 0; i<3; i++)
|
||||
TargetGUID[i] = 0;
|
||||
|
||||
BeamTimer = 60000; // Timers may be incorrect
|
||||
BeamTimer = 20000; // Timers may be incorrect
|
||||
BeamCount = 0;
|
||||
CurrentBeam = 0; // 0 - Sinister, 1 - Vile, 2 - Wicked, 3 - Sinful
|
||||
PrismaticShieldTimer = 0;
|
||||
FatalAttractionTimer = 60000;
|
||||
FatalAttractionExplodeTimer = 70000;
|
||||
ShriekTimer = 30000;
|
||||
SaberTimer = 35000;
|
||||
RandomYellTimer = 70000 + rand()%41 * 1000;
|
||||
EnrageTimer = 600000;
|
||||
ExplosionCount = 0;
|
||||
@@ -301,9 +303,15 @@ struct TRINITY_DLL_DECL boss_shahrazAI : public ScriptedAI
|
||||
if(ShriekTimer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_SILENCING_SHRIEK);
|
||||
ShriekTimer = 30000;
|
||||
ShriekTimer = 25000+rand()%10 * 1000;
|
||||
}else ShriekTimer -= diff;
|
||||
|
||||
if(SaberTimer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_SABER_LASH);
|
||||
SaberTimer = 25000+rand()%10 * 1000;
|
||||
}else SaberTimer -= diff;
|
||||
|
||||
//Enrage
|
||||
if(!m_creature->HasAura(SPELL_BERSERK, 0))
|
||||
if(EnrageTimer < diff)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -116,32 +116,27 @@ struct TRINITY_DLL_DECL npc_volcanoAI : public ScriptedAI
|
||||
SupremusGUID = 0;
|
||||
FireballTimer = 500;
|
||||
GeyserTimer = 0;
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE);
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
|
||||
void Aggro(Unit *who) {}
|
||||
void AttackStart(Unit* who) {}
|
||||
void MoveInLineOfSight(Unit* who) {}
|
||||
void SetSupremusGUID(uint64 guid) { SupremusGUID = guid; }
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(CheckTimer < diff)
|
||||
{
|
||||
if(SupremusGUID)
|
||||
{
|
||||
Unit* Supremus = NULL;
|
||||
Supremus = Unit::GetUnit((*m_creature), SupremusGUID);
|
||||
if(Supremus && (!Supremus->isAlive()))
|
||||
m_creature->DealDamage(m_creature, m_creature->GetHealth(), 0, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
}
|
||||
CheckTimer = 2000;
|
||||
}else CheckTimer -= diff;
|
||||
|
||||
if(GeyserTimer < diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_VOLCANIC_GEYSER);
|
||||
GeyserTimer = 18000;
|
||||
}else GeyserTimer -= diff;
|
||||
|
||||
if(FireballTimer < diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_VOLCANIC_FIREBALL, true);
|
||||
FireballTimer = 1000;
|
||||
}else FireballTimer -= diff;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -271,7 +266,7 @@ struct TRINITY_DLL_DECL boss_supremusAI : public ScriptedAI
|
||||
if(!m_creature->HasAura(SPELL_BERSERK, 0))
|
||||
if(BerserkTimer < diff)
|
||||
DoCast(m_creature, SPELL_BERSERK);
|
||||
else BerserkTimer -= diff;
|
||||
else BerserkTimer -= diff;
|
||||
|
||||
if(SummonFlameTimer < diff)
|
||||
{
|
||||
@@ -332,15 +327,7 @@ struct TRINITY_DLL_DECL boss_supremusAI : public ScriptedAI
|
||||
|
||||
if(target)
|
||||
{
|
||||
Creature* Volcano = NULL;
|
||||
Volcano = SummonCreature(CREATURE_VOLCANO, target);
|
||||
|
||||
if(Volcano)
|
||||
{
|
||||
DoCast(target, SPELL_VOLCANIC_ERUPTION);
|
||||
((npc_volcanoAI*)Volcano->AI())->SetSupremusGUID(m_creature->GetGUID());
|
||||
}
|
||||
|
||||
DoCast(target, SPELL_VOLCANIC_ERUPTION);
|
||||
DoTextEmote("roars and the ground begins to crack open!", NULL);
|
||||
SummonVolcanoTimer = 10000;
|
||||
}
|
||||
@@ -355,6 +342,7 @@ struct TRINITY_DLL_DECL boss_supremusAI : public ScriptedAI
|
||||
DoResetThreat();
|
||||
PhaseSwitchTimer = 60000;
|
||||
m_creature->SetSpeed(MOVE_RUN, 1.0f);
|
||||
DoZoneInCombat();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -364,6 +352,7 @@ struct TRINITY_DLL_DECL boss_supremusAI : public ScriptedAI
|
||||
SummonVolcanoTimer = 2000;
|
||||
PhaseSwitchTimer = 60000;
|
||||
m_creature->SetSpeed(MOVE_RUN, 0.9f);
|
||||
DoZoneInCombat();
|
||||
}
|
||||
}else PhaseSwitchTimer -= diff;
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Warlord_Najentus
|
||||
SD%Complete: 90
|
||||
SDComment: Using a creature workaround instead of a GO for Impaling Spine.
|
||||
SD%Complete: 95
|
||||
SDComment:
|
||||
SDCategory: Black Temple
|
||||
EndScriptData */
|
||||
|
||||
@@ -58,164 +58,82 @@ EndScriptData */
|
||||
#define SOUND_DEATH 11459
|
||||
|
||||
//Spells
|
||||
#define SPELL_CRASHINGWAVE 40100
|
||||
#define SPELL_NEEDLE_SPINE 39835
|
||||
#define SPELL_NEEDLE_AOE 39968
|
||||
#define SPELL_TIDAL_BURST 39878
|
||||
#define SPELL_TIDAL_SHIELD 39872 // Not going to use this since Hurl Spine doesn't dispel it.
|
||||
#define SPELL_TIDAL_SHIELD 39872
|
||||
#define SPELL_IMPALING_SPINE 39837
|
||||
#define SPELL_CREATE_NAJENTUS_SPINE 39956
|
||||
#define SPELL_HURL_SPINE 39948
|
||||
#define SPELL_SHIELD_VISUAL 37136
|
||||
#define SPELL_BERSERK 45078
|
||||
|
||||
#define DISPLAYID_SPINE 7362
|
||||
|
||||
struct TRINITY_DLL_DECL mob_najentus_spineAI : public ScriptedAI
|
||||
{
|
||||
mob_najentus_spineAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
Reset();
|
||||
}
|
||||
|
||||
uint64 SpineVictimGUID;
|
||||
|
||||
void Reset() { SpineVictimGUID = 0; }
|
||||
|
||||
void SetSpineVictimGUID(uint64 guid){ SpineVictimGUID = guid; }
|
||||
|
||||
void JustDied(Unit *killer)
|
||||
{
|
||||
// Make the killer have the Najentus Spine item to pierce Tidal Shield
|
||||
if(killer)
|
||||
killer->CastSpell(killer, SPELL_CREATE_NAJENTUS_SPINE, true);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit *done_by, uint32 &damage)
|
||||
{
|
||||
if(damage < m_creature->GetHealth()) return;
|
||||
|
||||
// Remove the Impaling Spine DoT from whoever was affected
|
||||
if(SpineVictimGUID)
|
||||
{
|
||||
Unit* victim = Unit::GetUnit((*m_creature), SpineVictimGUID);
|
||||
if(victim && ((victim->HasAura(SPELL_IMPALING_SPINE, 0)) || (victim->HasAura(SPELL_IMPALING_SPINE, 1)) || (victim->HasAura(SPELL_IMPALING_SPINE, 2))))
|
||||
victim->RemoveAurasDueToSpell(SPELL_IMPALING_SPINE);
|
||||
}
|
||||
}
|
||||
|
||||
void Aggro(Unit* who) {}
|
||||
void AttackStart(Unit* who) {}
|
||||
void MoveInLineOfSight(Unit* who) {}
|
||||
void UpdateAI(const uint32 diff) {}
|
||||
};
|
||||
#define GOBJECT_SPINE 185584
|
||||
|
||||
struct TRINITY_DLL_DECL boss_najentusAI : public ScriptedAI
|
||||
{
|
||||
boss_najentusAI(Creature *c) : ScriptedAI(c)
|
||||
boss_najentusAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
||||
Reset();
|
||||
}
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
uint32 CrashingWaveTimer;
|
||||
|
||||
uint32 NeedleSpineTimer;
|
||||
uint32 EnrageTimer;
|
||||
uint32 SpecialYellTimer;
|
||||
uint32 TidalShieldTimer;
|
||||
uint32 ImpalingSpineTimer;
|
||||
uint32 CheckTimer; // This timer checks if Najentus is Tidal Shielded and if so, regens health. If not, sets IsShielded to false
|
||||
uint32 DispelShieldTimer; // This shield is only supposed to last 30 seconds, but the SPELL_SHIELD_VISUAL lasts forever
|
||||
|
||||
uint64 SpineTargetGUID;
|
||||
uint64 SpineGUID;
|
||||
|
||||
bool IsShielded;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
IsShielded = false;
|
||||
|
||||
CrashingWaveTimer = 28000;
|
||||
NeedleSpineTimer = 10000;
|
||||
EnrageTimer = 480000;
|
||||
SpecialYellTimer = 45000 + (rand()%76)*1000;
|
||||
TidalShieldTimer = 60000;
|
||||
ImpalingSpineTimer = 45000;
|
||||
CheckTimer = 2000;
|
||||
DispelShieldTimer = 30000;
|
||||
|
||||
ResetTimer();
|
||||
|
||||
SpineTargetGUID = 0;
|
||||
SpineGUID = 0;
|
||||
|
||||
if(pInstance)
|
||||
{
|
||||
if(m_creature->isAlive())
|
||||
{
|
||||
pInstance->SetData(DATA_HIGHWARLORDNAJENTUSEVENT, NOT_STARTED);
|
||||
ToggleGate(true);
|
||||
}
|
||||
else ToggleGate(false);
|
||||
}
|
||||
pInstance->SetData(DATA_HIGHWARLORDNAJENTUSEVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
{
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0:
|
||||
DoYell(SAY_SLAY1,LANG_UNIVERSAL,NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_SLAY1);
|
||||
break;
|
||||
case 1:
|
||||
DoYell(SAY_SLAY2,LANG_UNIVERSAL,NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_SLAY2);
|
||||
break;
|
||||
case 0:
|
||||
DoYell(SAY_SLAY1,LANG_UNIVERSAL,NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_SLAY1);
|
||||
break;
|
||||
case 1:
|
||||
DoYell(SAY_SLAY2,LANG_UNIVERSAL,NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_SLAY2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit *victim)
|
||||
{
|
||||
if(pInstance)
|
||||
{
|
||||
pInstance->SetData(DATA_HIGHWARLORDNAJENTUSEVENT, DONE);
|
||||
ToggleGate(false);
|
||||
}
|
||||
|
||||
DoYell(SAY_DEATH, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature,SOUND_DEATH);
|
||||
}
|
||||
|
||||
void ToggleGate(bool close)
|
||||
{
|
||||
if(GameObject* Gate = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_GAMEOBJECT_NAJENTUS_GATE)))
|
||||
if(close) Gate->SetGoState(0); // Closed
|
||||
else Gate->SetGoState(2); // Opened
|
||||
}
|
||||
|
||||
void SpellHit(Unit *caster, const SpellEntry *spell)
|
||||
{
|
||||
if(IsShielded)
|
||||
if(spell->Id == SPELL_HURL_SPINE && m_creature->HasAura(SPELL_TIDAL_SHIELD, 0))
|
||||
{
|
||||
if(spell->Id == SPELL_HURL_SPINE)
|
||||
{
|
||||
if(m_creature->HasAura(SPELL_SHIELD_VISUAL, 0))
|
||||
m_creature->RemoveAurasDueToSpell(SPELL_SHIELD_VISUAL);
|
||||
if(m_creature->HasAura(SPELL_TIDAL_SHIELD, 0))
|
||||
m_creature->RemoveAurasDueToSpell(SPELL_TIDAL_SHIELD);
|
||||
DoCast(m_creature->getVictim(), SPELL_TIDAL_BURST);
|
||||
IsShielded = false;
|
||||
}
|
||||
m_creature->RemoveAurasDueToSpell(SPELL_TIDAL_SHIELD);
|
||||
m_creature->CastSpell(m_creature, SPELL_TIDAL_BURST, true);
|
||||
ResetTimer();
|
||||
}
|
||||
}
|
||||
|
||||
void DamageTaken(Unit *done_by, uint32 &damage)
|
||||
{
|
||||
if(IsShielded)
|
||||
damage = 0;
|
||||
}
|
||||
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
if(pInstance)
|
||||
@@ -223,90 +141,44 @@ struct TRINITY_DLL_DECL boss_najentusAI : public ScriptedAI
|
||||
|
||||
DoYell(SAY_AGGRO, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_AGGRO);
|
||||
|
||||
DoZoneInCombat();
|
||||
}
|
||||
|
||||
// This is a workaround since we cannot summon GameObjects at will.
|
||||
// Instead, we create a custom creature on top of the player.
|
||||
// When someone kills the creature, the killer gets the "Naj'entus Spine" item.
|
||||
// This item is the only item that should be able to pierce Tidal Shield
|
||||
void DoImpalingSpineWorkaround(Unit* target)
|
||||
bool RemoveImpalingSpine()
|
||||
{
|
||||
Creature* Spine = NULL;
|
||||
Spine = m_creature->SummonCreature(500000, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_DEAD_DESPAWN, 10000);
|
||||
if(Spine)
|
||||
{
|
||||
Spine->setFaction(m_creature->getFaction());
|
||||
((mob_najentus_spineAI*)Spine->AI())->SetSpineVictimGUID(target->GetGUID());
|
||||
SpineTargetGUID = target->GetGUID();
|
||||
}
|
||||
if(!SpineTargetGUID) return false;
|
||||
Unit* target = Unit::GetUnit(*m_creature, SpineTargetGUID);
|
||||
if(target && target->HasAura(SPELL_IMPALING_SPINE, 1))
|
||||
target->RemoveAurasDueToSpell(SPELL_IMPALING_SPINE);
|
||||
SpineTargetGUID=0;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool RemoveImpalingSpine(uint64 guid)
|
||||
void ResetTimer(uint32 inc = 0)
|
||||
{
|
||||
if(!IsShielded || guid == SpineTargetGUID) return false;
|
||||
|
||||
if(SpineTargetGUID)
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*m_creature), SpineTargetGUID);
|
||||
if(target && target->HasAura(SPELL_IMPALING_SPINE, 0))
|
||||
{
|
||||
target->RemoveAurasDueToSpell(SPELL_IMPALING_SPINE);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
NeedleSpineTimer = 10000 + inc;
|
||||
TidalShieldTimer = 60000 + inc;
|
||||
ImpalingSpineTimer = 20000 + inc;
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
return;
|
||||
|
||||
if(CheckTimer < diff)
|
||||
if(TidalShieldTimer < diff)
|
||||
{
|
||||
// if(m_creature->HasAura(SPELL_TIDAL_SHIELD, 0))
|
||||
if(m_creature->HasAura(SPELL_SHIELD_VISUAL, 0))
|
||||
m_creature->SetHealth(m_creature->GetHealth() + (m_creature->GetMaxHealth()/100));
|
||||
else
|
||||
IsShielded = false;
|
||||
m_creature->InterruptNonMeleeSpells(false);
|
||||
DoCast(m_creature, SPELL_TIDAL_SHIELD, true);
|
||||
ResetTimer(45000);
|
||||
}else TidalShieldTimer -= diff;
|
||||
|
||||
CheckTimer = 2000;
|
||||
}else CheckTimer -= diff;
|
||||
|
||||
if(IsShielded)
|
||||
{
|
||||
m_creature->GetMotionMaster()->Clear(false);
|
||||
m_creature->GetMotionMaster()->MoveIdle();
|
||||
if(!m_creature->HasAura(SPELL_SHIELD_VISUAL, 0))
|
||||
DoCast(m_creature, SPELL_SHIELD_VISUAL);
|
||||
if(DispelShieldTimer < diff)
|
||||
{
|
||||
m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim());
|
||||
if(m_creature->HasAura(SPELL_SHIELD_VISUAL, 0))
|
||||
m_creature->RemoveAurasDueToSpell(SPELL_SHIELD_VISUAL);
|
||||
IsShielded = false;
|
||||
}else DispelShieldTimer -= diff;
|
||||
|
||||
return; // Don't cast or do anything while Shielded
|
||||
}
|
||||
|
||||
// Crashing Wave
|
||||
if(CrashingWaveTimer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_CRASHINGWAVE);
|
||||
CrashingWaveTimer = 28500;
|
||||
}else CrashingWaveTimer -= diff;
|
||||
|
||||
if(!m_creature->HasAura(SPELL_BERSERK, 0))
|
||||
if(EnrageTimer < diff)
|
||||
if(EnrageTimer < diff)
|
||||
{
|
||||
DoYell(SAY_ENRAGE, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_ENRAGE);
|
||||
DoCast(m_creature, SPELL_BERSERK);
|
||||
m_creature->CastSpell(m_creature, SPELL_BERSERK, true);
|
||||
EnrageTimer = 600000;
|
||||
}else EnrageTimer -= diff;
|
||||
|
||||
// Needle
|
||||
@@ -315,27 +187,24 @@ struct TRINITY_DLL_DECL boss_najentusAI : public ScriptedAI
|
||||
for(uint8 i = 0; i < 3; ++i)
|
||||
{
|
||||
Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 1);
|
||||
if(!target)
|
||||
target = m_creature->getVictim();
|
||||
|
||||
DoCast(target, SPELL_NEEDLE_AOE, true);
|
||||
DoCast(target, SPELL_NEEDLE_SPINE);
|
||||
if(!target) target = m_creature->getVictim();
|
||||
m_creature->CastSpell(target, SPELL_NEEDLE_SPINE, true);
|
||||
}
|
||||
|
||||
NeedleSpineTimer = 60000;
|
||||
m_creature->SetInFront(m_creature->getVictim());
|
||||
NeedleSpineTimer = 30000;
|
||||
}else NeedleSpineTimer -= diff;
|
||||
|
||||
if(SpecialYellTimer < diff)
|
||||
{
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0:
|
||||
DoPlaySoundToSet(m_creature, SOUND_SPECIAL1);
|
||||
break;
|
||||
case 1:
|
||||
DoYell(SAY_SPECIAL2, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_SPECIAL2);
|
||||
break;
|
||||
case 0:
|
||||
DoPlaySoundToSet(m_creature, SOUND_SPECIAL1);
|
||||
break;
|
||||
case 1:
|
||||
DoYell(SAY_SPECIAL2, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_SPECIAL2);
|
||||
break;
|
||||
}
|
||||
SpecialYellTimer = 25000 + (rand()%76)*1000;
|
||||
}else SpecialYellTimer -= diff;
|
||||
@@ -343,73 +212,43 @@ struct TRINITY_DLL_DECL boss_najentusAI : public ScriptedAI
|
||||
if(ImpalingSpineTimer < diff)
|
||||
{
|
||||
Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 1);
|
||||
if(!target)
|
||||
target = m_creature->getVictim();
|
||||
if(!target) target = m_creature->getVictim();
|
||||
m_creature->CastSpell(target, SPELL_IMPALING_SPINE, true);
|
||||
m_creature->SetInFront(m_creature->getVictim());
|
||||
SpineTargetGUID = target->GetGUID();
|
||||
m_creature->SummonGameObject(GOBJECT_SPINE, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), m_creature->GetOrientation(), 0, 0, 0, 0, 30);
|
||||
|
||||
if(target && (target->GetTypeId() == TYPEID_PLAYER))
|
||||
switch(rand()%2)
|
||||
{
|
||||
DoCast(target, SPELL_IMPALING_SPINE);
|
||||
//DoImpalingSpineWorkaround(target);
|
||||
SpineTargetGUID = target->GetGUID();
|
||||
ImpalingSpineTimer = 45000;
|
||||
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0:
|
||||
DoYell(SAY_NEEDLE1, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_NEEDLE1);
|
||||
break;
|
||||
case 1:
|
||||
DoYell(SAY_NEEDLE2, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_NEEDLE2);
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
DoYell(SAY_NEEDLE1, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_NEEDLE1);
|
||||
break;
|
||||
case 1:
|
||||
DoYell(SAY_NEEDLE2, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_NEEDLE2);
|
||||
break;
|
||||
}
|
||||
ImpalingSpineTimer = 21000;
|
||||
}else ImpalingSpineTimer -= diff;
|
||||
|
||||
if(TidalShieldTimer < diff)
|
||||
{
|
||||
m_creature->InterruptNonMeleeSpells(false);
|
||||
DoCast(m_creature, SPELL_SHIELD_VISUAL, true);
|
||||
// DoCast(m_creature, SPELL_TIDAL_SHIELD);
|
||||
m_creature->GetMotionMaster()->Clear(false);
|
||||
m_creature->GetMotionMaster()->MoveIdle();
|
||||
IsShielded = true;
|
||||
TidalShieldTimer = 60000;
|
||||
CheckTimer = 2000;
|
||||
DispelShieldTimer = 30000;
|
||||
}else TidalShieldTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
bool GOHello_go_najentus_spine(Player *player, GameObject* _GO)
|
||||
{
|
||||
ScriptedInstance* pInstance = ((ScriptedInstance*)_GO->GetInstanceData());
|
||||
if(pInstance)
|
||||
{
|
||||
uint64 NajentusGUID = pInstance->GetData64(DATA_HIGHWARLORDNAJENTUS);
|
||||
if(NajentusGUID)
|
||||
{
|
||||
Creature* Najentus = ((Creature*)Unit::GetUnit((*_GO), NajentusGUID));
|
||||
if(Najentus)
|
||||
if(ScriptedInstance* pInstance = (ScriptedInstance*)_GO->GetInstanceData())
|
||||
if(Creature* Najentus = (Creature*)Unit::GetUnit(*_GO, pInstance->GetData64(DATA_HIGHWARLORDNAJENTUS)))
|
||||
if(((boss_najentusAI*)Najentus->AI())->RemoveImpalingSpine())
|
||||
{
|
||||
if(((boss_najentusAI*)Najentus->AI())->RemoveImpalingSpine(player->GetGUID()))
|
||||
return true;
|
||||
}else error_log("ERROR: Na'entus Spine GameObject unable to find Naj'entus");
|
||||
}else error_log("ERROR: Invalid GUID acquired for Naj'entus by Naj'entus Spine GameObject");
|
||||
}
|
||||
else error_log("ERROR: Naj'entus Spine spawned in invalid instance or location");
|
||||
|
||||
player->CastSpell(player, SPELL_CREATE_NAJENTUS_SPINE, true);
|
||||
_GO->SetLootState(GO_NOT_READY);
|
||||
_GO->SetRespawnTime(0);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
CreatureAI* GetAI_mob_najentus_spine(Creature *_Creature)
|
||||
{
|
||||
return new mob_najentus_spineAI (_Creature);
|
||||
}
|
||||
|
||||
CreatureAI* GetAI_boss_najentus(Creature *_Creature)
|
||||
{
|
||||
return new boss_najentusAI (_Creature);
|
||||
@@ -423,11 +262,6 @@ void AddSC_boss_najentus()
|
||||
newscript->GetAI = GetAI_boss_najentus;
|
||||
m_scripts[nrscripts++] = newscript;
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "mob_najentus_spine";
|
||||
newscript->GetAI = GetAI_mob_najentus_spine;
|
||||
m_scripts[nrscripts++] = newscript;
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "go_najentus_spine";
|
||||
newscript->pGOHello = &GOHello_go_najentus_spine;
|
||||
|
||||
@@ -126,12 +126,15 @@ struct TRINITY_DLL_DECL instance_black_temple : public ScriptedInstance
|
||||
break;
|
||||
case 185905: // Gate leading to Temple Summit
|
||||
IllidanGate = go->GetGUID();
|
||||
go->SetUInt32Value(GAMEOBJECT_FLAGS,GO_FLAG_NODESPAWN+GO_FLAG_INTERACT_COND);
|
||||
break;
|
||||
case 186261: // Right door at Temple Summit
|
||||
IllidanDoor[0] = go->GetGUID();
|
||||
go->SetUInt32Value(GAMEOBJECT_FLAGS,GO_FLAG_NODESPAWN+GO_FLAG_INTERACT_COND);
|
||||
break;
|
||||
case 186262: // Left door at Temple Summit
|
||||
IllidanDoor[1] = go->GetGUID();
|
||||
go->SetUInt32Value(GAMEOBJECT_FLAGS,GO_FLAG_NODESPAWN+GO_FLAG_INTERACT_COND);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ EndScriptData */
|
||||
#define SPELL_HOLYFIRE 29522
|
||||
#define SPELL_HOLYWRATH 32445
|
||||
#define SPELL_HOLYGROUND 29512
|
||||
#define SPELL_BERSERK 26662
|
||||
|
||||
#define SAY_AGGRO "Your behavior will not be tolerated!"
|
||||
#define SAY_SLAY1 "Ah ah ah..."
|
||||
@@ -52,6 +53,9 @@ struct TRINITY_DLL_DECL boss_maiden_of_virtueAI : public ScriptedAI
|
||||
uint32 Holyfire_Timer;
|
||||
uint32 Holywrath_Timer;
|
||||
uint32 Holyground_Timer;
|
||||
uint32 Enrage_Timer;
|
||||
|
||||
bool Enraged;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -59,6 +63,12 @@ struct TRINITY_DLL_DECL boss_maiden_of_virtueAI : public ScriptedAI
|
||||
Holyfire_Timer = 8000+(rand()%17000);
|
||||
Holywrath_Timer = 20000+(rand()%10000);
|
||||
Holyground_Timer = 3000;
|
||||
Enrage_Timer = 600000;
|
||||
|
||||
Enraged = false;
|
||||
|
||||
m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true);
|
||||
m_creature->ApplySpellImmune(1, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* Victim)
|
||||
@@ -67,18 +77,18 @@ struct TRINITY_DLL_DECL boss_maiden_of_virtueAI : public ScriptedAI
|
||||
|
||||
switch(rand()%3)
|
||||
{
|
||||
case 0:
|
||||
DoYell(SAY_SLAY1,LANG_UNIVERSAL,Victim);
|
||||
DoPlaySoundToSet(m_creature, SOUND_SLAY1);
|
||||
break;
|
||||
case 1:
|
||||
DoYell(SAY_SLAY2,LANG_UNIVERSAL,Victim);
|
||||
DoPlaySoundToSet(m_creature, SOUND_SLAY2);
|
||||
break;
|
||||
case 2:
|
||||
DoYell(SAY_SLAY3,LANG_UNIVERSAL,Victim);
|
||||
DoPlaySoundToSet(m_creature, SOUND_SLAY3);
|
||||
break;
|
||||
case 0:
|
||||
DoYell(SAY_SLAY1,LANG_UNIVERSAL,Victim);
|
||||
DoPlaySoundToSet(m_creature, SOUND_SLAY1);
|
||||
break;
|
||||
case 1:
|
||||
DoYell(SAY_SLAY2,LANG_UNIVERSAL,Victim);
|
||||
DoPlaySoundToSet(m_creature, SOUND_SLAY2);
|
||||
break;
|
||||
case 2:
|
||||
DoYell(SAY_SLAY3,LANG_UNIVERSAL,Victim);
|
||||
DoPlaySoundToSet(m_creature, SOUND_SLAY3);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,6 +109,12 @@ struct TRINITY_DLL_DECL boss_maiden_of_virtueAI : public ScriptedAI
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
return;
|
||||
|
||||
if (Enrage_Timer < diff && !Enraged)
|
||||
{
|
||||
DoCast(m_creature, SPELL_BERSERK,true);
|
||||
Enraged = true;
|
||||
}else Enrage_Timer -=diff;
|
||||
|
||||
if (Holyground_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_HOLYGROUND, true); //Triggered so it doesn't interrupt her at all
|
||||
@@ -111,37 +127,28 @@ struct TRINITY_DLL_DECL boss_maiden_of_virtueAI : public ScriptedAI
|
||||
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0:
|
||||
DoYell(SAY_REPENTANCE1,LANG_UNIVERSAL,NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_REPENTANCE1);
|
||||
break;
|
||||
case 1:
|
||||
DoYell(SAY_REPENTANCE2,LANG_UNIVERSAL,NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_REPENTANCE2);
|
||||
break;
|
||||
case 0:
|
||||
DoYell(SAY_REPENTANCE1,LANG_UNIVERSAL,NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_REPENTANCE1);
|
||||
break;
|
||||
case 1:
|
||||
DoYell(SAY_REPENTANCE2,LANG_UNIVERSAL,NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_REPENTANCE2);
|
||||
break;
|
||||
}
|
||||
Repentance_Timer = 30000 + rand()%15000; //A little randomness on that spell
|
||||
}else Repentance_Timer -= diff;
|
||||
|
||||
if (Holyfire_Timer < diff)
|
||||
{
|
||||
//Time for an omgwtfpwn code to make maiden cast holy fire only on units outside the holy ground's 18 yard range
|
||||
Unit* target = NULL;
|
||||
std::list<HostilReference *> t_list = m_creature->getThreatManager().getThreatList();
|
||||
std::vector<Unit *> target_list;
|
||||
for(std::list<HostilReference *>::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
|
||||
target = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||
|
||||
if(target)
|
||||
{
|
||||
target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid());
|
||||
if(target && target->GetDistance2d(m_creature) > 12 )
|
||||
target_list.push_back(target);
|
||||
target = NULL;
|
||||
DoCast(target,SPELL_HOLYFIRE);
|
||||
Holyfire_Timer = 8000 + rand()%17000; //Anywhere from 8 to 25 seconds, good luck having several of those in a row!
|
||||
}
|
||||
if(target_list.size())
|
||||
target = *(target_list.begin()+rand()%target_list.size());
|
||||
|
||||
DoCast(target,SPELL_HOLYFIRE);
|
||||
|
||||
Holyfire_Timer = 8000 + rand()%17000; //Anywhere from 8 to 25 seconds, good luck having several of those in a row!
|
||||
}else Holyfire_Timer -= diff;
|
||||
|
||||
if (Holywrath_Timer < diff)
|
||||
|
||||
@@ -25,7 +25,7 @@ EndScriptData */
|
||||
#include "def_the_eye.h"
|
||||
|
||||
#define SPELL_POUNDING 34162
|
||||
#define SPELL_ARCANE_ORB_TRIGGER 34172
|
||||
#define SPELL_ARCANE_ORB 34172
|
||||
#define SPELL_KNOCK_AWAY 11130
|
||||
#define SPELL_BERSERK 27680
|
||||
|
||||
@@ -45,8 +45,6 @@ EndScriptData */
|
||||
#define SOUND_POUNDING1 11218
|
||||
#define SOUND_POUNDING2 11219
|
||||
|
||||
#define CREATURE_ORB_TARGET 19577
|
||||
|
||||
struct TRINITY_DLL_DECL boss_void_reaverAI : public ScriptedAI
|
||||
{
|
||||
boss_void_reaverAI(Creature *c) : ScriptedAI(c)
|
||||
@@ -64,8 +62,11 @@ struct TRINITY_DLL_DECL boss_void_reaverAI : public ScriptedAI
|
||||
|
||||
void Reset()
|
||||
{
|
||||
m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true);
|
||||
m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_ATTACK_ME, true);
|
||||
|
||||
Pounding_Timer = 12000;
|
||||
ArcaneOrb_Timer = 3000;
|
||||
ArcaneOrb_Timer = 6000;
|
||||
KnockAway_Timer = 30000;
|
||||
Berserk_Timer = 600000;
|
||||
|
||||
@@ -143,8 +144,8 @@ struct TRINITY_DLL_DECL boss_void_reaverAI : public ScriptedAI
|
||||
for(std::list<HostilReference *>::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
|
||||
{
|
||||
target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid());
|
||||
//15 yard radius minimum
|
||||
if(target && target->GetDistance2d(m_creature) > 15)
|
||||
//18 yard radius minimum
|
||||
if(target && target->GetDistance2d(m_creature) > 18)
|
||||
target_list.push_back(target);
|
||||
target = NULL;
|
||||
}
|
||||
@@ -152,14 +153,9 @@ struct TRINITY_DLL_DECL boss_void_reaverAI : public ScriptedAI
|
||||
target = *(target_list.begin()+rand()%target_list.size());
|
||||
|
||||
if (target)
|
||||
{
|
||||
Unit* Spawn = NULL;
|
||||
Spawn = m_creature->SummonCreature(CREATURE_ORB_TARGET, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 10000);
|
||||
if (Spawn)
|
||||
m_creature->CastSpell(Spawn, SPELL_ARCANE_ORB_TRIGGER, true);
|
||||
}
|
||||
m_creature->CastSpell(target, SPELL_ARCANE_ORB, true);
|
||||
|
||||
ArcaneOrb_Timer = 3000;
|
||||
ArcaneOrb_Timer = 6000;
|
||||
}else ArcaneOrb_Timer -= diff;
|
||||
|
||||
// Single Target knock back, reduces aggro
|
||||
|
||||
@@ -1650,8 +1650,21 @@ void Aura::TriggerSpell()
|
||||
// case 40867: break;
|
||||
// // Prismatic Shield
|
||||
// case 40879: break;
|
||||
// // Aura of Desire
|
||||
// case 41350: break;
|
||||
// Aura of Desire
|
||||
case 41350:
|
||||
{
|
||||
Unit::AuraList const& mMod = m_target->GetAurasByType(SPELL_AURA_MOD_INCREASE_ENERGY_PERCENT);
|
||||
for(Unit::AuraList::const_iterator i = mMod.begin(); i != mMod.end(); ++i)
|
||||
{
|
||||
if ((*i)->GetId() == 41350)
|
||||
{
|
||||
(*i)->ApplyModifier(false);
|
||||
(*i)->GetModifier()->m_amount -= 5;
|
||||
(*i)->ApplyModifier(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}break;
|
||||
// // Dementia
|
||||
// case 41404: break;
|
||||
// // Chaos Form
|
||||
@@ -5614,6 +5627,21 @@ void Aura::PeriodicTick()
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 41337:// aura of anger
|
||||
{
|
||||
Unit::AuraList const& mMod = m_target->GetAurasByType(SPELL_AURA_MOD_DAMAGE_PERCENT_DONE);
|
||||
for(Unit::AuraList::const_iterator i = mMod.begin(); i != mMod.end(); ++i)
|
||||
{
|
||||
if ((*i)->GetId() == 41337)
|
||||
{
|
||||
(*i)->ApplyModifier(false);
|
||||
(*i)->GetModifier()->m_amount += 5;
|
||||
(*i)->ApplyModifier(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
m_modifier.m_amount += 100;
|
||||
}break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -4665,15 +4665,6 @@ void Spell::EffectScriptEffect(uint32 effIndex)
|
||||
break;
|
||||
}
|
||||
|
||||
// Dreaming Glory
|
||||
case 28698:
|
||||
{
|
||||
if(!unitTarget)
|
||||
return;
|
||||
unitTarget->CastSpell(unitTarget, 28694, true);
|
||||
break;
|
||||
}
|
||||
|
||||
// Netherbloom
|
||||
case 28702:
|
||||
{
|
||||
@@ -4748,22 +4739,6 @@ void Spell::EffectScriptEffect(uint32 effIndex)
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 41126: // Flame Crash
|
||||
{
|
||||
if(!unitTarget)
|
||||
return;
|
||||
|
||||
unitTarget->CastSpell(unitTarget, 41131, true);
|
||||
break;
|
||||
}
|
||||
case 44876: // Force Cast - Portal Effect: Sunwell Isle
|
||||
{
|
||||
if(!unitTarget)
|
||||
return;
|
||||
|
||||
unitTarget->CastSpell(unitTarget, 44870, true);
|
||||
break;
|
||||
}
|
||||
|
||||
// Goblin Weather Machine
|
||||
case 46203:
|
||||
@@ -4790,14 +4765,32 @@ void Spell::EffectScriptEffect(uint32 effIndex)
|
||||
unitTarget->CastSpell(unitTarget, spellId, true);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(!unitTarget || !unitTarget->isAlive()) // can we remove this check?
|
||||
{
|
||||
sLog.outError("Spell %u in EffectScriptEffect does not have unitTarget", m_spellInfo->Id);
|
||||
return;
|
||||
}
|
||||
|
||||
switch(m_spellInfo->Id)
|
||||
{
|
||||
// Dreaming Glory
|
||||
case 28698: unitTarget->CastSpell(unitTarget, 28694, true); break;
|
||||
// Needle Spine
|
||||
case 39835: unitTarget->CastSpell(unitTarget, 39968, true); break;
|
||||
// Draw Soul
|
||||
case 40904: unitTarget->CastSpell(m_caster, 40903, true); break;
|
||||
// Flame Crash
|
||||
case 41126: unitTarget->CastSpell(unitTarget, 41131, true); break;
|
||||
// Force Cast - Portal Effect: Sunwell Isle
|
||||
case 44876: unitTarget->CastSpell(unitTarget, 44870, true); break;
|
||||
//5,000 Gold
|
||||
case 46642:
|
||||
{
|
||||
if(!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
((Player*)unitTarget)->ModifyMoney(50000000);
|
||||
|
||||
if(unitTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)unitTarget)->ModifyMoney(50000000);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -4809,8 +4802,6 @@ void Spell::EffectScriptEffect(uint32 effIndex)
|
||||
// Judgement
|
||||
case 0x800000:
|
||||
{
|
||||
if(!unitTarget || !unitTarget->isAlive())
|
||||
return;
|
||||
uint32 spellId2 = 0;
|
||||
|
||||
// all seals have aura dummy
|
||||
@@ -4861,9 +4852,6 @@ void Spell::EffectScriptEffect(uint32 effIndex)
|
||||
}
|
||||
|
||||
// normal DB scripted effect
|
||||
if(!unitTarget)
|
||||
return;
|
||||
|
||||
sLog.outDebug("Spell ScriptStart spellid %u in EffectScriptEffect ", m_spellInfo->Id);
|
||||
sWorld.ScriptsStart(sSpellScripts, m_spellInfo->Id, m_caster, unitTarget);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user