mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 00:48:56 +01:00
[svn] Fix a bug that shaman's shield can stack.
Fix: MovementInform without behavior change for waypoint movement. Patch provided by DragonHunter. Update gruul lair script. Patch provided by Blaymoira. --HG-- branch : trunk
This commit is contained in:
@@ -66,22 +66,45 @@ struct TRINITY_DLL_DECL boss_gruulAI : public ScriptedAI
|
||||
Reverberation_Timer= 60000+45000;
|
||||
|
||||
if(pInstance)
|
||||
pInstance->SetData(DATA_GRUULEVENT, 0);
|
||||
{
|
||||
pInstance->SetData(DATA_GRUULEVENT, NOT_STARTED);
|
||||
|
||||
GameObject* Door = NULL;
|
||||
Door = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GRUULDOOR));
|
||||
if(Door)
|
||||
Door->SetGoState(0);
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
if(pInstance)
|
||||
pInstance->SetData(DATA_GRUULEVENT, 1);
|
||||
{
|
||||
pInstance->SetData(DATA_GRUULEVENT, DONE);
|
||||
|
||||
GameObject* Door = NULL;
|
||||
Door = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GRUULDOOR));
|
||||
if(Door)
|
||||
Door->SetGoState(0);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
|
||||
DoYell(SAY_AGGRO,LANG_UNIVERSAL,NULL);
|
||||
DoZoneInCombat();
|
||||
|
||||
if(pInstance)
|
||||
pInstance->SetData(DATA_GRUULEVENT, 1);
|
||||
{
|
||||
pInstance->SetData(DATA_GRUULEVENT, IN_PROGRESS);
|
||||
|
||||
GameObject* Door = NULL;
|
||||
Door = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GRUULDOOR));
|
||||
if(Door)
|
||||
Door->SetGoState(1);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
|
||||
@@ -16,43 +16,51 @@
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_High_King_Maulgar
|
||||
SD%Complete: 80
|
||||
SDComment: Verify that the script is working properly
|
||||
SD%Complete: 90
|
||||
SDComment: Correct timers, after whirlwind melee attack bug, prayer of healing
|
||||
SDCategory: Gruul's Lair
|
||||
EndScriptData */
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "def_gruuls_lair.h"
|
||||
|
||||
#define SOUND_AGGRO 11367 //"Gronn are the real power in outland."
|
||||
|
||||
#define SOUND_ENRAGE 11368 //"You will not defeat the hand of Gruul!"
|
||||
|
||||
#define SOUND_OGRE_DEATH1 11369 //"You won't kill next one so easy!"
|
||||
#define SOUND_OGRE_DEATH2 11370 //"Pah! Does not prove anything!"
|
||||
#define SOUND_OGRE_DEATH3 11371 //"I'm not afraid of you."
|
||||
#define SOUND_OGRE_DEATH4 11372 //"Good, now you fight me!"
|
||||
|
||||
#define SOUND_SLAY1 11373 //"You not so tough afterall!"
|
||||
#define SOUND_SLAY2 11374 //"Aha ha ha ha!"
|
||||
#define SOUND_SLAY3 11375 //"Mulgar is king!"
|
||||
|
||||
#define SOUND_DEATH 11376 //"Gruul ...will crush you..."
|
||||
//Sounds
|
||||
#define SOUND_AGGRO 11367 //"Gronn are the real power in outland."
|
||||
#define SOUND_ENRAGE 11368 //"You will not defeat the hand of Gruul!"
|
||||
#define SOUND_OGRE_DEATH1 11369 //"You won't kill next one so easy!"
|
||||
#define SOUND_OGRE_DEATH2 11370 //"Pah! Does not prove anything!"
|
||||
#define SOUND_OGRE_DEATH3 11371 //"I'm not afraid of you."
|
||||
#define SOUND_OGRE_DEATH4 11372 //"Good, now you fight me!"
|
||||
#define SOUND_SLAY1 11373 //"You not so tough afterall!"
|
||||
#define SOUND_SLAY2 11374 //"Aha ha ha ha!"
|
||||
#define SOUND_SLAY3 11375 //"Mulgar is king!"
|
||||
#define SOUND_DEATH 11376 //"Gruul ...will crush you..."
|
||||
|
||||
// High King Maulgar
|
||||
#define SPELL_ARCING_SMASH 39144
|
||||
#define SPELL_MIGHTY_BLOW 33230
|
||||
#define SPELL_WHIRLWIND 33238
|
||||
#define SPELL_ENRAGE 34970
|
||||
#define SPELL_ARCING_SMASH 39144
|
||||
#define SPELL_MIGHTY_BLOW 33230
|
||||
#define SPELL_WHIRLWIND 33238
|
||||
#define SPELL_BERSERKER_C 26561
|
||||
#define SPELL_ROAR 16508
|
||||
#define SPELL_FLURRY 33232
|
||||
|
||||
// Council spells
|
||||
// Olm the Summoner
|
||||
#define SPELL_DARK_DECAY 33129
|
||||
#define SPELL_DEATH_COIL 33130
|
||||
#define SPELL_SUMMON_WFH 33131
|
||||
|
||||
//Kiggler the Craed
|
||||
#define SPELL_GREATER_POLYMORPH 33173
|
||||
#define SPELL_LIGHTNING_BOLT 36152
|
||||
#define SPELL_ARCANE_SHOCK 33175
|
||||
#define SPELL_ARCANE_EXPLOSION 33237
|
||||
|
||||
//Blindeye the Seer
|
||||
#define SPELL_GREATER_PW_SHIELD 33147
|
||||
#define SPELL_HEAL 33144
|
||||
#define SPELL_PRAYER_OH 33152
|
||||
|
||||
//Krosh Firehand
|
||||
#define SPELL_GREATER_FIREBALL 33051
|
||||
#define SPELL_SPELLSHIELD 33054
|
||||
#define SPELL_BLAST_WAVE 33061
|
||||
@@ -74,6 +82,7 @@ struct TRINITY_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI
|
||||
uint32 MightyBlow_Timer;
|
||||
uint32 Whirlwind_Timer;
|
||||
uint32 Charging_Timer;
|
||||
uint32 Roar_Timer;
|
||||
|
||||
bool Phase2;
|
||||
|
||||
@@ -85,6 +94,8 @@ struct TRINITY_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI
|
||||
MightyBlow_Timer = 40000;
|
||||
Whirlwind_Timer = 30000;
|
||||
Charging_Timer = 0;
|
||||
Roar_Timer = 0;
|
||||
|
||||
Phase2 = false;
|
||||
|
||||
Creature *pCreature = NULL;
|
||||
@@ -103,7 +114,7 @@ struct TRINITY_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI
|
||||
|
||||
//reset encounter
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_MAULGAREVENT, 0);
|
||||
pInstance->SetData(DATA_MAULGAREVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void KilledUnit()
|
||||
@@ -121,9 +132,28 @@ struct TRINITY_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI
|
||||
DoPlaySoundToSet(m_creature, SOUND_DEATH);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_MAULGAREVENT, 0);
|
||||
{
|
||||
pInstance->SetData(DATA_MAULGAREVENT, DONE);
|
||||
|
||||
GameObject* Door = NULL;
|
||||
Door = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_MAULGARDOOR));
|
||||
if(Door)
|
||||
Door->SetGoState(0);
|
||||
}
|
||||
}
|
||||
|
||||
void AddDeath()
|
||||
{
|
||||
switch(rand()%3)
|
||||
{
|
||||
case 0: DoPlaySoundToSet(m_creature, SOUND_OGRE_DEATH1);break;
|
||||
case 1: DoPlaySoundToSet(m_creature, SOUND_OGRE_DEATH2);break;
|
||||
case 2: DoPlaySoundToSet(m_creature, SOUND_OGRE_DEATH3);break;
|
||||
case 3: DoPlaySoundToSet(m_creature, SOUND_OGRE_DEATH4);break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Aggro(Unit *who) { StartEvent(who); }
|
||||
|
||||
void GetCouncil()
|
||||
@@ -145,7 +175,9 @@ struct TRINITY_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI
|
||||
DoPlaySoundToSet(m_creature, SOUND_AGGRO);
|
||||
|
||||
pInstance->SetData64(DATA_MAULGAREVENT_TANK, who->GetGUID());
|
||||
pInstance->SetData(DATA_MAULGAREVENT, 1);
|
||||
pInstance->SetData(DATA_MAULGAREVENT, IN_PROGRESS);
|
||||
|
||||
DoZoneInCombat();
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -181,11 +213,11 @@ struct TRINITY_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI
|
||||
}else ArcingSmash_Timer -= diff;
|
||||
|
||||
//Whirlwind_Timer
|
||||
if (Whirlwind_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_WHIRLWIND);
|
||||
Whirlwind_Timer = 55000;
|
||||
}else Whirlwind_Timer -= diff;
|
||||
if (Whirlwind_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_WHIRLWIND);
|
||||
Whirlwind_Timer = 55000;
|
||||
}else Whirlwind_Timer -= diff;
|
||||
|
||||
//MightyBlow_Timer
|
||||
if (MightyBlow_Timer < diff)
|
||||
@@ -199,6 +231,10 @@ struct TRINITY_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI
|
||||
{
|
||||
Phase2 = true;
|
||||
DoPlaySoundToSet(m_creature, SOUND_ENRAGE);
|
||||
DoCast(m_creature, SPELL_FLURRY);
|
||||
|
||||
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY, 0);
|
||||
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY+1, 0);
|
||||
}
|
||||
|
||||
if(Phase2)
|
||||
@@ -210,9 +246,17 @@ struct TRINITY_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI
|
||||
target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||
if(target)
|
||||
DoStartAttackAndMovement(target);
|
||||
DoCast(target, SPELL_BERSERKER_C);
|
||||
|
||||
Charging_Timer = 20000;
|
||||
}else Charging_Timer -= diff;
|
||||
|
||||
//Intimidating Roar
|
||||
if(Roar_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_ROAR);
|
||||
Roar_Timer = 40000+(rand()%10000);
|
||||
}else Roar_Timer -= diff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
@@ -230,6 +274,7 @@ struct TRINITY_DLL_DECL boss_olm_the_summonerAI : public ScriptedAI
|
||||
|
||||
uint32 DarkDecay_Timer;
|
||||
uint32 Summon_Timer;
|
||||
uint32 DeathCoil_Timer;
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
|
||||
@@ -237,10 +282,11 @@ struct TRINITY_DLL_DECL boss_olm_the_summonerAI : public ScriptedAI
|
||||
{
|
||||
DarkDecay_Timer = 10000;
|
||||
Summon_Timer = 15000;
|
||||
DeathCoil_Timer = 20000;
|
||||
|
||||
//reset encounter
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_MAULGAREVENT, 0);
|
||||
pInstance->SetData(DATA_MAULGAREVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void Aggro(Unit *who)
|
||||
@@ -248,22 +294,21 @@ struct TRINITY_DLL_DECL boss_olm_the_summonerAI : public ScriptedAI
|
||||
if(pInstance)
|
||||
{
|
||||
pInstance->SetData64(DATA_MAULGAREVENT_TANK, who->GetGUID());
|
||||
pInstance->SetData(DATA_MAULGAREVENT, 1);
|
||||
pInstance->SetData(DATA_MAULGAREVENT, IN_PROGRESS);
|
||||
}
|
||||
}
|
||||
|
||||
float DoCalculateRandomLocation()
|
||||
{
|
||||
float Loc;
|
||||
float Rand = rand()%8;
|
||||
|
||||
switch(rand()%2)
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
if(pInstance)
|
||||
{
|
||||
case 0: Loc = 0 + Rand; break;
|
||||
case 1: Loc = 0 - Rand; break;
|
||||
Creature *Maulgar = NULL;
|
||||
Maulgar = (Creature*)(Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_MAULGAR)));
|
||||
|
||||
if(Maulgar)
|
||||
((boss_high_king_maulgarAI*)Maulgar->AI())->AddDeath();
|
||||
}
|
||||
return Loc;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
@@ -296,11 +341,21 @@ struct TRINITY_DLL_DECL boss_olm_the_summonerAI : public ScriptedAI
|
||||
//Summon_Timer
|
||||
if(Summon_Timer < diff)
|
||||
{
|
||||
Creature *Add = NULL;
|
||||
Add = DoSpawnCreature(18847, DoCalculateRandomLocation(), DoCalculateRandomLocation(), 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
Summon_Timer = 30000;
|
||||
DoCast(m_creature, SPELL_SUMMON_WFH);
|
||||
Summon_Timer = 30000;
|
||||
}else Summon_Timer -= diff;
|
||||
|
||||
//DeathCoil Timer /need correct timer
|
||||
if(DeathCoil_Timer < diff)
|
||||
{
|
||||
Unit* target = NULL;
|
||||
target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||
if(target)
|
||||
DoCast(target, SPELL_DEATH_COIL);
|
||||
DeathCoil_Timer = 20000;
|
||||
}else DeathCoil_Timer -= diff;
|
||||
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
@@ -314,7 +369,7 @@ struct TRINITY_DLL_DECL boss_kiggler_the_crazedAI : public ScriptedAI
|
||||
Reset();
|
||||
}
|
||||
|
||||
uint32 GreatherPolymorph_Timer;
|
||||
uint32 GreaterPolymorph_Timer;
|
||||
uint32 LightningBolt_Timer;
|
||||
uint32 ArcaneShock_Timer;
|
||||
uint32 ArcaneExplosion_Timer;
|
||||
@@ -323,14 +378,14 @@ struct TRINITY_DLL_DECL boss_kiggler_the_crazedAI : public ScriptedAI
|
||||
|
||||
void Reset()
|
||||
{
|
||||
GreatherPolymorph_Timer = 5000;
|
||||
GreaterPolymorph_Timer = 5000;
|
||||
LightningBolt_Timer = 10000;
|
||||
ArcaneShock_Timer = 20000;
|
||||
ArcaneExplosion_Timer = 30000;
|
||||
|
||||
//reset encounter
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_MAULGAREVENT, 0);
|
||||
pInstance->SetData(DATA_MAULGAREVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void Aggro(Unit *who)
|
||||
@@ -338,10 +393,21 @@ struct TRINITY_DLL_DECL boss_kiggler_the_crazedAI : public ScriptedAI
|
||||
if(pInstance)
|
||||
{
|
||||
pInstance->SetData64(DATA_MAULGAREVENT_TANK, who->GetGUID());
|
||||
pInstance->SetData(DATA_MAULGAREVENT, 1);
|
||||
pInstance->SetData(DATA_MAULGAREVENT, IN_PROGRESS);
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
if(pInstance)
|
||||
{
|
||||
Creature *Maulgar = NULL;
|
||||
Maulgar = (Creature*)(Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_MAULGAR)));
|
||||
|
||||
if(Maulgar)
|
||||
((boss_high_king_maulgarAI*)Maulgar->AI())->AddDeath();
|
||||
}
|
||||
}
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if (!m_creature->getVictim() && who->isTargetableForAttack() && who->isInAccessablePlaceFor(m_creature) && m_creature->IsHostileTo(who))
|
||||
@@ -361,7 +427,7 @@ struct TRINITY_DLL_DECL boss_kiggler_the_crazedAI : public ScriptedAI
|
||||
if(pInstance)
|
||||
{
|
||||
pInstance->SetData64(DATA_MAULGAREVENT_TANK, who->GetGUID());
|
||||
pInstance->SetData(DATA_MAULGAREVENT, 1);
|
||||
pInstance->SetData(DATA_MAULGAREVENT, IN_PROGRESS);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -389,15 +455,15 @@ struct TRINITY_DLL_DECL boss_kiggler_the_crazedAI : public ScriptedAI
|
||||
if(pInstance && !pInstance->GetData(DATA_MAULGAREVENT))
|
||||
EnterEvadeMode();
|
||||
|
||||
//GreaterPolymorph_Timer / disabled: it makes you fall under the texture / if you've got vmaps feel free to uncomment this
|
||||
/*if(GreaterPolymorph_Timer < diff)
|
||||
//GreaterPolymorph_Timer
|
||||
if(GreaterPolymorph_Timer < diff)
|
||||
{
|
||||
Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||
if(target)
|
||||
DoCast(target, SPELL_GREATER_POLYMORPH);
|
||||
|
||||
GreaterPolymorph_Timer = 20000;
|
||||
}else GreaterPolymorph_Timer -= diff;*/
|
||||
}else GreaterPolymorph_Timer -= diff;
|
||||
|
||||
//LightningBolt_Timer
|
||||
if(LightningBolt_Timer < diff)
|
||||
@@ -445,7 +511,7 @@ struct TRINITY_DLL_DECL boss_blindeye_the_seerAI : public ScriptedAI
|
||||
|
||||
//reset encounter
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_MAULGAREVENT, 0);
|
||||
pInstance->SetData(DATA_MAULGAREVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void Aggro(Unit *who)
|
||||
@@ -453,10 +519,22 @@ struct TRINITY_DLL_DECL boss_blindeye_the_seerAI : public ScriptedAI
|
||||
if(pInstance)
|
||||
{
|
||||
pInstance->SetData64(DATA_MAULGAREVENT_TANK, who->GetGUID());
|
||||
pInstance->SetData(DATA_MAULGAREVENT, 1);
|
||||
pInstance->SetData(DATA_MAULGAREVENT, IN_PROGRESS);
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
if(pInstance)
|
||||
{
|
||||
Creature *Maulgar = NULL;
|
||||
Maulgar = (Creature*)(Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_MAULGAR)));
|
||||
|
||||
if(Maulgar)
|
||||
((boss_high_king_maulgarAI*)Maulgar->AI())->AddDeath();
|
||||
}
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if (!m_creature->getVictim() && who->isTargetableForAttack() && who->isInAccessablePlaceFor(m_creature) && m_creature->IsHostileTo(who))
|
||||
@@ -476,7 +554,7 @@ struct TRINITY_DLL_DECL boss_blindeye_the_seerAI : public ScriptedAI
|
||||
if(pInstance)
|
||||
{
|
||||
pInstance->SetData64(DATA_MAULGAREVENT_TANK, who->GetGUID());
|
||||
pInstance->SetData(DATA_MAULGAREVENT, 1);
|
||||
pInstance->SetData(DATA_MAULGAREVENT, IN_PROGRESS);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -545,7 +623,7 @@ struct TRINITY_DLL_DECL boss_krosh_firehandAI : public ScriptedAI
|
||||
|
||||
//reset encounter
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_MAULGAREVENT, 0);
|
||||
pInstance->SetData(DATA_MAULGAREVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void Aggro(Unit *who)
|
||||
@@ -553,10 +631,21 @@ struct TRINITY_DLL_DECL boss_krosh_firehandAI : public ScriptedAI
|
||||
if(pInstance)
|
||||
{
|
||||
pInstance->SetData64(DATA_MAULGAREVENT_TANK, who->GetGUID());
|
||||
pInstance->SetData(DATA_MAULGAREVENT, 1);
|
||||
pInstance->SetData(DATA_MAULGAREVENT, IN_PROGRESS);
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
if(pInstance)
|
||||
{
|
||||
Creature *Maulgar = NULL;
|
||||
Maulgar = (Creature*)(Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_MAULGAR)));
|
||||
|
||||
if(Maulgar)
|
||||
((boss_high_king_maulgarAI*)Maulgar->AI())->AddDeath();
|
||||
}
|
||||
}
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if (!m_creature->getVictim() && who->isTargetableForAttack() && who->isInAccessablePlaceFor(m_creature) && m_creature->IsHostileTo(who))
|
||||
@@ -576,7 +665,7 @@ struct TRINITY_DLL_DECL boss_krosh_firehandAI : public ScriptedAI
|
||||
if(pInstance)
|
||||
{
|
||||
pInstance->SetData64(DATA_MAULGAREVENT_TANK, who->GetGUID());
|
||||
pInstance->SetData(DATA_MAULGAREVENT, 1);
|
||||
pInstance->SetData(DATA_MAULGAREVENT, IN_PROGRESS);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -605,7 +694,7 @@ struct TRINITY_DLL_DECL boss_krosh_firehandAI : public ScriptedAI
|
||||
EnterEvadeMode();
|
||||
|
||||
//GreaterFireball_Timer
|
||||
if(GreaterFireball_Timer < diff)
|
||||
if(GreaterFireball_Timer < diff || m_creature->GetDistance(m_creature->getVictim()) < 30)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_GREATER_FIREBALL);
|
||||
GreaterFireball_Timer = 2000;
|
||||
@@ -622,8 +711,22 @@ struct TRINITY_DLL_DECL boss_krosh_firehandAI : public ScriptedAI
|
||||
//BlastWave_Timer
|
||||
if(BlastWave_Timer < diff)
|
||||
{
|
||||
Unit *target;
|
||||
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 = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid());
|
||||
//15 yard radius minimum
|
||||
if(target && target->GetDistance2d(m_creature) < 15)
|
||||
target_list.push_back(target);
|
||||
target = NULL;
|
||||
}
|
||||
if(target_list.size())
|
||||
target = *(target_list.begin()+rand()%target_list.size());
|
||||
|
||||
m_creature->InterruptNonMeleeSpells(false);
|
||||
DoCast(m_creature->getVictim(), SPELL_BLAST_WAVE);
|
||||
DoCast(target, SPELL_BLAST_WAVE);
|
||||
BlastWave_Timer = 60000;
|
||||
}else BlastWave_Timer -= diff;
|
||||
|
||||
|
||||
@@ -12,4 +12,7 @@
|
||||
#define DATA_MAULGAREVENT 5
|
||||
#define DATA_MAULGAREVENT_TANK 6
|
||||
#define DATA_OLMTHESUMMONER 7
|
||||
#define DATA_MAULGARDOOR 8
|
||||
#define DATA_GRUULDOOR 9
|
||||
#define DATA_MAULGAR 10
|
||||
#endif
|
||||
|
||||
@@ -42,6 +42,10 @@ struct TRINITY_DLL_DECL instance_gruuls_lair : public ScriptedInstance
|
||||
uint64 BlindeyeTheSeer;
|
||||
uint64 OlmTheSummoner;
|
||||
uint64 KroshFirehand;
|
||||
uint64 Maulgar;
|
||||
|
||||
uint64 MaulgarDoor;
|
||||
uint64 GruulDoor;
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
@@ -50,6 +54,11 @@ struct TRINITY_DLL_DECL instance_gruuls_lair : public ScriptedInstance
|
||||
BlindeyeTheSeer = 0;
|
||||
OlmTheSummoner = 0;
|
||||
KroshFirehand = 0;
|
||||
Maulgar = 0;
|
||||
|
||||
MaulgarDoor = 0;
|
||||
GruulDoor = 0;
|
||||
|
||||
|
||||
for(uint8 i = 0; i < ENCOUNTERS; i++)
|
||||
Encounters[i] = false;
|
||||
@@ -71,9 +80,19 @@ struct TRINITY_DLL_DECL instance_gruuls_lair : public ScriptedInstance
|
||||
case 18836: BlindeyeTheSeer = creature->GetGUID(); break;
|
||||
case 18834: OlmTheSummoner = creature->GetGUID(); break;
|
||||
case 18832: KroshFirehand = creature->GetGUID(); break;
|
||||
case 18831: Maulgar = creature->GetGUID();break;
|
||||
}
|
||||
}
|
||||
|
||||
void OnObjectCreate(GameObject* go)
|
||||
{
|
||||
switch(go->GetEntry())
|
||||
{
|
||||
case 184468: MaulgarDoor = go->GetGUID();break;
|
||||
case 184662: GruulDoor = go->GetGUID();break;
|
||||
}
|
||||
}
|
||||
|
||||
void SetData64(uint32 type, uint64 data)
|
||||
{
|
||||
if(type == DATA_MAULGAREVENT_TANK)
|
||||
@@ -84,16 +103,14 @@ struct TRINITY_DLL_DECL instance_gruuls_lair : public ScriptedInstance
|
||||
{
|
||||
switch(identifier)
|
||||
{
|
||||
case DATA_MAULGAREVENT_TANK:
|
||||
return MaulgarEvent_Tank;
|
||||
case DATA_KIGGLERTHECRAZED:
|
||||
return KigglerTheCrazed;
|
||||
case DATA_BLINDEYETHESEER:
|
||||
return BlindeyeTheSeer;
|
||||
case DATA_OLMTHESUMMONER:
|
||||
return OlmTheSummoner;
|
||||
case DATA_KROSHFIREHAND:
|
||||
return KroshFirehand;
|
||||
case DATA_MAULGAREVENT_TANK: return MaulgarEvent_Tank;
|
||||
case DATA_KIGGLERTHECRAZED: return KigglerTheCrazed;
|
||||
case DATA_BLINDEYETHESEER: return BlindeyeTheSeer;
|
||||
case DATA_OLMTHESUMMONER: return OlmTheSummoner;
|
||||
case DATA_KROSHFIREHAND: return KroshFirehand;
|
||||
case DATA_MAULGARDOOR: return MaulgarDoor;
|
||||
case DATA_GRUULDOOR: return GruulDoor;
|
||||
case DATA_MAULGAR: return Maulgar;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -103,27 +120,59 @@ struct TRINITY_DLL_DECL instance_gruuls_lair : public ScriptedInstance
|
||||
switch(type)
|
||||
{
|
||||
case DATA_MAULGAREVENT:
|
||||
Encounters[0] = (data) ? true : false;
|
||||
break;
|
||||
Encounters[0] = data; break;
|
||||
case DATA_GRUULEVENT:
|
||||
Encounters[1] = (data) ? true : false;
|
||||
break;
|
||||
Encounters[1] = data; break;
|
||||
}
|
||||
|
||||
if(data == DONE)
|
||||
SaveToDB();
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
case DATA_MAULGAREVENT:
|
||||
return Encounters[0];
|
||||
case DATA_GRUULEVENT:
|
||||
return Encounters[1];
|
||||
case DATA_MAULGAREVENT: return Encounters[0];
|
||||
case DATA_GRUULEVENT: return Encounters[1];
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
const char* Save()
|
||||
{
|
||||
OUT_SAVE_INST_DATA;
|
||||
std::ostringstream stream;
|
||||
stream << Encounters[0] << " " << Encounters[1];
|
||||
char* out = new char[stream.str().length() + 1];
|
||||
strcpy(out, stream.str().c_str());
|
||||
if(out)
|
||||
{
|
||||
OUT_SAVE_INST_DATA_COMPLETE;
|
||||
return out;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void Load(const char* in)
|
||||
{
|
||||
if(!in)
|
||||
{
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
return;
|
||||
}
|
||||
|
||||
OUT_LOAD_INST_DATA(in);
|
||||
std::istringstream stream(in);
|
||||
stream >> Encounters[0] >> Encounters[1];
|
||||
for(uint8 i = 0; i < ENCOUNTERS; ++i)
|
||||
if(Encounters[i] == IN_PROGRESS) // Do not load an encounter as "In Progress" - reset it instead.
|
||||
Encounters[i] = NOT_STARTED;
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
}
|
||||
};
|
||||
InstanceData* GetInstanceData_instance_gruuls_lair(Map* map)
|
||||
{
|
||||
return new instance_gruuls_lair(map);
|
||||
|
||||
@@ -1040,6 +1040,9 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
||||
{
|
||||
if(spellInfo_1->SpellFamilyFlags == spellInfo_2->SpellFamilyFlags)
|
||||
return true;
|
||||
if(spellInfo_1->SpellFamilyName == SPELLFAMILY_SHAMAN)
|
||||
if(IsElementalShield(spellInfo_1) && IsElementalShield(spellInfo_2))
|
||||
return true;
|
||||
//Corruption & Seed of corruption
|
||||
if(spellInfo_1->SpellFamilyName == SPELLFAMILY_WARLOCK)
|
||||
if( spellInfo_1->SpellIconID == 313 && spellInfo_2->SpellIconID == 1932 ||
|
||||
|
||||
@@ -165,10 +165,9 @@ WaypointMovementGenerator<Creature>::Update(Creature &creature, const uint32 &di
|
||||
else
|
||||
creature.Say(behavior->text[0].c_str(), 0, 0);
|
||||
}
|
||||
|
||||
i_hasDone[idx] = true;
|
||||
MovementInform(creature);
|
||||
} // wpBehaviour found
|
||||
i_hasDone[idx] = true;
|
||||
MovementInform(creature);
|
||||
} // HasDone == false
|
||||
} // i_creature.IsStopped()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user