fix(Core/Dungeon): Elder Nadox hardcore texts + Ahn'kahar Spell Flinger spells. (#2244)
This commit is contained in:
@@ -0,0 +1,8 @@
|
|||||||
|
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1567002995154862031');
|
||||||
|
|
||||||
|
DELETE FROM `spell_script_names` WHERE `spell_id` IN (56698, 59102, 56702, 59103);
|
||||||
|
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||||
|
(56698, 'spell_gen_default_count_pct_from_max_hp'),
|
||||||
|
(59102, 'spell_gen_default_count_pct_from_max_hp'),
|
||||||
|
(56702, 'spell_shadow_sickle_periodic_damage'),
|
||||||
|
(59103, 'spell_shadow_sickle_periodic_damage');
|
||||||
@@ -3,6 +3,7 @@
|
|||||||
#define DEF_AHNKAHET_H
|
#define DEF_AHNKAHET_H
|
||||||
|
|
||||||
#define MAX_ENCOUNTER 5
|
#define MAX_ENCOUNTER 5
|
||||||
|
|
||||||
enum Data64
|
enum Data64
|
||||||
{
|
{
|
||||||
DATA_ELDER_NADOX,
|
DATA_ELDER_NADOX,
|
||||||
@@ -33,6 +34,10 @@ enum Npc
|
|||||||
NPC_JEDOGA_SHADOWSEEKER = 29310,
|
NPC_JEDOGA_SHADOWSEEKER = 29310,
|
||||||
NPC_HERALD_JOLAZJ = 29311,
|
NPC_HERALD_JOLAZJ = 29311,
|
||||||
NPC_AMANITAR = 30258,
|
NPC_AMANITAR = 30258,
|
||||||
|
|
||||||
|
//spells
|
||||||
|
SPELL_SHADOW_SICKLE = 56701, // Shadow Sickle Normal
|
||||||
|
SPELL_SHADOW_SICKLE_H = 59104 // Shadow Sickle Heroic
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -8,13 +8,13 @@
|
|||||||
#include "SpellAuras.h"
|
#include "SpellAuras.h"
|
||||||
#include "SpellScript.h"
|
#include "SpellScript.h"
|
||||||
|
|
||||||
enum misc
|
enum Misc
|
||||||
{
|
{
|
||||||
// ACTIONS
|
// ACTIONS
|
||||||
ACTION_GUARDIAN_DIED = 1,
|
ACTION_GUARDIAN_DIED = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum spells
|
enum Spells
|
||||||
{
|
{
|
||||||
// NADOX
|
// NADOX
|
||||||
SPELL_BROOD_PLAGUE = 56130,
|
SPELL_BROOD_PLAGUE = 56130,
|
||||||
@@ -30,13 +30,13 @@ enum spells
|
|||||||
SPELL_SWARMER_AURA = 56158,
|
SPELL_SWARMER_AURA = 56158,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum creatures
|
enum Creatures
|
||||||
{
|
{
|
||||||
NPC_AHNKAHAR_SWARMER = 30178,
|
NPC_AHNKAHAR_SWARMER = 30178,
|
||||||
NPC_AHNKAHAR_GUARDIAN_ENTRY = 30176,
|
NPC_AHNKAHAR_GUARDIAN_ENTRY = 30176,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum events
|
enum Events
|
||||||
{
|
{
|
||||||
EVENT_CHECK_HEALTH = 1,
|
EVENT_CHECK_HEALTH = 1,
|
||||||
EVENT_CHECK_HOME = 2,
|
EVENT_CHECK_HOME = 2,
|
||||||
@@ -46,19 +46,15 @@ enum events
|
|||||||
EVENT_SUMMON_GUARD = 6,
|
EVENT_SUMMON_GUARD = 6,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum sounds
|
enum Yells
|
||||||
{
|
{
|
||||||
SOUND_AGGRO = 14033,
|
SAY_AGGRO = 0,
|
||||||
SOUND_SUMMON1 = 14034,
|
SAY_SLAY = 1,
|
||||||
SOUND_SUMMON2 = 14035,
|
SAY_DEATH = 2,
|
||||||
SOUND_SLAY1 = 14036,
|
SAY_EGG_SAC = 3,
|
||||||
SOUND_SLAY2 = 14037,
|
EMOTE_HATCHES = 4
|
||||||
SOUND_SLAY3 = 14038,
|
|
||||||
SOUND_DEATH = 14039,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define EMOTE_HATCHES "An Ahn'kahar Guardian hatches!"
|
|
||||||
|
|
||||||
class boss_elder_nadox : public CreatureScript
|
class boss_elder_nadox : public CreatureScript
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -106,8 +102,7 @@ public:
|
|||||||
|
|
||||||
void EnterCombat(Unit * /*who*/)
|
void EnterCombat(Unit * /*who*/)
|
||||||
{
|
{
|
||||||
me->MonsterYell("The secrets of the deep shall remain hidden.", LANG_UNIVERSAL, 0);
|
Talk(SAY_AGGRO);
|
||||||
me->PlayDirectSound(SOUND_AGGRO);
|
|
||||||
|
|
||||||
events.ScheduleEvent(EVENT_CHECK_HEALTH, 1000);
|
events.ScheduleEvent(EVENT_CHECK_HEALTH, 1000);
|
||||||
events.ScheduleEvent(EVENT_SWARMER, 10000);
|
events.ScheduleEvent(EVENT_SWARMER, 10000);
|
||||||
@@ -128,26 +123,10 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void KilledUnit(Unit * /*victim*/)
|
void KilledUnit(Unit* victim)
|
||||||
{
|
{
|
||||||
if (urand(0,1))
|
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||||
return;
|
Talk(SAY_SLAY);
|
||||||
|
|
||||||
switch (rand()%3)
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
me->MonsterYell("Sleep now, in the cold dark.", LANG_UNIVERSAL,0);
|
|
||||||
me->PlayDirectSound(SOUND_SLAY1);
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
me->MonsterYell("For the Lich King!", LANG_UNIVERSAL,0);
|
|
||||||
me->PlayDirectSound(SOUND_SLAY2);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
me->MonsterYell("Perhaps we will be allies soon.", LANG_UNIVERSAL,0);
|
|
||||||
me->PlayDirectSound(SOUND_SLAY3);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit* /*killer*/)
|
void JustDied(Unit* /*killer*/)
|
||||||
@@ -155,8 +134,8 @@ public:
|
|||||||
events.Reset();
|
events.Reset();
|
||||||
summons.DespawnAll();
|
summons.DespawnAll();
|
||||||
|
|
||||||
me->MonsterYell("Master, is my service complete?", LANG_UNIVERSAL, 0);
|
Talk(SAY_DEATH);
|
||||||
me->PlayDirectSound(SOUND_DEATH);
|
|
||||||
if (pInstance)
|
if (pInstance)
|
||||||
pInstance->SetData(DATA_ELDER_NADOX_EVENT, DONE);
|
pInstance->SetData(DATA_ELDER_NADOX_EVENT, DONE);
|
||||||
}
|
}
|
||||||
@@ -166,23 +145,12 @@ public:
|
|||||||
if (cr)
|
if (cr)
|
||||||
{
|
{
|
||||||
if (cr->GetEntry() == NPC_AHNKAHAR_GUARDIAN_ENTRY )
|
if (cr->GetEntry() == NPC_AHNKAHAR_GUARDIAN_ENTRY )
|
||||||
{
|
Talk(SAY_EGG_SAC);
|
||||||
switch (rand()%2)
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
me->MonsterYell("The young must not grow hungry...", LANG_UNIVERSAL, 0);
|
|
||||||
me->PlayDirectSound(SOUND_SUMMON1);
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
me->MonsterYell("Shhhad ak kereeesshh chak-k-k!", LANG_UNIVERSAL, 0);
|
|
||||||
me->PlayDirectSound(SOUND_SUMMON2);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
summons.Summon(cr);
|
summons.Summon(cr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(uint32 diff)
|
void UpdateAI(uint32 diff)
|
||||||
{
|
{
|
||||||
if (!UpdateVictim())
|
if (!UpdateVictim())
|
||||||
@@ -207,7 +175,7 @@ public:
|
|||||||
}
|
}
|
||||||
case EVENT_SUMMON_GUARD:
|
case EVENT_SUMMON_GUARD:
|
||||||
{
|
{
|
||||||
me->MonsterTextEmote(EMOTE_HATCHES, me, true);
|
Talk(EMOTE_HATCHES, me);
|
||||||
SummonHelpers(false);
|
SummonHelpers(false);
|
||||||
events.PopEvent();
|
events.PopEvent();
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
#include "ScriptMgr.h"
|
#include "ScriptMgr.h"
|
||||||
#include "ScriptedCreature.h"
|
#include "ScriptedCreature.h"
|
||||||
|
#include "SpellScript.h"
|
||||||
|
#include "Player.h"
|
||||||
#include "ahnkahet.h"
|
#include "ahnkahet.h"
|
||||||
|
|
||||||
class instance_ahnkahet : public InstanceMapScript
|
class instance_ahnkahet : public InstanceMapScript
|
||||||
@@ -248,7 +250,50 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class spell_shadow_sickle_periodic_damage : public SpellScriptLoader
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
spell_shadow_sickle_periodic_damage() : SpellScriptLoader("spell_shadow_sickle_periodic_damage") { }
|
||||||
|
|
||||||
|
class spell_shadow_sickle_periodic_damage_AuraScript : public AuraScript
|
||||||
|
{
|
||||||
|
PrepareAuraScript(spell_shadow_sickle_periodic_damage_AuraScript);
|
||||||
|
|
||||||
|
void HandlePeriodic(AuraEffect const* /*aurEff*/)
|
||||||
|
{
|
||||||
|
PreventDefaultAction();
|
||||||
|
|
||||||
|
if (Unit* caster = GetCaster())
|
||||||
|
{
|
||||||
|
std::list<Player*> PlayerList;
|
||||||
|
PlayerList.clear();
|
||||||
|
|
||||||
|
Map::PlayerList const &players = caster->GetMap()->GetPlayers();
|
||||||
|
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||||
|
if (Player* player = itr->GetSource()->ToPlayer())
|
||||||
|
if (player->IsWithinDist(caster, 40.0f) && player->IsAlive()) // SPELL_SHADOW_SICKLE_H & SPELL_SHADOW_SICKLE range is 40 yards
|
||||||
|
PlayerList.push_back(player);
|
||||||
|
|
||||||
|
if (!PlayerList.empty())
|
||||||
|
caster->CastSpell(Trinity::Containers::SelectRandomContainerElement(PlayerList), caster->GetMap()->IsHeroic() ? SPELL_SHADOW_SICKLE_H : SPELL_SHADOW_SICKLE, true);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Register()
|
||||||
|
{
|
||||||
|
OnEffectPeriodic += AuraEffectPeriodicFn(spell_shadow_sickle_periodic_damage_AuraScript::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
AuraScript* GetAuraScript() const
|
||||||
|
{
|
||||||
|
return new spell_shadow_sickle_periodic_damage_AuraScript();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
void AddSC_instance_ahnkahet()
|
void AddSC_instance_ahnkahet()
|
||||||
{
|
{
|
||||||
new instance_ahnkahet;
|
new instance_ahnkahet;
|
||||||
|
new spell_shadow_sickle_periodic_damage();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user