mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[9872] Update damage/energize calculation for 1454 and ranks.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
b36cc9b258
commit
a4c5734256
2 changed files with 5 additions and 22 deletions
|
|
@ -1893,37 +1893,20 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
|
|||
// Life Tap
|
||||
if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000000000040000))
|
||||
{
|
||||
// In 303 exist spirit depend
|
||||
uint32 spirit = uint32(m_caster->GetStat(STAT_SPIRIT));
|
||||
switch (m_spellInfo->Id)
|
||||
{
|
||||
case 1454: damage+=spirit; break;
|
||||
case 1455: damage+=spirit*15/10; break;
|
||||
case 1456: damage+=spirit*2; break;
|
||||
case 11687: damage+=spirit*25/10; break;
|
||||
case 11688:
|
||||
case 11689:
|
||||
case 27222:
|
||||
case 57946: damage+=spirit*3; break;
|
||||
default:
|
||||
sLog.outError("Spell::EffectDummy: %u Life Tap need set spirit multipler", m_spellInfo->Id);
|
||||
return;
|
||||
}
|
||||
// Think its not need (also need remove Life Tap from SpellDamageBonus or add new value)
|
||||
// damage = m_caster->SpellDamageBonus(m_caster, m_spellInfo,uint32(damage > 0 ? damage : 0), SPELL_DIRECT_DAMAGE);
|
||||
if (unitTarget && (int32(unitTarget->GetHealth()) > damage))
|
||||
{
|
||||
// Shouldn't Appear in Combat Log
|
||||
unitTarget->ModifyHealth(-damage);
|
||||
|
||||
int32 mana = damage;
|
||||
int32 spell_power = m_caster->SpellBaseDamageBonusDone(GetSpellSchoolMask(m_spellInfo));
|
||||
int32 mana = damage + spell_power / 2;
|
||||
|
||||
// Improved Life Tap mod
|
||||
Unit::AuraList const& auraDummy = m_caster->GetAurasByType(SPELL_AURA_DUMMY);
|
||||
for(Unit::AuraList::const_iterator itr = auraDummy.begin(); itr != auraDummy.end(); ++itr)
|
||||
{
|
||||
if((*itr)->GetSpellProto()->SpellFamilyName==SPELLFAMILY_WARLOCK && (*itr)->GetSpellProto()->SpellIconID == 208)
|
||||
mana = ((*itr)->GetModifier()->m_amount + 100)* mana / 100;
|
||||
}
|
||||
|
||||
m_caster->CastCustomSpell(unitTarget, 31818, &mana, NULL, NULL, true);
|
||||
|
||||
// Mana Feed
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "9871"
|
||||
#define REVISION_NR "9872"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue