diff options
| author | jackpoz <giacomopoz@gmail.com> | 2014-05-25 00:35:35 +0200 | 
|---|---|---|
| committer | jackpoz <giacomopoz@gmail.com> | 2014-05-25 00:35:35 +0200 | 
| commit | c4497e26f34ab764ea8a0ff5f0b1bdbb9cf05b4d (patch) | |
| tree | db2490e42c04a0bc7a484fc37d7e50ebd0c6bb63 /src/server/scripts/Spells | |
| parent | 1f78ff541ac1a2cec878889ef282410894f2d549 (diff) | |
| parent | ea1c4a355ca56b4edd431bf4c3d9dd932b8af770 (diff) | |
Merge pull request #12119 from Trisjdc/sniper_training
Core/Spells: Sniper Training should refresh every 6 seconds if all conditions are met
Diffstat (limited to 'src/server/scripts/Spells')
| -rw-r--r-- | src/server/scripts/Spells/spell_hunter.cpp | 9 | 
1 files changed, 7 insertions, 2 deletions
diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index 2739a8453df..725312eafce 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -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); +                    }                  }              }  | 
