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.
This commit is contained in:
johnholiver
2011-05-05 19:16:13 -03:00
parent 13cfd105fe
commit 99959e8cd7
4 changed files with 47 additions and 16 deletions
@@ -5950,8 +5950,8 @@ void AuraEffect::HandleAuraDummy(AuraApplication const * aurApp, uint8 mode, boo
// Lifebloom
if (GetSpellProto()->SpellFamilyFlags[1] & 0x10)
{
// Final heal only on dispelled or duration end
if (aurApp->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE && aurApp->GetRemoveMode() != AURA_REMOVE_BY_ENEMY_SPELL)
// Final heal only on duration end
if (aurApp->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE)
return;
// final heal
+16 -6
View File
@@ -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);