aboutsummaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
Diffstat (limited to 'src/server')
-rw-r--r--src/server/scripts/Spells/spell_hunter.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp
index c927750e968..4d7cc277ff6 100644
--- a/src/server/scripts/Spells/spell_hunter.cpp
+++ b/src/server/scripts/Spells/spell_hunter.cpp
@@ -193,8 +193,8 @@ class spell_hun_chimera_shot : public SpellScriptLoader
{
uint32 spellId = 0;
int32 basePoint = 0;
- Unit::AuraApplicationMap& Auras = unitTarget->GetAppliedAuras();
- for (Unit::AuraApplicationMap::iterator i = Auras.begin(); i != Auras.end(); ++i)
+ Unit::AuraApplicationMap const& auras = unitTarget->GetAppliedAuras();
+ for (Unit::AuraApplicationMap::const_iterator i = auras.begin(); i != auras.end(); ++i)
{
Aura* aura = i->second->GetBase();
if (aura->GetCasterGUID() != caster->GetGUID())
@@ -318,12 +318,15 @@ class spell_hun_glyph_of_arcane_shot : public SpellScriptLoader
{
if (Unit* procTarget = eventInfo.GetProcTarget())
{
- Unit::AuraApplicationMap& auras = procTarget->GetAppliedAuras();
+ Unit::AuraApplicationMap const& auras = procTarget->GetAppliedAuras();
for (Unit::AuraApplicationMap::const_iterator i = auras.begin(); i != auras.end(); ++i)
{
- SpellInfo const* spellInfo = i->second->GetBase()->GetSpellInfo();
+ Aura const* aura = i->second->GetBase();
+ if (aura->GetCasterGUID() != GetTarget()->GetGUID())
+ continue;
// Search only Serpent Sting, Viper Sting, Scorpid Sting, Wyvern Sting
- if (spellInfo->SpellFamilyFlags.HasFlag(0xC000, 0x1080) && spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER)
+ if (aura->GetSpellInfo()->SpellFamilyName == SPELLFAMILY_HUNTER
+ && aura->GetSpellInfo()->SpellFamilyFlags.HasFlag(0xC000, 0x1080))
return true;
}
}