[9081] Fixed DoT damage from 12834 and ranks.

This commit is contained in:
VladimirMangos 2009-12-29 12:27:26 +03:00
parent 7bcf8f44aa
commit 349b6c0af2
2 changed files with 8 additions and 3 deletions

View file

@ -3622,9 +3622,10 @@ bool Unit::AddAura(Aura *Aur)
else if (aur2->GetSpellProto()->AttributesEx4 & SPELL_ATTR_EX4_STACK_DOT_MODIFIER && aurName == SPELL_AURA_PERIODIC_DAMAGE && aur2->GetAuraDuration() > 0) else if (aur2->GetSpellProto()->AttributesEx4 & SPELL_ATTR_EX4_STACK_DOT_MODIFIER && aurName == SPELL_AURA_PERIODIC_DAMAGE && aur2->GetAuraDuration() > 0)
{ {
int32 remainingTicks = 1 + (aur2->GetAuraDuration() / aur2->GetModifier()->periodictime); int32 remainingTicks = 1 + (aur2->GetAuraDuration() / aur2->GetModifier()->periodictime);
int32 maxTicks = aur2->GetAuraMaxDuration() / aur2->GetModifier()->periodictime; int32 remainingDamage = aur2->GetModifier()->m_amount * remainingTicks;
Aur->GetModifier()->m_amount += int32(remainingTicks * aur2->GetModifier()->m_amount / maxTicks); int32 maxTicks = Aur->GetAuraMaxDuration() / Aur->GetModifier()->periodictime;
Aur->GetModifier()->m_amount += int32(remainingDamage / maxTicks);
} }
// can be only single (this check done at _each_ aura add // can be only single (this check done at _each_ aura add
RemoveAura(i2,AURA_REMOVE_BY_STACK); RemoveAura(i2,AURA_REMOVE_BY_STACK);
@ -7037,9 +7038,13 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
case 12867: basepoints[0] = int32(weaponDamage * 48 / 100); break; case 12867: basepoints[0] = int32(weaponDamage * 48 / 100); break;
// Impossible case // Impossible case
default: default:
sLog.outError("Unit::HandleProcTriggerSpell: DW unknown spell rank %u",auraSpellInfo->Id);
return false; return false;
} }
// 1 tick/sec * 6 sec = 6 ticks
basepoints[0] /= 6;
trigger_spell_id = 12721; trigger_spell_id = 12721;
break; break;
} }

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "9080" #define REVISION_NR "9081"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__