aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Spells
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/scripts/Spells')
-rw-r--r--src/server/scripts/Spells/spell_hunter.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp
index 8c0864e76b9..b1152c311dc 100644
--- a/src/server/scripts/Spells/spell_hunter.cpp
+++ b/src/server/scripts/Spells/spell_hunter.cpp
@@ -743,15 +743,10 @@ class spell_hun_sniper_training : public SpellScriptLoader
PreventDefaultAction();
if (aurEff->GetAmount() <= 0)
{
- Unit* caster = GetCaster();
+ Unit* target = GetTarget();
uint32 spellId = SPELL_HUNTER_SNIPER_TRAINING_BUFF_R1 + GetId() - SPELL_HUNTER_SNIPER_TRAINING_R1;
- if (Unit* target = GetTarget())
- if (!target->HasAura(spellId))
- {
- SpellInfo const* triggeredSpellInfo = sSpellMgr->GetSpellInfo(spellId);
- Unit* triggerCaster = triggeredSpellInfo->NeedsToBeTriggeredByCaster() ? caster : target;
- triggerCaster->CastSpell(target, triggeredSpellInfo, true, 0, aurEff);
- }
+ if (!target->HasAura(spellId))
+ target->CastSpell(target, spellId, true, 0, aurEff);
}
}