コード例 #1
0
ファイル: boss_lord_marrowgar.cpp プロジェクト: Expery/Core
 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);
 }
コード例 #2
0
 void OnPeriodic(AuraEffect const* /*aurEff*/)
 {
     if (DynamicObject* owner = GetDynobjOwner())
         if (GetTarget()->GetExactDist2d(owner) >= owner->GetRadius() || GetTarget()->HasAura(SPELL_IMPALED))
             PreventDefaultAction();
 }
コード例 #3
0
void SpellColdflameDamageAuraScript::OnPeriodic(AuraEffect const* /*aurEff*/)
{
    if (DynamicObject* owner = GetDynobjOwner())
        if (GetTarget()->GetExactDist2d(owner) >= owner->GetRadius() || GetTarget()->HasAura(SPELL_IMPALED) || HasCooldown(GetTarget()))
            PreventDefaultAction();
}