void OnPeriodic(constAuraEffectPtr /*aurEff*/) { if (DynamicObject* owner = GetDynobjOwner()) if (GetTarget()->GetExactDist2d(owner) >= owner->GetRadius() || GetTarget()->HasAura(SPELL_IMPALED) || (GetTarget()->GetTypeId() == TYPEID_PLAYER && GetTarget()->ToPlayer()->HasSpellCooldown(69146))) PreventDefaultAction(); else if (GetTarget()->GetTypeId() == TYPEID_PLAYER) GetTarget()->ToPlayer()->AddSpellCooldown(69146, NULL, time(NULL) + 1.1); }
void OnPeriodic(AuraEffect const* /*aurEff*/) { if (DynamicObject* owner = GetDynobjOwner()) if (GetTarget()->GetExactDist2d(owner) >= owner->GetRadius() || GetTarget()->HasAura(SPELL_IMPALED)) PreventDefaultAction(); }
void SpellColdflameDamageAuraScript::OnPeriodic(AuraEffect const* /*aurEff*/) { if (DynamicObject* owner = GetDynobjOwner()) if (GetTarget()->GetExactDist2d(owner) >= owner->GetRadius() || GetTarget()->HasAura(SPELL_IMPALED) || HasCooldown(GetTarget())) PreventDefaultAction(); }