From 1f71eb7210ae524d8006e51a560bf186bbd3653f Mon Sep 17 00:00:00 2001 From: MitchesD Date: Wed, 27 May 2015 00:23:31 +0200 Subject: [PATCH] Core/Packets: fixed logic fail caused by misunderstanding of multistrike * when multistrike is implemented, we have to do some changes here --- src/server/game/Entities/Unit/Unit.cpp | 32 ++++++++++---------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index fd33151b37..200635748c 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -4826,27 +4826,19 @@ void Unit::SendPeriodicAuraLog(SpellPeriodicAuraLogInfo* info) data.CasterGUID = aura->GetCasterGUID(); data.SpellID = aura->GetId(); - if (SpellInfo const* spellInfo = aura->GetSpellInfo()) - { - for (SpellEffectInfoMap::const_iterator itr = spellInfo->_effects.begin(); itr != spellInfo->_effects.end(); ++itr) - { - for (SpellEffectInfo const* effect : itr->second) - { - WorldPackets::CombatLog::SpellPeriodicAuraLog::SpellLogEffect spellLogEffect; - spellLogEffect.Effect = effect->Effect; - spellLogEffect.Amount = info->damage; - spellLogEffect.OverHealOrKill = info->overDamage; - spellLogEffect.SchoolMaskOrPower = aura->GetMiscValue(); - spellLogEffect.AbsorbedOrAmplitude = info->absorb; - spellLogEffect.Resisted = info->resist; - spellLogEffect.Crit = info->critical; - spellLogEffect.Multistrike = false; // NYI - /// @todo: implement debug info + /// @todo: should send more logs in one packet when multistrike + WorldPackets::CombatLog::SpellPeriodicAuraLog::SpellLogEffect spellLogEffect; + spellLogEffect.Effect = aura->GetAuraType(); + spellLogEffect.Amount = info->damage; + spellLogEffect.OverHealOrKill = info->overDamage; + spellLogEffect.SchoolMaskOrPower = aura->GetSpellInfo()->GetSchoolMask(); + spellLogEffect.AbsorbedOrAmplitude = info->absorb; + spellLogEffect.Resisted = info->resist; + spellLogEffect.Crit = info->critical; + spellLogEffect.Multistrike = false; // NYI + /// @todo: implement debug info - data.Effects.push_back(spellLogEffect); - } - } - } + data.Effects.push_back(spellLogEffect); SendMessageToSet(data.Write(), true); }