[11692] Fixed damage/heal amount from some triggered HoTs/DoTs.

This commit is contained in:
VladimirMangos 2011-06-28 15:19:19 +04:00
parent bb9157c6fc
commit 387a15f1a1
4 changed files with 37 additions and 34 deletions

View file

@ -257,6 +257,18 @@ uint16 GetSpellAuraMaxTicks(SpellEntry const* spellInfo)
return 6;
}
uint16 GetSpellAuraMaxTicks(uint32 spellId)
{
SpellEntry const* spellInfo = sSpellStore.LookupEntry(spellId);
if (!spellInfo)
{
sLog.outError("GetSpellAuraMaxTicks: Spell %u not exist!", spellId);
return 1;
}
return GetSpellAuraMaxTicks(spellInfo);
}
float CalculateDefaultCoefficient(SpellEntry const *spellProto, DamageEffectType const damagetype)
{
// Damage over Time spells bonus calculation

View file

@ -100,6 +100,7 @@ int32 GetSpellDuration(SpellEntry const *spellInfo);
int32 GetSpellMaxDuration(SpellEntry const *spellInfo);
int32 CalculateSpellDuration(SpellEntry const *spellInfo, Unit const* caster = NULL);
uint16 GetSpellAuraMaxTicks(SpellEntry const* spellInfo);
uint16 GetSpellAuraMaxTicks(uint32 spellId);
WeaponAttackType GetWeaponAttackType(SpellEntry const *spellInfo);
inline bool IsSpellHaveEffect(SpellEntry const *spellInfo, SpellEffects effect)

View file

@ -1405,9 +1405,9 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura
return SPELL_AURA_PROC_FAILED;
// Heal amount - Self/Team
int32 team = triggerAmount*damage/500;
int32 self = triggerAmount*damage/100 - team;
CastCustomSpell(this,15290,&team,&self,NULL,true,castItem,triggeredByAura);
int32 team = triggerAmount * damage / 500;
int32 self = triggerAmount * damage / 100 - team;
CastCustomSpell(this, 15290, &team, &self, NULL, true, castItem, triggeredByAura);
return SPELL_AURA_PROC_OK; // no hidden cooldown
}
// Priest Tier 6 Trinket (Ashtongue Talisman of Acumen)
@ -1466,14 +1466,14 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura
case 55680:
{
basepoints[0] = int32(damage * triggerAmount / 200); // 10% each tick
triggered_spell_id = 56161;
triggered_spell_id = 56161; // Glyph of Prayer of Healing
break;
}
// Priest T10 Healer 2P Bonus
case 70770:
{
basepoints[0] = int32(triggerAmount * damage / 100);
triggered_spell_id = 70772;
triggered_spell_id = 70772; // Blessed Healing
basepoints[0] = int32(triggerAmount * damage / 100) / GetSpellAuraMaxTicks(triggered_spell_id);
break;
}
}
@ -1615,9 +1615,8 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura
// Item - Druid T10 Balance 4P Bonus
case 70723:
{
basepoints[0] = int32(triggerAmount * damage / 100);
basepoints[0] = int32(basepoints[0] / 2); // 2 ticks
triggered_spell_id = 71023;
triggered_spell_id = 71023; // Languish
basepoints[0] = int32(triggerAmount * damage / 100) / GetSpellAuraMaxTicks(triggered_spell_id);
break;
}
}
@ -1840,17 +1839,15 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura
// Righteous Vengeance
if (dummySpell->SpellIconID == 3025)
{
// 4 damage tick
basepoints[0] = triggerAmount*damage/400;
triggered_spell_id = 61840;
basepoints[0] = triggerAmount * damage / 100 / GetSpellAuraMaxTicks(triggered_spell_id);
break;
}
// Sheath of Light
if (dummySpell->SpellIconID == 3030)
{
// 4 healing tick
basepoints[0] = triggerAmount*damage/400;
triggered_spell_id = 54203;
basepoints[0] = triggerAmount * damage / 100 / GetSpellAuraMaxTicks(triggered_spell_id);
break;
}
switch(dummySpell->Id)
@ -1950,10 +1947,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura
uint32 diff = GetMaxHealth()-GetHealth();
if (!diff)
return SPELL_AURA_PROC_FAILED;
if (damage > diff)
basepoints[0] = triggerAmount*diff/100;
else
basepoints[0] = triggerAmount*damage/100;
basepoints[0] = triggerAmount * (damage > diff ? diff : damage) / 100;
target = this;
triggered_spell_id = 31786;
break;
@ -2082,25 +2076,21 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura
}
}
if (stacks >= 5)
CastSpell(target,53739,true,NULL,triggeredByAura);
CastSpell(target, 53739, true, NULL, triggeredByAura);
break;
}
// Glyph of Holy Light
case 54937:
{
triggered_spell_id = 54968;
basepoints[0] = triggerAmount*damage/100;
basepoints[0] = triggerAmount * damage / 100;
break;
}
// Sacred Shield (buff)
case 58597:
{
triggered_spell_id = 66922;
SpellEntry const* triggeredEntry = sSpellStore.LookupEntry(triggered_spell_id);
if (!triggeredEntry)
return SPELL_AURA_PROC_FAILED;
basepoints[0] = int32(damage / (GetSpellDuration(triggeredEntry) / triggeredEntry->EffectAmplitude[EFFECT_INDEX_0]));
basepoints[0] = int32(damage / GetSpellAuraMaxTicks(triggered_spell_id));
target = this;
break;
}
@ -2114,8 +2104,8 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura
// Item - Paladin T8 Holy 2P Bonus
case 64890:
{
basepoints[0] = int32(triggerAmount * damage / 100);
triggered_spell_id = 64891; // Holy Mending
basepoints[0] = int32(triggerAmount * damage / 100) / GetSpellAuraMaxTicks(triggered_spell_id);
break;
}
// Anger Capacitor
@ -2374,25 +2364,25 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura
target = this;
break;
}
// Shaman T8 Elemental 4P Bonus
// Item - Shaman T8 Elemental 4P Bonus
case 64928:
{
basepoints[0] = int32( triggerAmount * damage / 100 );
triggered_spell_id = 64930; // Electrified
basepoints[0] = int32(triggerAmount * damage / 100) / GetSpellAuraMaxTicks(triggered_spell_id);
break;
}
// Shaman T9 Elemental 4P Bonus
// Item - Shaman T9 Elemental 4P Bonus (Lava Burst)
case 67228:
{
basepoints[0] = int32( triggerAmount * damage / 100 );
triggered_spell_id = 71824;
triggered_spell_id = 71824; // Lava Burst
basepoints[0] = int32(triggerAmount * damage / 100) / GetSpellAuraMaxTicks(triggered_spell_id);
break;
}
// Shaman T10 Restoration 4P Bonus
// Item - Shaman T10 Restoration 4P Bonus
case 70808:
{
basepoints[0] = int32(triggerAmount * damage / 100);
triggered_spell_id = 70809;
triggered_spell_id = 70809; // Chained Heal
basepoints[0] = int32(triggerAmount * damage / 100) / GetSpellAuraMaxTicks(triggered_spell_id);
break;
}
}

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11691"
#define REVISION_NR "11692"
#endif // __REVISION_NR_H__