*Azjol-Nerub: Hadronox and Amanitar updates, by WarHead
*Some cleanup and target selection adjustments.. --HG-- branch : trunk
This commit is contained in:
@@ -24,11 +24,6 @@ SDComment: Find correct mushrooms spell to make them visible - buffs of the mus
|
||||
SDCategory: Ahn'kahet
|
||||
Script Data End */
|
||||
|
||||
/*** SQL START ***
|
||||
update creature_template set scriptname = 'boss_amanitar' where entry = '30258';
|
||||
UPDATE `creature_template` SET `ScriptName`='mob_amanitar_mushrooms' WHERE `entry` IN ('30435','30391');
|
||||
*** SQL END ***/
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "def_ahnkahet.h"
|
||||
|
||||
@@ -76,7 +71,7 @@ struct MANGOS_DLL_DECL boss_amanitarAI : public ScriptedAI
|
||||
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, true);
|
||||
|
||||
if (pInstance && !FirstTime)
|
||||
pInstance->SetData(DATA_AMANITAR, FAIL);
|
||||
pInstance->SetData(DATA_AMANITAR_EVENT, FAIL);
|
||||
|
||||
FirstTime = false;
|
||||
|
||||
@@ -88,7 +83,7 @@ struct MANGOS_DLL_DECL boss_amanitarAI : public ScriptedAI
|
||||
{
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(DATA_AMANITAR, DONE);
|
||||
pInstance->SetData(DATA_AMANITAR_EVENT, DONE);
|
||||
pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_MINI);
|
||||
}
|
||||
}
|
||||
@@ -97,7 +92,8 @@ struct MANGOS_DLL_DECL boss_amanitarAI : public ScriptedAI
|
||||
{
|
||||
m_creature->SetInCombatWithZone();
|
||||
|
||||
if (pInstance) pInstance->SetData(DATA_AMANITAR, IN_PROGRESS);
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_AMANITAR_EVENT, IN_PROGRESS);
|
||||
|
||||
m_creature->CastSpell(m_creature, SPELL_MINI, false);
|
||||
}
|
||||
@@ -115,6 +111,7 @@ struct MANGOS_DLL_DECL boss_amanitarAI : public ScriptedAI
|
||||
if (victim)
|
||||
{
|
||||
Position pos;
|
||||
victim->GetPosition(&pos);
|
||||
m_creature->GetRandomNearPosition(pos, float(urand(5,80)));
|
||||
m_creature->SummonCreature(PoisonousMushroom, pos, DSpwType, DSpwTime);
|
||||
m_creature->GetRandomNearPosition(pos, float(urand(5,80)));
|
||||
@@ -192,8 +189,8 @@ struct MANGOS_DLL_DECL mob_amanitar_mushroomsAI : public Scripted_NoMovementAI
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit *who) { }
|
||||
void AttackStart(Unit *victim) { }
|
||||
void EnterCombat(Unit *who) {}
|
||||
void AttackStart(Unit *victim) {}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
@@ -208,8 +205,7 @@ struct MANGOS_DLL_DECL mob_amanitar_mushroomsAI : public Scripted_NoMovementAI
|
||||
}
|
||||
if (deathtimer < diff)
|
||||
{
|
||||
m_creature->setDeathState(JUST_DIED);
|
||||
m_creature->RemoveCorpse();
|
||||
m_creature->DisappearAndDie();
|
||||
deathtimer = 30000;
|
||||
} else deathtimer -= diff;
|
||||
}
|
||||
|
||||
@@ -16,45 +16,14 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: boss_hadronox
|
||||
SD%Complete: 0
|
||||
SDComment: Placeholder
|
||||
SDCategory: Azjol Nerub
|
||||
EndScriptData */
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "def_azjol_nerub.h"
|
||||
|
||||
#define SPELL_WEB_FRONT_DOORS 53177//dummy
|
||||
|
||||
#define SPELL_ACID_CLOUD 53400
|
||||
#define H_SPELL_ACID_CLOUD 59419
|
||||
#define SPELL_LEECH_POISON 53030
|
||||
#define H_SPELL_LEECH_POISON 59417
|
||||
#define SPELL_LEECH_POISON_DEADTRIGGER 53800//heal 10% heroic und normal
|
||||
#define SPELL_PIECE_ARMOR 53418
|
||||
#define SPELL_WEB_GRAB 53406
|
||||
#define H_SPELL_WEB_GRAB 59420
|
||||
|
||||
/* Script Data Start
|
||||
SDName: Boss hadronox
|
||||
SDAuthor: LordVanMartin
|
||||
SD%Complete:
|
||||
SDComment:
|
||||
SDAuthor: WarHead
|
||||
SD%Complete: 50
|
||||
SDComment: No Waves atm and the doors spells are crazy...
|
||||
SDCategory:
|
||||
Script Data End */
|
||||
|
||||
/*** SQL START ***
|
||||
update creature_template set scriptname = 'boss_hadronox' where entry = '';
|
||||
*** SQL END ***/
|
||||
|
||||
//Spells
|
||||
#define SPELL_LEECH_POISON 53030
|
||||
#define SPELL_ACID_CLOUD 53400
|
||||
#define SPELL_PIERCE_ARMOR 53418 //Source SUN++
|
||||
#define SPELL_WEB_GRAB 53406
|
||||
|
||||
//Phase 0 => Gauntlet Event described below
|
||||
//Phase 1 => Boss Encounter
|
||||
|
||||
@@ -67,35 +36,165 @@ This is the timed gauntlet - waves of non-elite spiders
|
||||
main room, it is recommended to just stay in it, kill the occasional non-elites that will attack you instead of the boss, and wait for
|
||||
Hadronox to make his way to you. When Hadronox enters the main room, she will web the doors, and no more non-elites will spawn.*/
|
||||
|
||||
struct TRINITY_DLL_DECL boss_hadronoxAI : public ScriptedAI
|
||||
#include "precompiled.h"
|
||||
#include "def_azjol_nerub.h"
|
||||
|
||||
#define SPELL_ACID_CLOUD 53400 // Victim
|
||||
#define SPELL_LEECH_POISON 53030 // Victim
|
||||
#define SPELL_PIERCE_ARMOR 53418 // Victim
|
||||
#define SPELL_WEB_GRAB 57731 // Victim
|
||||
#define SPELL_WEB_FRONT_DOORS 53177 // Self
|
||||
#define SPELL_WEB_SIDE_DOORS 53185 // Self
|
||||
|
||||
#define SPELL_ACID_CLOUD_H 59419
|
||||
#define SPELL_LEECH_POISON_H 59417
|
||||
#define SPELL_WEB_GRAB_H 59421
|
||||
|
||||
struct MANGOS_DLL_DECL boss_hadronoxAI : public ScriptedAI
|
||||
{
|
||||
boss_hadronoxAI(Creature *c) : ScriptedAI(c) {}
|
||||
boss_hadronoxAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceData();
|
||||
MaxDistance = 50.0f;
|
||||
FirstTime = true;
|
||||
}
|
||||
|
||||
uint32 phase;
|
||||
ScriptedInstance* pInstance;
|
||||
|
||||
uint32 acidtimer,
|
||||
leechtimer,
|
||||
piercetimer,
|
||||
grabtimer,
|
||||
doorstimer,
|
||||
CheckDistanceTimer;
|
||||
|
||||
bool FirstTime;
|
||||
|
||||
float MaxDistance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
m_creature->SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, 9.0f);
|
||||
m_creature->SetFloatValue(UNIT_FIELD_COMBATREACH, 9.0f);
|
||||
|
||||
acidtimer = urand(10000,14000);
|
||||
leechtimer = urand(3000,9000);
|
||||
piercetimer = urand(1000,3000);
|
||||
grabtimer = urand(15000,19000);
|
||||
doorstimer = urand(20000,30000);
|
||||
|
||||
CheckDistanceTimer = 2000;
|
||||
|
||||
if (pInstance && (pInstance->GetData(DATA_HADRONOX_EVENT) != DONE && !FirstTime))
|
||||
pInstance->SetData(DATA_HADRONOX_EVENT, FAIL);
|
||||
|
||||
FirstTime = false;
|
||||
}
|
||||
|
||||
//when Hadronox kills any enemy (that includes a party member) she will regain 10% of her HP if the target had Leech Poison on
|
||||
void KilledUnit(Unit* Victim)
|
||||
{
|
||||
// not sure if this aura check is correct, I think it is though
|
||||
if (!Victim || !Victim->HasAura(HEROIC(SPELL_LEECH_POISON, SPELL_LEECH_POISON_H)) || !m_creature->isAlive())
|
||||
return;
|
||||
|
||||
uint32 health = (m_creature->GetMaxHealth()/100)*10;
|
||||
|
||||
if ((m_creature->GetHealth()+health) >= m_creature->GetMaxHealth())
|
||||
m_creature->SetHealth(m_creature->GetMaxHealth());
|
||||
else
|
||||
m_creature->SetHealth(m_creature->GetHealth()+health);
|
||||
}
|
||||
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_HADRONOX_EVENT, DONE);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_HADRONOX_EVENT, IN_PROGRESS);
|
||||
m_creature->SetInCombatWithZone();
|
||||
}
|
||||
|
||||
void CheckDistance(float dist, const uint32 uiDiff)
|
||||
{
|
||||
if (!m_creature->isInCombat())
|
||||
return;
|
||||
|
||||
float x=0.0f, y=0.0f, z=0.0f;
|
||||
m_creature->GetRespawnCoord(x,y,z);
|
||||
|
||||
if (CheckDistanceTimer < uiDiff)
|
||||
CheckDistanceTimer = 5000;
|
||||
else
|
||||
{
|
||||
CheckDistanceTimer -= uiDiff;
|
||||
return;
|
||||
}
|
||||
if (m_creature->IsInEvadeMode() || !m_creature->getVictim())
|
||||
return;
|
||||
if (m_creature->GetDistance(x,y,z) > dist)
|
||||
EnterEvadeMode();
|
||||
}
|
||||
|
||||
void Reset() {}
|
||||
void EnterCombat(Unit* who) {}
|
||||
void AttackStart(Unit* who) {}
|
||||
void MoveInLineOfSight(Unit* who) {}
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
if (!UpdateVictim()) return;
|
||||
|
||||
phase =1;
|
||||
// Without he comes up through the air to players on the bridge after krikthir if players crossing this bridge!
|
||||
CheckDistance(MaxDistance, diff);
|
||||
|
||||
if (m_creature->HasAura(SPELL_WEB_FRONT_DOORS) || m_creature->HasAura(SPELL_WEB_SIDE_DOORS))
|
||||
{
|
||||
if (IsCombatMovement())
|
||||
SetCombatMovement(false);
|
||||
}
|
||||
else if (!IsCombatMovement())
|
||||
SetCombatMovement(true);
|
||||
|
||||
if (piercetimer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_PIERCE_ARMOR);
|
||||
piercetimer = 8000;
|
||||
} else piercetimer -= diff;
|
||||
|
||||
if (acidtimer < diff)
|
||||
{
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, HEROIC(SPELL_ACID_CLOUD, SPELL_ACID_CLOUD_H));
|
||||
|
||||
acidtimer = urand(20000,30000);
|
||||
} else acidtimer -= diff;
|
||||
|
||||
if (leechtimer < diff)
|
||||
{
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, HEROIC(SPELL_LEECH_POISON, SPELL_LEECH_POISON_H));
|
||||
|
||||
leechtimer = urand(11000,14000);
|
||||
} else leechtimer -= diff;
|
||||
|
||||
if (grabtimer < diff)
|
||||
{
|
||||
if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) // Draws all players (and attacking Mobs) to itself.
|
||||
DoCast(pTarget, HEROIC(SPELL_WEB_GRAB, SPELL_WEB_GRAB_H));
|
||||
|
||||
grabtimer = urand(15000,30000);
|
||||
} else grabtimer -= diff;
|
||||
|
||||
if (doorstimer < diff)
|
||||
{/* Debuff bleibt auf den Spielern bis zum Tod...
|
||||
DoCast(m_creature, RAND(SPELL_WEB_FRONT_DOORS, SPELL_WEB_SIDE_DOORS));
|
||||
*/
|
||||
doorstimer = urand(30000,60000);
|
||||
} else doorstimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
void JustDied(Unit* killer) {}
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
{
|
||||
if (victim == m_creature)
|
||||
return;
|
||||
|
||||
//when Hadronox kills any enemy (that includes a party member) she will regain 10% of her HP if the target had Leech Poison on
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_hadronox(Creature* pCreature)
|
||||
|
||||
@@ -268,8 +268,10 @@ extern void AddSC_boss_gal_darah();
|
||||
extern void AddSC_boss_eck();
|
||||
extern void AddSC_instance_gundrak();
|
||||
extern void AddSC_boss_krik_thir(); //Azjol-Nerub
|
||||
extern void AddSC_boss_hadronox();
|
||||
extern void AddSC_instance_azjol_nerub();
|
||||
extern void AddSC_instance_ahnkahet(); //Azjol-Nerub Ahn'kahet
|
||||
extern void AddSC_boss_amanitar();
|
||||
extern void AddSC_boss_taldaram();
|
||||
extern void AddSC_boss_elder_nadox();
|
||||
extern void AddSC_boss_volazj();
|
||||
@@ -698,11 +700,13 @@ void AddScripts()
|
||||
AddSC_boss_gal_darah();
|
||||
AddSC_boss_eck();
|
||||
AddSC_instance_gundrak();
|
||||
AddSC_boss_amanitar();
|
||||
AddSC_boss_taldaram(); //Azjol-Nerub Ahn'kahet
|
||||
AddSC_boss_elder_nadox();
|
||||
AddSC_boss_volazj();
|
||||
AddSC_instance_ahnkahet();
|
||||
AddSC_boss_krik_thir(); //Azjol-Nerub Azjol-Nerub
|
||||
AddSC_boss_hadronox();
|
||||
AddSC_instance_azjol_nerub();
|
||||
AddSC_boss_anubrekhan(); //Naxxramas
|
||||
AddSC_boss_maexxna();
|
||||
|
||||
Reference in New Issue
Block a user