*Fix swiftmend healing bonus. By mobel.
*Only remove one HOT but not all HOT when using swiftmend. --HG-- branch : trunk
This commit is contained in:
@@ -2352,13 +2352,15 @@ void Spell::EffectHeal( uint32 /*i*/ )
|
||||
}
|
||||
|
||||
//int32 tickheal = caster->SpellHealingBonus(targetAura->GetSpellProto(), targetAura->GetModifier()->m_amount, DOT, unitTarget);
|
||||
int32 tickheal = targetAura->GetSpellProto()->EffectBasePoints[idx] + 1;
|
||||
//int32 tickheal = targetAura->GetSpellProto()->EffectBasePoints[idx] + 1;
|
||||
//It is said that talent bonus should not be included
|
||||
int32 tickheal = targetAura->GetModifierValue();
|
||||
int32 tickcount = GetSpellDuration(targetAura->GetSpellProto()) / targetAura->GetSpellProto()->EffectAmplitude[idx];
|
||||
//TODO: do not remove all auras
|
||||
unitTarget->RemoveAurasDueToSpell(targetAura->GetId());
|
||||
|
||||
addhealth += tickheal * tickcount;
|
||||
addhealth = caster->SpellHealingBonus(m_spellInfo, addhealth,HEAL, unitTarget);
|
||||
unitTarget->RemoveAurasDueToCasterSpell(targetAura->GetId(), targetAura->GetCasterGUID());
|
||||
|
||||
//addhealth += tickheal * tickcount;
|
||||
//addhealth = caster->SpellHealingBonus(m_spellInfo, addhealth,HEAL, unitTarget);
|
||||
}
|
||||
else
|
||||
addhealth = caster->SpellHealingBonus(m_spellInfo, addhealth,HEAL, unitTarget);
|
||||
|
||||
+21
-4
@@ -4522,6 +4522,25 @@ void Unit::RemoveAurasDueToSpell(uint32 spellId, Aura* except)
|
||||
RemoveAura(spellId,i,except);
|
||||
}
|
||||
|
||||
void Unit::RemoveAurasDueToCasterSpell(uint64 guid, uint32 spellId)
|
||||
{
|
||||
for (int k=0; k < 3; ++k)
|
||||
{
|
||||
spellEffectPair spair = spellEffectPair(spellId, k);
|
||||
for (AuraMap::iterator iter = m_Auras.lower_bound(spair); iter != m_Auras.upper_bound(spair);)
|
||||
{
|
||||
if (iter->second->GetCasterGUID() == guid)
|
||||
{
|
||||
RemoveAura(iter);
|
||||
break;
|
||||
//iter = m_Auras.upper_bound(spair); // overwrite by more appropriate
|
||||
}
|
||||
else
|
||||
++iter;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Unit::RemoveAurasDueToItemSpell(Item* castItem,uint32 spellId)
|
||||
{
|
||||
for (int k=0; k < 3; ++k)
|
||||
@@ -12841,11 +12860,9 @@ void Unit::SetConfused(bool apply)
|
||||
else
|
||||
{
|
||||
RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_CONFUSED);
|
||||
GetMotionMaster()->MovementExpired(false);
|
||||
if( GetTypeId() != TYPEID_PLAYER && isAlive() )
|
||||
if(isAlive())
|
||||
{
|
||||
// restore appropriate movement generator
|
||||
if(getVictim())
|
||||
if( GetTypeId() != TYPEID_PLAYER && getVictim())
|
||||
GetMotionMaster()->MoveChase(getVictim());
|
||||
else
|
||||
GetMotionMaster()->Initialize();
|
||||
|
||||
@@ -1107,6 +1107,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
|
||||
void RemoveSingleAuraFromStack(uint32 spellId, uint32 effindex);
|
||||
void RemoveAurasDueToSpell(uint32 spellId, Aura* except = NULL);
|
||||
void RemoveAurasDueToItemSpell(Item* castItem,uint32 spellId);
|
||||
void RemoveAurasDueToCasterSpell(uint64 guid, uint32 spellId);
|
||||
void RemoveAurasDueToSpellByDispel(uint32 spellId, uint64 casterGUID, Unit *dispeler);
|
||||
void RemoveAurasDueToSpellBySteal(uint32 spellId, uint64 casterGUID, Unit *stealer);
|
||||
void RemoveAurasDueToSpellByCancel(uint32 spellId);
|
||||
|
||||
Reference in New Issue
Block a user