mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-30 00:53:46 +00:00
fix(Scripts/TempleOfAhnQiraj): Anubisath Sentinel Mortal Strike and M… (#13435)
...ana Burn
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
--
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_anubisath_mortal_strike', 'spell_mana_burn_area');
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(9347, 'spell_anubisath_mortal_strike'),
|
||||
(26626, 'spell_mana_burn_area');
|
||||
@@ -15,22 +15,11 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: npc_anubisath_sentinel
|
||||
SD%Complete: 95
|
||||
SDComment: Shadow storm is not properly implemented in core it should only target ppl outside of melee range.
|
||||
SDCategory: Temple of Ahn'Qiraj
|
||||
EndScriptData */
|
||||
|
||||
#include "Cell.h"
|
||||
#include "CellImpl.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "Spell.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "SpellScript.h"
|
||||
#include "temple_of_ahnqiraj.h"
|
||||
|
||||
enum Spells
|
||||
{
|
||||
@@ -316,7 +305,46 @@ public:
|
||||
};
|
||||
};
|
||||
|
||||
// 9347: Mortal Strike
|
||||
class spell_anubisath_mortal_strike : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_anubisath_mortal_strike);
|
||||
|
||||
void OnPeriodic(AuraEffect const* /*aurEff*/)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
|
||||
if (Unit* target = GetUnitOwner()->GetVictim())
|
||||
if (target->IsWithinDist(GetUnitOwner(), 5.f))
|
||||
GetUnitOwner()->CastSpell(target, GetSpellInfo()->Effects[EFFECT_0].TriggerSpell, true);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_anubisath_mortal_strike::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
|
||||
}
|
||||
};
|
||||
|
||||
// 26626 (Server-side): Mana Burn Area
|
||||
class spell_mana_burn_area : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_mana_burn_area);
|
||||
|
||||
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Unit* target = GetHitUnit())
|
||||
GetCaster()->CastSpell(target, SPELL_MANAB, true);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_mana_burn_area::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_npc_anubisath_sentinel()
|
||||
{
|
||||
new npc_anubisath_sentinel();
|
||||
RegisterSpellScript(spell_anubisath_mortal_strike);
|
||||
RegisterSpellScript(spell_mana_burn_area);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user