Scripts/Spells: Glyph of Arcane Shot is affected by own debuffs on target only

This commit is contained in:
joschiwald
2016-02-27 17:55:43 +01:00
parent 9beeca79ac
commit ffdf75a233
2 changed files with 9 additions and 6 deletions

View File

@@ -219,7 +219,7 @@ void Log::ReadLoggersFromConfig()
rootLogger.addAppender(appender->getId(), appender);
Logger& serverLogger = loggers["server"];
serverLogger.Create("server", LOG_LEVEL_ERROR);
serverLogger.Create("server", LOG_LEVEL_INFO);
serverLogger.addAppender(appender->getId(), appender);
}
}

View File

@@ -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;
}
}