fix(Scripts/AhnKahet): Ahn'kahar Spell Flinger failing to channel S… (#22082)

This commit is contained in:
avarishd
2025-05-30 17:30:46 +03:00
committed by GitHub
parent 942c3aed78
commit d4e419bf8d
3 changed files with 10 additions and 4 deletions

View File

@@ -0,0 +1,2 @@
--
UPDATE `smart_scripts` SET `action_param2` = 64 WHERE `entryorguid` = 30278 AND `source_type` = 0 AND `id` IN (2,3);

View File

@@ -48,7 +48,7 @@ enum AhnKahetCreatures
enum AhnkahetSpells
{
SPELL_SHADOW_SICKLE = 56701, // Shadow Sickle Normal
SPELL_SHADOW_SICKLE = 56701, // Shadow Sickle
};
enum AhnkahetObjects

View File

@@ -133,15 +133,19 @@ public:
}
};
// 56702 Shadow Sickle
// 59103 Shadow Sickle
// 56702, 59103 - Shadow Sickle
class spell_shadow_sickle_periodic_damage : public AuraScript
{
PrepareAuraScript(spell_shadow_sickle_periodic_damage);
void HandlePeriodic(AuraEffect const* /*aurEff*/)
{
GetCaster()->CastSpell(nullptr, SPELL_SHADOW_SICKLE);
Unit* caster = GetCaster();
if (!caster->IsCreature())
return;
if (Unit* target = caster->GetAI()->SelectTarget(SelectTargetMethod::Random, 0, 40.0f)) // Unknown if it targets only players
caster->CastSpell(target, SPELL_SHADOW_SICKLE, true);
}
void Register() override