mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
Merge pull request #12119 from Trisjdc/sniper_training
Core/Spells: Sniper Training should refresh every 6 seconds if all conditions are met
This commit is contained in:
@@ -744,8 +744,13 @@ class spell_hun_sniper_training : public SpellScriptLoader
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
uint32 spellId = SPELL_HUNTER_SNIPER_TRAINING_BUFF_R1 + GetId() - SPELL_HUNTER_SNIPER_TRAINING_R1;
|
||||
if (!target->HasAura(spellId))
|
||||
target->CastSpell(target, spellId, true, 0, aurEff);
|
||||
target->CastSpell(target, spellId, true, 0, aurEff);
|
||||
if (Player* playerTarget = GetUnitOwner()->ToPlayer())
|
||||
{
|
||||
int32 baseAmount = aurEff->GetBaseAmount();
|
||||
int32 amount = playerTarget->CalculateSpellDamage(playerTarget, GetSpellInfo(), aurEff->GetEffIndex(), &baseAmount);
|
||||
GetEffect(EFFECT_0)->SetAmount(amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user