fix(Scripts/SunwellPlateau) Fix flame touched stacking (#21594)

This commit is contained in:
vrachv 2025-02-24 14:49:33 +00:00 committed by GitHub
parent f234f034a1
commit b83071388c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -22,6 +22,7 @@
#include "SpellInfo.h"
#include "SpellScript.h"
#include "SpellScriptLoader.h"
#include "SpellAuraEffects.h"
#include "sunwell_plateau.h"
enum Quotes
@ -365,8 +366,15 @@ public:
return ValidateSpellInfo({ _touchSpell });
}
void OnPeriodic(AuraEffect const* /*aurEff*/)
void OnPeriodic(AuraEffect const* aurEff)
{
if (aurEff->GetId() == SPELL_FLAME_SEAR)
{
uint32 tick = aurEff->GetTickNumber();
if (tick % 2 != 0 || tick > 10)
return;
}
if (Unit* owner = GetOwner()->ToUnit())
owner->CastSpell(owner, _touchSpell, true);
}