mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 16:37:00 +00:00
[11692] Fixed damage/heal amount from some triggered HoTs/DoTs.
This commit is contained in:
parent
bb9157c6fc
commit
387a15f1a1
4 changed files with 37 additions and 34 deletions
|
|
@ -257,6 +257,18 @@ uint16 GetSpellAuraMaxTicks(SpellEntry const* spellInfo)
|
||||||
return 6;
|
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)
|
float CalculateDefaultCoefficient(SpellEntry const *spellProto, DamageEffectType const damagetype)
|
||||||
{
|
{
|
||||||
// Damage over Time spells bonus calculation
|
// Damage over Time spells bonus calculation
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,7 @@ int32 GetSpellDuration(SpellEntry const *spellInfo);
|
||||||
int32 GetSpellMaxDuration(SpellEntry const *spellInfo);
|
int32 GetSpellMaxDuration(SpellEntry const *spellInfo);
|
||||||
int32 CalculateSpellDuration(SpellEntry const *spellInfo, Unit const* caster = NULL);
|
int32 CalculateSpellDuration(SpellEntry const *spellInfo, Unit const* caster = NULL);
|
||||||
uint16 GetSpellAuraMaxTicks(SpellEntry const* spellInfo);
|
uint16 GetSpellAuraMaxTicks(SpellEntry const* spellInfo);
|
||||||
|
uint16 GetSpellAuraMaxTicks(uint32 spellId);
|
||||||
WeaponAttackType GetWeaponAttackType(SpellEntry const *spellInfo);
|
WeaponAttackType GetWeaponAttackType(SpellEntry const *spellInfo);
|
||||||
|
|
||||||
inline bool IsSpellHaveEffect(SpellEntry const *spellInfo, SpellEffects effect)
|
inline bool IsSpellHaveEffect(SpellEntry const *spellInfo, SpellEffects effect)
|
||||||
|
|
|
||||||
|
|
@ -1405,9 +1405,9 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura
|
||||||
return SPELL_AURA_PROC_FAILED;
|
return SPELL_AURA_PROC_FAILED;
|
||||||
|
|
||||||
// Heal amount - Self/Team
|
// Heal amount - Self/Team
|
||||||
int32 team = triggerAmount*damage/500;
|
int32 team = triggerAmount * damage / 500;
|
||||||
int32 self = triggerAmount*damage/100 - team;
|
int32 self = triggerAmount * damage / 100 - team;
|
||||||
CastCustomSpell(this,15290,&team,&self,NULL,true,castItem,triggeredByAura);
|
CastCustomSpell(this, 15290, &team, &self, NULL, true, castItem, triggeredByAura);
|
||||||
return SPELL_AURA_PROC_OK; // no hidden cooldown
|
return SPELL_AURA_PROC_OK; // no hidden cooldown
|
||||||
}
|
}
|
||||||
// Priest Tier 6 Trinket (Ashtongue Talisman of Acumen)
|
// Priest Tier 6 Trinket (Ashtongue Talisman of Acumen)
|
||||||
|
|
@ -1466,14 +1466,14 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura
|
||||||
case 55680:
|
case 55680:
|
||||||
{
|
{
|
||||||
basepoints[0] = int32(damage * triggerAmount / 200); // 10% each tick
|
basepoints[0] = int32(damage * triggerAmount / 200); // 10% each tick
|
||||||
triggered_spell_id = 56161;
|
triggered_spell_id = 56161; // Glyph of Prayer of Healing
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Priest T10 Healer 2P Bonus
|
// Priest T10 Healer 2P Bonus
|
||||||
case 70770:
|
case 70770:
|
||||||
{
|
{
|
||||||
basepoints[0] = int32(triggerAmount * damage / 100);
|
triggered_spell_id = 70772; // Blessed Healing
|
||||||
triggered_spell_id = 70772;
|
basepoints[0] = int32(triggerAmount * damage / 100) / GetSpellAuraMaxTicks(triggered_spell_id);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1615,9 +1615,8 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura
|
||||||
// Item - Druid T10 Balance 4P Bonus
|
// Item - Druid T10 Balance 4P Bonus
|
||||||
case 70723:
|
case 70723:
|
||||||
{
|
{
|
||||||
basepoints[0] = int32(triggerAmount * damage / 100);
|
triggered_spell_id = 71023; // Languish
|
||||||
basepoints[0] = int32(basepoints[0] / 2); // 2 ticks
|
basepoints[0] = int32(triggerAmount * damage / 100) / GetSpellAuraMaxTicks(triggered_spell_id);
|
||||||
triggered_spell_id = 71023;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1840,17 +1839,15 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura
|
||||||
// Righteous Vengeance
|
// Righteous Vengeance
|
||||||
if (dummySpell->SpellIconID == 3025)
|
if (dummySpell->SpellIconID == 3025)
|
||||||
{
|
{
|
||||||
// 4 damage tick
|
|
||||||
basepoints[0] = triggerAmount*damage/400;
|
|
||||||
triggered_spell_id = 61840;
|
triggered_spell_id = 61840;
|
||||||
|
basepoints[0] = triggerAmount * damage / 100 / GetSpellAuraMaxTicks(triggered_spell_id);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Sheath of Light
|
// Sheath of Light
|
||||||
if (dummySpell->SpellIconID == 3030)
|
if (dummySpell->SpellIconID == 3030)
|
||||||
{
|
{
|
||||||
// 4 healing tick
|
|
||||||
basepoints[0] = triggerAmount*damage/400;
|
|
||||||
triggered_spell_id = 54203;
|
triggered_spell_id = 54203;
|
||||||
|
basepoints[0] = triggerAmount * damage / 100 / GetSpellAuraMaxTicks(triggered_spell_id);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
switch(dummySpell->Id)
|
switch(dummySpell->Id)
|
||||||
|
|
@ -1950,10 +1947,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura
|
||||||
uint32 diff = GetMaxHealth()-GetHealth();
|
uint32 diff = GetMaxHealth()-GetHealth();
|
||||||
if (!diff)
|
if (!diff)
|
||||||
return SPELL_AURA_PROC_FAILED;
|
return SPELL_AURA_PROC_FAILED;
|
||||||
if (damage > diff)
|
basepoints[0] = triggerAmount * (damage > diff ? diff : damage) / 100;
|
||||||
basepoints[0] = triggerAmount*diff/100;
|
|
||||||
else
|
|
||||||
basepoints[0] = triggerAmount*damage/100;
|
|
||||||
target = this;
|
target = this;
|
||||||
triggered_spell_id = 31786;
|
triggered_spell_id = 31786;
|
||||||
break;
|
break;
|
||||||
|
|
@ -2082,25 +2076,21 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (stacks >= 5)
|
if (stacks >= 5)
|
||||||
CastSpell(target,53739,true,NULL,triggeredByAura);
|
CastSpell(target, 53739, true, NULL, triggeredByAura);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Glyph of Holy Light
|
// Glyph of Holy Light
|
||||||
case 54937:
|
case 54937:
|
||||||
{
|
{
|
||||||
triggered_spell_id = 54968;
|
triggered_spell_id = 54968;
|
||||||
basepoints[0] = triggerAmount*damage/100;
|
basepoints[0] = triggerAmount * damage / 100;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Sacred Shield (buff)
|
// Sacred Shield (buff)
|
||||||
case 58597:
|
case 58597:
|
||||||
{
|
{
|
||||||
triggered_spell_id = 66922;
|
triggered_spell_id = 66922;
|
||||||
SpellEntry const* triggeredEntry = sSpellStore.LookupEntry(triggered_spell_id);
|
basepoints[0] = int32(damage / GetSpellAuraMaxTicks(triggered_spell_id));
|
||||||
if (!triggeredEntry)
|
|
||||||
return SPELL_AURA_PROC_FAILED;
|
|
||||||
|
|
||||||
basepoints[0] = int32(damage / (GetSpellDuration(triggeredEntry) / triggeredEntry->EffectAmplitude[EFFECT_INDEX_0]));
|
|
||||||
target = this;
|
target = this;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -2114,8 +2104,8 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura
|
||||||
// Item - Paladin T8 Holy 2P Bonus
|
// Item - Paladin T8 Holy 2P Bonus
|
||||||
case 64890:
|
case 64890:
|
||||||
{
|
{
|
||||||
basepoints[0] = int32(triggerAmount * damage / 100);
|
|
||||||
triggered_spell_id = 64891; // Holy Mending
|
triggered_spell_id = 64891; // Holy Mending
|
||||||
|
basepoints[0] = int32(triggerAmount * damage / 100) / GetSpellAuraMaxTicks(triggered_spell_id);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Anger Capacitor
|
// Anger Capacitor
|
||||||
|
|
@ -2374,25 +2364,25 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura
|
||||||
target = this;
|
target = this;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Shaman T8 Elemental 4P Bonus
|
// Item - Shaman T8 Elemental 4P Bonus
|
||||||
case 64928:
|
case 64928:
|
||||||
{
|
{
|
||||||
basepoints[0] = int32( triggerAmount * damage / 100 );
|
|
||||||
triggered_spell_id = 64930; // Electrified
|
triggered_spell_id = 64930; // Electrified
|
||||||
|
basepoints[0] = int32(triggerAmount * damage / 100) / GetSpellAuraMaxTicks(triggered_spell_id);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Shaman T9 Elemental 4P Bonus
|
// Item - Shaman T9 Elemental 4P Bonus (Lava Burst)
|
||||||
case 67228:
|
case 67228:
|
||||||
{
|
{
|
||||||
basepoints[0] = int32( triggerAmount * damage / 100 );
|
triggered_spell_id = 71824; // Lava Burst
|
||||||
triggered_spell_id = 71824;
|
basepoints[0] = int32(triggerAmount * damage / 100) / GetSpellAuraMaxTicks(triggered_spell_id);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Shaman T10 Restoration 4P Bonus
|
// Item - Shaman T10 Restoration 4P Bonus
|
||||||
case 70808:
|
case 70808:
|
||||||
{
|
{
|
||||||
basepoints[0] = int32(triggerAmount * damage / 100);
|
triggered_spell_id = 70809; // Chained Heal
|
||||||
triggered_spell_id = 70809;
|
basepoints[0] = int32(triggerAmount * damage / 100) / GetSpellAuraMaxTicks(triggered_spell_id);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "11691"
|
#define REVISION_NR "11692"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue