*Update naxx script.
--HG-- branch : trunk
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
/* 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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
@@ -14,20 +14,16 @@
|
|||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* ScriptData
|
|
||||||
SDName: Boss_Gluth
|
|
||||||
SD%Complete: 100
|
|
||||||
SDComment:
|
|
||||||
SDCategory: Naxxramas
|
|
||||||
EndScriptData */
|
|
||||||
|
|
||||||
#include "precompiled.h"
|
#include "precompiled.h"
|
||||||
|
#include "def_naxxramas.h"
|
||||||
|
|
||||||
#define SPELL_MORTALWOUND 25646
|
#define SPELL_MORTAL_WOUND 25646
|
||||||
#define SPELL_DECIMATE 28374
|
#define SPELL_ENRAGE HEROIC(28371,54427)
|
||||||
#define SPELL_TERRIFYINGROAR 29685
|
#define SPELL_DECIMATE HEROIC(28374,54426)
|
||||||
#define SPELL_FRENZY 19812
|
#define SPELL_BERSERK 26662
|
||||||
#define SPELL_ENRAGE 28747
|
#define SPELL_INFECTED_WOUND 29306
|
||||||
|
|
||||||
|
#define MOB_ZOMBIE
|
||||||
|
|
||||||
#define ADD_1X 3269.590
|
#define ADD_1X 3269.590
|
||||||
#define ADD_1Y -3161.287
|
#define ADD_1Y -3161.287
|
||||||
@@ -65,29 +61,41 @@ EndScriptData */
|
|||||||
#define ADD_9Y -3180.766
|
#define ADD_9Y -3180.766
|
||||||
#define ADD_9Z 297.423
|
#define ADD_9Z 297.423
|
||||||
|
|
||||||
struct TRINITY_DLL_DECL boss_gluthAI : public ScriptedAI
|
enum Events
|
||||||
{
|
{
|
||||||
boss_gluthAI(Creature *c) : ScriptedAI(c) {}
|
EVENT_WOUND = 1,
|
||||||
|
EVENT_ENRAGE,
|
||||||
|
EVENT_DECIMATE,
|
||||||
|
EVENT_BERSERK,
|
||||||
|
EVENT_SUMMON,
|
||||||
|
};
|
||||||
|
|
||||||
uint32 MortalWound_Timer;
|
struct TRINITY_DLL_DECL boss_gluthAI : public BossAI
|
||||||
uint32 Decimate_Timer;
|
|
||||||
uint32 TerrifyingRoar_Timer;
|
|
||||||
uint32 Frenzy_Timer;
|
|
||||||
uint32 Enrage_Timer;
|
|
||||||
uint32 Summon_Timer;
|
|
||||||
|
|
||||||
void Reset()
|
|
||||||
{
|
{
|
||||||
MortalWound_Timer = 8000;
|
boss_gluthAI(Creature *c) : BossAI(c, BOSS_GLUTH)
|
||||||
Decimate_Timer = 100000;
|
{
|
||||||
TerrifyingRoar_Timer = 21000;
|
// Do not let Gluth be affected by zombies' debuff
|
||||||
Frenzy_Timer = 15000;
|
me->ApplySpellImmune(0, IMMUNITY_ID, SPELL_INFECTED_WOUND, true);
|
||||||
Enrage_Timer = 304000;
|
}
|
||||||
Summon_Timer = 10000;
|
|
||||||
|
void MoveInLineOfSight(Unit *who)
|
||||||
|
{
|
||||||
|
/*if(who->GetEntry() == MOB_ZOMBIE)
|
||||||
|
{
|
||||||
|
me->AddThreat(who, 1000000
|
||||||
|
}
|
||||||
|
else
|
||||||
|
BossAI::MoveInLineOfSight(who);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterCombat(Unit *who)
|
void EnterCombat(Unit *who)
|
||||||
{
|
{
|
||||||
|
_EnterCombat();
|
||||||
|
events.ScheduleEvent(EVENT_WOUND, 10000);
|
||||||
|
events.ScheduleEvent(EVENT_ENRAGE, 30000);
|
||||||
|
events.ScheduleEvent(EVENT_DECIMATE, 105000);
|
||||||
|
events.ScheduleEvent(EVENT_BERSERK, 8*60000);
|
||||||
|
events.ScheduleEvent(EVENT_SUMMON, 10000);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
@@ -95,66 +103,33 @@ struct TRINITY_DLL_DECL boss_gluthAI : public ScriptedAI
|
|||||||
if(!UpdateVictim())
|
if(!UpdateVictim())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
//MortalWound_Timer
|
events.Update(diff);
|
||||||
if (MortalWound_Timer < diff)
|
|
||||||
{
|
|
||||||
DoCast(m_creature->getVictim(),SPELL_MORTALWOUND);
|
|
||||||
MortalWound_Timer = 10000;
|
|
||||||
}else MortalWound_Timer -= diff;
|
|
||||||
|
|
||||||
//Decimate_Timer
|
while(uint32 eventId = events.ExecuteEvent())
|
||||||
if (Decimate_Timer < diff)
|
|
||||||
{
|
{
|
||||||
DoCast(m_creature->getVictim(),SPELL_DECIMATE);
|
switch(eventId)
|
||||||
Decimate_Timer = 100000;
|
|
||||||
}else Decimate_Timer -= diff;
|
|
||||||
|
|
||||||
//TerrifyingRoar_Timer
|
|
||||||
if (TerrifyingRoar_Timer < diff)
|
|
||||||
{
|
{
|
||||||
DoCast(m_creature->getVictim(),SPELL_TERRIFYINGROAR);
|
case EVENT_WOUND:
|
||||||
TerrifyingRoar_Timer = 20000;
|
DoCast(me->getVictim(), SPELL_MORTAL_WOUND);
|
||||||
}else TerrifyingRoar_Timer -= diff;
|
events.ScheduleEvent(EVENT_WOUND, 10000);
|
||||||
|
return;
|
||||||
//Frenzy_Timer
|
case EVENT_ENRAGE:
|
||||||
if (Frenzy_Timer < diff)
|
DoCast(me, SPELL_ENRAGE);
|
||||||
{
|
events.ScheduleEvent(EVENT_ENRAGE, 30000);
|
||||||
DoCast(m_creature,SPELL_FRENZY);
|
return;
|
||||||
Frenzy_Timer = 10500;
|
case EVENT_DECIMATE:
|
||||||
}else Frenzy_Timer -= diff;
|
DoCastAOE(SPELL_DECIMATE);
|
||||||
|
events.ScheduleEvent(EVENT_DECIMATE, 105000);
|
||||||
//Enrage_Timer
|
return;
|
||||||
if (Enrage_Timer < diff)
|
case EVENT_BERSERK:
|
||||||
{
|
DoCast(me, SPELL_BERSERK);
|
||||||
DoCast(m_creature,SPELL_ENRAGE);
|
return;
|
||||||
Enrage_Timer = 61000;
|
case EVENT_SUMMON:
|
||||||
}else Enrage_Timer -= diff;
|
for(uint32 i = 0; i < HEROIC(1,2); ++i)
|
||||||
|
//SummonZombie(HEROIC(1,2));
|
||||||
//Summon_Timer
|
return;
|
||||||
if (Summon_Timer < diff)
|
}
|
||||||
{
|
|
||||||
Unit* target = NULL;
|
|
||||||
Unit* SummonedZombies = NULL;
|
|
||||||
|
|
||||||
SummonedZombies = m_creature->SummonCreature(16360,ADD_1X,ADD_1Y,ADD_1Z,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000);
|
|
||||||
SummonedZombies = m_creature->SummonCreature(16360,ADD_2X,ADD_2Y,ADD_2Z,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000);
|
|
||||||
SummonedZombies = m_creature->SummonCreature(16360,ADD_3X,ADD_3Y,ADD_3Z,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000);
|
|
||||||
SummonedZombies = m_creature->SummonCreature(16360,ADD_4X,ADD_4Y,ADD_4Z,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000);
|
|
||||||
SummonedZombies = m_creature->SummonCreature(16360,ADD_5X,ADD_5Y,ADD_5Z,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000);
|
|
||||||
SummonedZombies = m_creature->SummonCreature(16360,ADD_6X,ADD_6Y,ADD_6Z,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000);
|
|
||||||
SummonedZombies = m_creature->SummonCreature(16360,ADD_7X,ADD_7Y,ADD_7Z,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000);
|
|
||||||
SummonedZombies = m_creature->SummonCreature(16360,ADD_8X,ADD_8Y,ADD_8Z,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000);
|
|
||||||
SummonedZombies = m_creature->SummonCreature(16360,ADD_9X,ADD_9Y,ADD_9Z,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000);
|
|
||||||
|
|
||||||
if (SummonedZombies)
|
|
||||||
{
|
|
||||||
target = SelectUnit(SELECT_TARGET_RANDOM,0);
|
|
||||||
if (target)
|
|
||||||
SummonedZombies->AddThreat(target,1.0f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Summon_Timer = 28000;
|
|
||||||
} else Summon_Timer -= diff;
|
|
||||||
|
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -202,16 +202,7 @@ struct TRINITY_DLL_DECL boss_gothikAI : public BossAI
|
|||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
{
|
{
|
||||||
if(!me->isInCombat())
|
if(!UpdateVictimByReact())
|
||||||
return;
|
|
||||||
|
|
||||||
if(me->getThreatManager().isThreatListEmpty())
|
|
||||||
{
|
|
||||||
EnterEvadeMode();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(me->HasReactState(REACT_AGGRESSIVE) && !UpdateVictim())
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
events.Update(diff);
|
events.Update(diff);
|
||||||
|
|||||||
@@ -44,6 +44,18 @@ const DoorData doorData[] =
|
|||||||
{0, 0, DOOR_TYPE_ROOM}, // EOF
|
{0, 0, DOOR_TYPE_ROOM}, // EOF
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const MinionData minionData[] =
|
||||||
|
{
|
||||||
|
//{16573, BOSS_ANUBREKHAN}, there is no spawn point in db, so we do not add them here
|
||||||
|
{16506, BOSS_FAERLINA},
|
||||||
|
{16803, BOSS_RAZUVIOUS},
|
||||||
|
{16063, BOSS_HORSEMEN},
|
||||||
|
{16064, BOSS_HORSEMEN},
|
||||||
|
{16065, BOSS_HORSEMEN},
|
||||||
|
{30549, BOSS_HORSEMEN},
|
||||||
|
{0, 0,}
|
||||||
|
};
|
||||||
|
|
||||||
#define GO_GOTHIK_GATE 181170
|
#define GO_GOTHIK_GATE 181170
|
||||||
|
|
||||||
#define SPELL_ERUPTION 29371
|
#define SPELL_ERUPTION 29371
|
||||||
@@ -84,9 +96,9 @@ struct TRINITY_DLL_DECL instance_naxxramas : public InstanceData
|
|||||||
{
|
{
|
||||||
SetBossNumber(MAX_BOSS_NUMBER);
|
SetBossNumber(MAX_BOSS_NUMBER);
|
||||||
LoadDoorData(doorData);
|
LoadDoorData(doorData);
|
||||||
|
LoadMinionData(minionData);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::set<Creature*> Worshipper;
|
|
||||||
std::set<GameObject*> HeiganEruption[4];
|
std::set<GameObject*> HeiganEruption[4];
|
||||||
GameObject *GothikGate;
|
GameObject *GothikGate;
|
||||||
Creature *Sapphiron;
|
Creature *Sapphiron;
|
||||||
@@ -95,9 +107,10 @@ struct TRINITY_DLL_DECL instance_naxxramas : public InstanceData
|
|||||||
{
|
{
|
||||||
switch(creature->GetEntry())
|
switch(creature->GetEntry())
|
||||||
{
|
{
|
||||||
case 15989: Sapphiron = add ? creature : NULL; break;
|
case 15989: Sapphiron = add ? creature : NULL; return;
|
||||||
case 16506: if(add) Worshipper.insert(creature); else Worshipper.erase(creature); break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AddMinion(creature, add);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnObjectCreate(GameObject* go, bool add)
|
void OnObjectCreate(GameObject* go, bool add)
|
||||||
@@ -121,20 +134,6 @@ struct TRINITY_DLL_DECL instance_naxxramas : public InstanceData
|
|||||||
AddDoor(go, add);
|
AddDoor(go, add);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetBossState(uint32 id, EncounterState state)
|
|
||||||
{
|
|
||||||
InstanceData::SetBossState(id, state);
|
|
||||||
switch(id)
|
|
||||||
{
|
|
||||||
case BOSS_FAERLINA:
|
|
||||||
if(state == NOT_STARTED)
|
|
||||||
for(std::set<Creature*>::iterator itr = Worshipper.begin(); itr != Worshipper.end(); ++itr)
|
|
||||||
if(!(*itr)->isAlive())
|
|
||||||
(*itr)->Respawn();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetData(uint32 id, uint32 value)
|
void SetData(uint32 id, uint32 value)
|
||||||
{
|
{
|
||||||
switch(id)
|
switch(id)
|
||||||
|
|||||||
@@ -4612,6 +4612,16 @@ void Spell::EffectScriptEffect(uint32 effIndex)
|
|||||||
unitTarget->RemoveAurasByTypeWithDispel(SPELL_AURA_MOD_DECREASE_SPEED, this);
|
unitTarget->RemoveAurasByTypeWithDispel(SPELL_AURA_MOD_DECREASE_SPEED, this);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// Decimate
|
||||||
|
case 28374:
|
||||||
|
case 54426:
|
||||||
|
if(unitTarget)
|
||||||
|
{
|
||||||
|
int32 damage = (int32)unitTarget->GetHealth() - (int32)unitTarget->GetMaxHealth() * 0.05f;
|
||||||
|
if(damage > 0)
|
||||||
|
m_caster->CastCustomSpell(28375, SPELLVALUE_BASE_POINT0, damage, unitTarget);
|
||||||
|
}
|
||||||
|
return;
|
||||||
// Mirren's Drinking Hat
|
// Mirren's Drinking Hat
|
||||||
case 29830:
|
case 29830:
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1952,7 +1952,7 @@ void SpellMgr::LoadPetLevelupSpellMap()
|
|||||||
|
|
||||||
for (uint8 j = 0; j < 2; ++j)
|
for (uint8 j = 0; j < 2; ++j)
|
||||||
{
|
{
|
||||||
if (creatureFamily->skillLine[j]==0)
|
if (!creatureFamily->skillLine[j])
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
for (uint32 k = 0; k < sSkillLineAbilityStore.GetNumRows(); ++k)
|
for (uint32 k = 0; k < sSkillLineAbilityStore.GetNumRows(); ++k)
|
||||||
|
|||||||
Reference in New Issue
Block a user