diff options
| author | johnholiver <johnholiver@gmail.com> | 2011-05-05 19:06:11 -0300 |
|---|---|---|
| committer | johnholiver <johnholiver@gmail.com> | 2011-05-05 19:16:13 -0300 |
| commit | 99959e8cd786a961fe392a01ade53618c0c44f0a (patch) | |
| tree | f53357286bb865d2f9edfd8916e0e65bcad05ebc /src/server/game/Spells/SpellEffects.cpp | |
| parent | 13cfd105fe2cdd0786b5f2560f67f506535566be (diff) | |
Core/Spells: Lifebloom final bloom.
Each dispelled stack will count towards the final bloom.
I left spell_bonus_data stuff out following Shauren's comment.
Diffstat (limited to 'src/server/game/Spells/SpellEffects.cpp')
| -rwxr-xr-x | src/server/game/Spells/SpellEffects.cpp | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 510ec8dc9a5..6c9bfba4953 100755 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -3224,7 +3224,7 @@ void Spell::EffectDispel(SpellEffIndex effIndex) // Ok if exist some buffs for dispel try dispel it uint32 failCount = 0; - DispelList success_list; + DispelChargesList success_list; WorldPacket dataFail(SMSG_DISPEL_FAILED, 8+8+4+4+damage*4); // dispel N = damage buffs (or while exist buffs for dispel) for (int32 count = 0; count < damage && !dispel_list.empty();) @@ -3244,7 +3244,17 @@ void Spell::EffectDispel(SpellEffIndex effIndex) { if (success) { - success_list.push_back(std::make_pair(itr->first->GetId(), itr->first->GetCasterGUID())); + bool alreadyListed = false; + for (DispelChargesList::iterator successItr = success_list.begin(); successItr != success_list.end(); ++successItr) + { + if (successItr->first->GetId() == itr->first->GetId()) + { + ++successItr->second; + alreadyListed = true; + } + } + if (!alreadyListed) + success_list.push_back(std::make_pair(itr->first, 1)); --itr->second; if (itr->second <= 0) dispel_list.erase(itr); @@ -3271,19 +3281,19 @@ void Spell::EffectDispel(SpellEffIndex effIndex) if (success_list.empty()) return; - WorldPacket dataSuccess(SMSG_SPELLDISPELLOG, 8+8+4+1+4+damage*5); + WorldPacket dataSuccess(SMSG_SPELLDISPELLOG, 8+8+4+1+4+success_list.size()*5); // Send packet header dataSuccess.append(unitTarget->GetPackGUID()); // Victim GUID dataSuccess.append(m_caster->GetPackGUID()); // Caster GUID dataSuccess << uint32(m_spellInfo->Id); // dispel spell id dataSuccess << uint8(0); // not used dataSuccess << uint32(success_list.size()); // count - for (DispelList::iterator itr = success_list.begin(); itr != success_list.end(); ++itr) + for (DispelChargesList::iterator itr = success_list.begin(); itr != success_list.end(); ++itr) { // Send dispelled spell info - dataSuccess << uint32(itr->first); // Spell Id + dataSuccess << uint32(itr->first->GetId()); // Spell Id dataSuccess << uint8(0); // 0 - dispelled !=0 cleansed - unitTarget->RemoveAurasDueToSpellByDispel(itr->first, itr->second, m_caster); + unitTarget->RemoveAurasDueToSpellByDispel(itr->first->GetId(), itr->first->GetCasterGUID(), m_caster, itr->second); } m_caster->SendMessageToSet(&dataSuccess, true); |
