*Prevent summoning Nightbane more than one per instance - by Bagsac
*Convert more text to database --HG-- branch : trunk
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
DELETE FROM script_texts WHERE entry BETWEEN -1000395 AND -1000375;
|
||||
INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES
|
||||
(-1000375 ,'I remember well the sting of defeat at the conclusion of the Third War. I have waited far too long for my revenge. Now the shadow of the Legion falls over this world. It is only a matter of time until all of your failed creation... is undone.',11332,1,0,0,'kazzak SAY_INTRO'),
|
||||
(-1000376,'The Legion will conquer all!',11333,1,0,0,'kazzak SAY_AGGRO1'),
|
||||
(-1000377,'All mortals will perish!',11334,1,0,0,'kazzak SAY_AGGRO2'),
|
||||
(-1000378,'All life must be eradicated!',11335,1,0,0,'kazzak SAY_SURPREME1'),
|
||||
(-1000379,'I\'ll rip the flesh from your bones!',11336,1,0,0,'kazzak SAY_SURPREME2'),
|
||||
(-1000380,'Kirel Narak!',11337,1,0,0,'kazzak SAY_KILL1'),
|
||||
(-1000381,'Contemptible wretch!',11338,1,0,0,'kazzak SAY_KILL2'),
|
||||
(-1000382,'The universe will be remade.',11339,1,0,0,'kazzak SAY_KILL3'),
|
||||
(-1000383,'The Legion... will never... fall.',11340,1,0,0,'kazzak SAY_DEATH'),
|
||||
(-1000384,'%s goes into a frenzy!',0,2,0,0,'kazzak EMOTE_FRENZY'),
|
||||
(-1000385,'Invaders, you dangle upon the precipice of oblivion! The Burning Legion comes and with it comes your end.',0,1,0,0,'kazzak SAY_RAND1'),
|
||||
(-1000386,'Impudent whelps, you only delay the inevitable. Where one has fallen, ten shall rise. Such is the will of Kazzak...',0,1,0,0,'kazzak SAY_RAND2'),
|
||||
|
||||
(-1000387,'Do not proceed. You will be eliminated!',11344,1,0,0,'doomwalker SAY_AGGRO'),
|
||||
(-1000388,'Tectonic disruption commencing.',11345,1,0,0,'doomwalker SAY_EARTHQUAKE_1'),
|
||||
(-1000389,'Magnitude set. Release.',11346,1,0,0,'doomwalker SAY_EARTHQUAKE_2'),
|
||||
(-1000390,'Trajectory locked.',11347,1,0,0,'doomwalker SAY_OVERRUN_1'),
|
||||
(-1000391,'Engage maximum speed.',11348,1,0,0,'doomwalker SAY_OVERRUN_2'),
|
||||
(-1000392,'Threat level zero.',11349,1,0,0,'doomwalker SAY_SLAY_1'),
|
||||
(-1000393,'Directive accomplished.',11350,1,0,0,'doomwalker SAY_SLAY_2'),
|
||||
(-1000394,'Target exterminated.',11351,1,0,0,'doomwalker SAY_SLAY_3'),
|
||||
(-1000395,'System failure in five, f-o-u-r...',11352,1,0,0,'doomwalker SAY_DEATH');
|
||||
@@ -158,4 +158,6 @@ INSTALL(FILES
|
||||
956_world_scripts.sql
|
||||
957_world_scripts.sql
|
||||
963_world_scripts.sql
|
||||
965_world_scripts.sql
|
||||
966_world_scripts.sql
|
||||
DESTINATION share/trinity/sql/updates)
|
||||
|
||||
@@ -23,6 +23,19 @@ EndScriptData */
|
||||
|
||||
#include "precompiled.h"
|
||||
|
||||
#define SAY_INTRO -1000375
|
||||
#define SAY_AGGRO1 -1000376
|
||||
#define SAY_AGGRO2 -1000377
|
||||
#define SAY_SURPREME1 -1000378
|
||||
#define SAY_SURPREME2 -1000379
|
||||
#define SAY_KILL1 -1000380
|
||||
#define SAY_KILL2 -1000381
|
||||
#define SAY_KILL3 -1000382
|
||||
#define SAY_DEATH -1000383
|
||||
#define EMOTE_FRENZY -1000384
|
||||
#define SAY_RAND1 -1000385
|
||||
#define SAY_RAND2 -1000386
|
||||
|
||||
#define SPELL_SHADOWVOLLEY 32963
|
||||
#define SPELL_CLEAVE 31779
|
||||
#define SPELL_THUNDERCLAP 36706
|
||||
@@ -55,13 +68,39 @@ struct TRINITY_DLL_DECL boss_doomlordkazzakAI : public ScriptedAI
|
||||
Twisted_Reflection_Timer = 33000; // Timer may be incorrect
|
||||
}
|
||||
|
||||
void Aggro(Unit *who) {}
|
||||
void JustRespawned()
|
||||
{
|
||||
DoScriptText(SAY_INTRO, m_creature);
|
||||
}
|
||||
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0: DoScriptText(SAY_AGGRO1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_AGGRO2, m_creature); break;
|
||||
}
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim)
|
||||
{
|
||||
// When Kazzak kills a player (not pets/totems), he regens some health
|
||||
if(victim->GetTypeId() == TYPEID_PLAYER)
|
||||
if (victim->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
DoCast(m_creature,SPELL_CAPTURESOUL);
|
||||
|
||||
switch(rand()%3)
|
||||
{
|
||||
case 0: DoScriptText(SAY_KILL1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_KILL2, m_creature); break;
|
||||
case 2: DoScriptText(SAY_KILL3, m_creature); break;
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit *victim)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -112,6 +151,7 @@ struct TRINITY_DLL_DECL boss_doomlordkazzakAI : public ScriptedAI
|
||||
//Enrage_Timer
|
||||
if (Enrage_Timer < diff)
|
||||
{
|
||||
DoScriptText(EMOTE_FRENZY, m_creature);
|
||||
DoCast(m_creature,SPELL_ENRAGE);
|
||||
Enrage_Timer = 30000;
|
||||
}else Enrage_Timer -= diff;
|
||||
@@ -126,6 +166,7 @@ struct TRINITY_DLL_DECL boss_doomlordkazzakAI : public ScriptedAI
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_doomlordkazzak(Creature *_Creature)
|
||||
{
|
||||
return new boss_doomlordkazzakAI (_Creature);
|
||||
|
||||
@@ -61,9 +61,10 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance
|
||||
uint64 GamesmansExitDoor; // Door after Chess
|
||||
uint64 NetherspaceDoor; // Door at Malchezaar
|
||||
uint64 MastersTerraceDoor[2];
|
||||
|
||||
uint64 ImageGUID;
|
||||
|
||||
bool NightbaneSummoned;
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
for (uint8 i = 0; i < ENCOUNTERS; ++i)
|
||||
@@ -87,8 +88,9 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance
|
||||
NetherspaceDoor = 0;
|
||||
MastersTerraceDoor[0]= 0;
|
||||
MastersTerraceDoor[1]= 0;
|
||||
|
||||
ImageGUID = 0;
|
||||
|
||||
NightbaneSummoned = false;
|
||||
}
|
||||
|
||||
bool IsEncounterInProgress() const
|
||||
@@ -131,6 +133,9 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance
|
||||
case 17229: KilrekGUID = creature->GetGUID(); break;
|
||||
case 15688: TerestianGUID = creature->GetGUID(); break;
|
||||
case 15687: MoroesGUID = creature->GetGUID(); break;
|
||||
case 17225: if(NightbaneSummoned)creature->RemoveFromWorld();
|
||||
else NightbaneSummoned = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,49 +23,27 @@ EndScriptData */
|
||||
|
||||
#include "precompiled.h"
|
||||
|
||||
//--------------------------------------
|
||||
//Spells
|
||||
#define SPELL_SUNDER_ARMOR 33661
|
||||
|
||||
#define SPELL_CHAIN_LIGHTNING 33665
|
||||
|
||||
#define SPELL_OVERRUN 32636
|
||||
#define SAY_OVERRUN_1 "Trajectory locked."
|
||||
#define SOUND_OVERRUN_1 11347
|
||||
#define SAY_OVERRUN_2 "Engage maximum speed."
|
||||
#define SOUND_OVERRUN_2 11348
|
||||
|
||||
#define SPELL_ENRAGE 33653
|
||||
|
||||
#define SPELL_MARK_DEATH 37128
|
||||
#define SAY_AGGRO -1000387
|
||||
#define SAY_EARTHQUAKE_1 -1000388
|
||||
#define SAY_EARTHQUAKE_2 -1000389
|
||||
#define SAY_OVERRUN_1 -1000390
|
||||
#define SAY_OVERRUN_2 -1000391
|
||||
#define SAY_SLAY_1 -1000392
|
||||
#define SAY_SLAY_2 -1000393
|
||||
#define SAY_SLAY_3 -1000394
|
||||
#define SAY_DEATH -1000395
|
||||
|
||||
#define SPELL_EARTHQUAKE 32686
|
||||
#define SAY_EARTHQUAKE_1 "Tectonic disruption commencing."
|
||||
#define SOUND_EARTHQUAKE_1 11345
|
||||
#define SAY_EARTHQUAKE_2 "Magnitude set. Release."
|
||||
#define SOUND_EARTHQUAKE_2 11346
|
||||
//---------------------------------------
|
||||
//Aggro
|
||||
#define SAY_AGGRO "Do not proceed. You will be eliminated!"
|
||||
#define SOUND_AGGRO 11344
|
||||
//---------------------------------------
|
||||
//Slay
|
||||
#define SAY_SLAY_1 "Threat level zero."
|
||||
#define SOUND_SLAY_1 11349
|
||||
#define SAY_SLAY_2 "Directive accomplished."
|
||||
#define SOUND_SLAY_2 11350
|
||||
#define SAY_SLAY_3 "Target exterminated."
|
||||
#define SOUND_SLAY_3 11351
|
||||
//---------------------------------------
|
||||
//Death
|
||||
#define SAY_DEATH "System failure in five... four..."
|
||||
#define SOUND_DEATH 11352
|
||||
#define SPELL_SUNDER_ARMOR 33661
|
||||
#define SPELL_CHAIN_LIGHTNING 33665
|
||||
#define SPELL_OVERRUN 32636
|
||||
#define SPELL_ENRAGE 33653
|
||||
#define SPELL_MARK_DEATH 37128
|
||||
|
||||
struct TRINITY_DLL_DECL boss_doomwalkerAI : public ScriptedAI
|
||||
struct MANGOS_DLL_DECL boss_doomwalkerAI : public ScriptedAI
|
||||
{
|
||||
boss_doomwalkerAI(Creature *c) : ScriptedAI(c) {Reset();}
|
||||
|
||||
|
||||
uint32 Chain_Timer;
|
||||
uint32 Enrage_Timer;
|
||||
uint32 Overrun_Timer;
|
||||
@@ -92,112 +70,96 @@ struct TRINITY_DLL_DECL boss_doomwalkerAI : public ScriptedAI
|
||||
|
||||
switch(rand()%3)
|
||||
{
|
||||
case 0:
|
||||
DoYell(SAY_SLAY_1, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_SLAY_1);
|
||||
break;
|
||||
case 1:
|
||||
DoYell(SAY_SLAY_2, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_SLAY_2);
|
||||
break;
|
||||
case 2:
|
||||
DoYell(SAY_SLAY_3, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_SLAY_3);
|
||||
break;
|
||||
case 0: DoScriptText(SAY_SLAY_1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SLAY_2, m_creature); break;
|
||||
case 2: DoScriptText(SAY_SLAY_3, m_creature); break;
|
||||
}
|
||||
|
||||
DoCast(m_creature->getVictim(), SPELL_MARK_DEATH);
|
||||
}
|
||||
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
DoYell(SAY_DEATH, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_DEATH);
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
}
|
||||
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
DoYell(SAY_AGGRO, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_AGGRO);
|
||||
DoScriptText(SAY_AGGRO, m_creature);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
return;
|
||||
|
||||
//if (m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE))
|
||||
//Spell Enrage, when hp <= 20% gain enrage
|
||||
if (((m_creature->GetHealth()*100)/ m_creature->GetMaxHealth()) <= 20)
|
||||
{
|
||||
//Spell Enrage
|
||||
if (((m_creature->GetHealth()*100)/ m_creature->GetMaxHealth()) <= 20)//when hp <= 20% gain enrage
|
||||
if(Enrage_Timer < diff)
|
||||
{
|
||||
if(Enrage_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature,SPELL_ENRAGE);
|
||||
Enrage_Timer = 6000;
|
||||
InEnrage = true;
|
||||
}else Enrage_Timer -= diff;
|
||||
DoCast(m_creature,SPELL_ENRAGE);
|
||||
Enrage_Timer = 6000;
|
||||
InEnrage = true;
|
||||
}else Enrage_Timer -= diff;
|
||||
}
|
||||
|
||||
//Spell Overrun
|
||||
if (Overrun_Timer < diff)
|
||||
{
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0: DoScriptText(SAY_OVERRUN_1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_OVERRUN_2, m_creature); break;
|
||||
}
|
||||
|
||||
//Spell Overrun
|
||||
if (Overrun_Timer < diff)
|
||||
DoCast(m_creature->getVictim(),SPELL_OVERRUN);
|
||||
Overrun_Timer = 25000 + rand()%15000;
|
||||
}else Overrun_Timer -= diff;
|
||||
|
||||
//Spell Earthquake
|
||||
if (Quake_Timer < diff)
|
||||
{
|
||||
if (rand()%2)
|
||||
return;
|
||||
|
||||
switch(rand()%2)
|
||||
{
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0:
|
||||
DoYell(SAY_OVERRUN_1, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_OVERRUN_1);
|
||||
break;
|
||||
case 1:
|
||||
DoYell(SAY_OVERRUN_2, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_OVERRUN_2);
|
||||
break;
|
||||
}
|
||||
DoCast(m_creature->getVictim(),SPELL_OVERRUN);
|
||||
Overrun_Timer = 25000 + rand()%15000;
|
||||
case 0: DoScriptText(SAY_EARTHQUAKE_1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_EARTHQUAKE_2, m_creature); break;
|
||||
}
|
||||
|
||||
}else Overrun_Timer -= diff;
|
||||
//remove enrage before casting earthquake because enrage + earthquake = 16000dmg over 8sec and all dead
|
||||
if (InEnrage)
|
||||
m_creature->RemoveAura(SPELL_ENRAGE, 0);
|
||||
|
||||
//Spell Earthquake
|
||||
if (Quake_Timer < diff)
|
||||
{
|
||||
if (rand()%2)
|
||||
return;
|
||||
DoCast(m_creature,SPELL_EARTHQUAKE);
|
||||
Quake_Timer = 30000 + rand()%25000;
|
||||
}else Quake_Timer -= diff;
|
||||
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0:
|
||||
DoYell(SAY_EARTHQUAKE_1, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_EARTHQUAKE_1);
|
||||
break;
|
||||
case 1:
|
||||
DoYell(SAY_EARTHQUAKE_2, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_EARTHQUAKE_2);
|
||||
break;
|
||||
}
|
||||
if(InEnrage)
|
||||
{
|
||||
m_creature->RemoveAura(SPELL_ENRAGE, 0);//remove enrage before casting earthquake because enrage + earthquake = 16000dmg over 8sec and all dead
|
||||
}
|
||||
DoCast(m_creature,SPELL_EARTHQUAKE);
|
||||
Quake_Timer = 30000 + rand()%25000;
|
||||
}else Quake_Timer -= diff;
|
||||
//Spell Chain Lightning
|
||||
if (Chain_Timer < diff)
|
||||
{
|
||||
Unit* target = NULL;
|
||||
target = SelectUnit(SELECT_TARGET_RANDOM,1);
|
||||
|
||||
//Spell Chain Lightning
|
||||
if (Chain_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_CHAIN_LIGHTNING);
|
||||
Chain_Timer = 15000 + rand()%25000;
|
||||
}else Chain_Timer -= diff;
|
||||
if (!target)
|
||||
target = m_creature->getVictim();
|
||||
|
||||
//Spell Sunder Armor
|
||||
if (Armor_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_SUNDER_ARMOR);
|
||||
Armor_Timer = 15000 + rand()%15000;
|
||||
}else Armor_Timer -= diff;
|
||||
if (target)
|
||||
DoCast(target,SPELL_CHAIN_LIGHTNING);
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
Chain_Timer = 10000 + rand()%25000;
|
||||
}else Chain_Timer -= diff;
|
||||
|
||||
//Spell Sunder Armor
|
||||
if (Armor_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_SUNDER_ARMOR);
|
||||
Armor_Timer = 10000 + rand()%15000;
|
||||
}else Armor_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -210,7 +172,7 @@ void AddSC_boss_doomwalker()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name="boss_doomwalker";
|
||||
newscript->Name = "boss_doomwalker";
|
||||
newscript->GetAI = &GetAI_boss_doomwalker;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user