mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-07 04:47:45 +00:00
fix(Scripts/Karazhan): Implement Aran's Atiesh interaction (#17692)
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
--
|
||||||
|
DELETE FROM `areatrigger_scripts` WHERE `entry` = 4216;
|
||||||
|
INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES
|
||||||
|
(4216, 'at_karazhan_atiesh_aran');
|
||||||
@@ -16,6 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "GameObject.h"
|
#include "GameObject.h"
|
||||||
|
#include "Player.h"
|
||||||
#include "ScriptMgr.h"
|
#include "ScriptMgr.h"
|
||||||
#include "ScriptedCreature.h"
|
#include "ScriptedCreature.h"
|
||||||
#include "SpellAuras.h"
|
#include "SpellAuras.h"
|
||||||
@@ -41,7 +42,6 @@ enum Texts
|
|||||||
|
|
||||||
enum Spells
|
enum Spells
|
||||||
{
|
{
|
||||||
//Spells
|
|
||||||
SPELL_FROSTBOLT = 29954,
|
SPELL_FROSTBOLT = 29954,
|
||||||
SPELL_FIREBALL = 29953,
|
SPELL_FIREBALL = 29953,
|
||||||
SPELL_ARCMISSLE = 29955,
|
SPELL_ARCMISSLE = 29955,
|
||||||
@@ -69,37 +69,38 @@ enum Spells
|
|||||||
|
|
||||||
SPELL_SUMMON_BLIZZARD = 29969, // Activates the Blizzard NPC
|
SPELL_SUMMON_BLIZZARD = 29969, // Activates the Blizzard NPC
|
||||||
|
|
||||||
SPELL_SHADOW_PYRO = 29978
|
SPELL_SHADOW_PYRO = 29978,
|
||||||
|
|
||||||
|
SPELL_ATIESH_VISUAL = 31796
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Creatures
|
enum Creatures
|
||||||
{
|
{
|
||||||
NPC_SHADOW_OF_ARAN = 18254
|
NPC_SHADOW_OF_ARAN = 18254
|
||||||
};
|
};
|
||||||
|
|
||||||
enum SuperSpell
|
enum SuperSpell
|
||||||
{
|
{
|
||||||
SUPER_FLAME = 0,
|
SUPER_FLAME = 0,
|
||||||
SUPER_BLIZZARD,
|
SUPER_BLIZZARD,
|
||||||
SUPER_AE,
|
SUPER_AE,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Groups
|
enum Groups
|
||||||
{
|
{
|
||||||
GROUP_DRINKING = 0
|
GROUP_DRINKING = 0
|
||||||
|
};
|
||||||
|
|
||||||
|
enum Misc
|
||||||
|
{
|
||||||
|
ACTION_ATIESH_REACT = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
Position const roomCenter = {-11158.f, -1920.f};
|
Position const roomCenter = {-11158.f, -1920.f};
|
||||||
|
|
||||||
struct boss_shade_of_aran : public BossAI
|
struct boss_shade_of_aran : public BossAI
|
||||||
{
|
{
|
||||||
boss_shade_of_aran(Creature* creature) : BossAI(creature, DATA_ARAN)
|
boss_shade_of_aran(Creature* creature) : BossAI(creature, DATA_ARAN), _atieshReaction(false) { }
|
||||||
{
|
|
||||||
scheduler.SetValidator([this]
|
|
||||||
{
|
|
||||||
return !me->HasUnitState(UNIT_STATE_CASTING);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
@@ -139,6 +140,20 @@ struct boss_shade_of_aran : public BossAI
|
|||||||
return me->GetDistance2d(roomCenter.GetPositionX(), roomCenter.GetPositionY()) < 45.0f;
|
return me->GetDistance2d(roomCenter.GetPositionX(), roomCenter.GetPositionY()) < 45.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SetGUID(ObjectGuid guid, int32 id) override
|
||||||
|
{
|
||||||
|
if (id == ACTION_ATIESH_REACT && !_atieshReaction)
|
||||||
|
{
|
||||||
|
Talk(SAY_ATIESH);
|
||||||
|
_atieshReaction = true;
|
||||||
|
if (Unit* atieshOwner = ObjectAccessor::GetUnit(*me, guid))
|
||||||
|
{
|
||||||
|
me->PauseMovement(3000);
|
||||||
|
me->SetFacingToObject(atieshOwner);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void AttackStart(Unit* who) override
|
void AttackStart(Unit* who) override
|
||||||
{
|
{
|
||||||
if (who && who->isTargetableForAttack() && me->GetReactState() != REACT_PASSIVE)
|
if (who && who->isTargetableForAttack() && me->GetReactState() != REACT_PASSIVE)
|
||||||
@@ -442,6 +457,7 @@ private:
|
|||||||
bool _frostCooledDown;
|
bool _frostCooledDown;
|
||||||
bool _drinking;
|
bool _drinking;
|
||||||
bool _hasDrunk;
|
bool _hasDrunk;
|
||||||
|
bool _atieshReaction;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 30004 - Flame Wreath
|
// 30004 - Flame Wreath
|
||||||
@@ -522,9 +538,32 @@ class spell_flamewreath_aura : public AuraScript
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class at_karazhan_atiesh_aran : public AreaTriggerScript
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
at_karazhan_atiesh_aran() : AreaTriggerScript("at_karazhan_atiesh_aran") { }
|
||||||
|
|
||||||
|
bool OnTrigger(Player* player, AreaTrigger const* /*areaTrigger*/) override
|
||||||
|
{
|
||||||
|
if (InstanceScript* instance = player->GetInstanceScript())
|
||||||
|
{
|
||||||
|
if (player->HasAura(SPELL_ATIESH_VISUAL))
|
||||||
|
{
|
||||||
|
if (Creature* aran = instance->GetCreature(DATA_ARAN))
|
||||||
|
{
|
||||||
|
aran->AI()->SetGUID(player->GetGUID(), ACTION_ATIESH_REACT);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
void AddSC_boss_shade_of_aran()
|
void AddSC_boss_shade_of_aran()
|
||||||
{
|
{
|
||||||
RegisterKarazhanCreatureAI(boss_shade_of_aran);
|
RegisterKarazhanCreatureAI(boss_shade_of_aran);
|
||||||
RegisterSpellScript(spell_flamewreath);
|
RegisterSpellScript(spell_flamewreath);
|
||||||
RegisterSpellScript(spell_flamewreath_aura);
|
RegisterSpellScript(spell_flamewreath_aura);
|
||||||
|
new at_karazhan_atiesh_aran();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ const Position OptionalSpawn[] =
|
|||||||
ObjectData const creatureData[] =
|
ObjectData const creatureData[] =
|
||||||
{
|
{
|
||||||
{ NPC_ATTUMEN_THE_HUNTSMAN, DATA_ATTUMEN },
|
{ NPC_ATTUMEN_THE_HUNTSMAN, DATA_ATTUMEN },
|
||||||
|
{ NPC_SHADE_OF_ARAN, DATA_ARAN },
|
||||||
{ NPC_MIDNIGHT, DATA_MIDNIGHT },
|
{ NPC_MIDNIGHT, DATA_MIDNIGHT },
|
||||||
{ NPC_DOROTHEE, DATA_DOROTHEE },
|
{ NPC_DOROTHEE, DATA_DOROTHEE },
|
||||||
{ NPC_TITO, DATA_TITO },
|
{ NPC_TITO, DATA_TITO },
|
||||||
|
|||||||
@@ -97,6 +97,7 @@ enum KZCreatures
|
|||||||
NPC_ATTUMEN_THE_HUNTSMAN_MOUNTED = 16152,
|
NPC_ATTUMEN_THE_HUNTSMAN_MOUNTED = 16152,
|
||||||
NPC_MIDNIGHT = 16151,
|
NPC_MIDNIGHT = 16151,
|
||||||
NPC_NIGHTBANE = 17225,
|
NPC_NIGHTBANE = 17225,
|
||||||
|
NPC_SHADE_OF_ARAN = 16524,
|
||||||
|
|
||||||
// Trash
|
// Trash
|
||||||
NPC_COLDMIST_WIDOW = 16171,
|
NPC_COLDMIST_WIDOW = 16171,
|
||||||
|
|||||||
Reference in New Issue
Block a user