[9023] Fixed some hunter sting affects.

* spell 1978 and ranks RAP bonus
* spell 53209 affect from spell 3034 dot.
This commit is contained in:
VladimirMangos 2009-12-19 02:40:10 +03:00
parent b95e3046c0
commit 29a096a348
3 changed files with 23 additions and 7 deletions

View file

@ -5458,19 +5458,35 @@ void Spell::EffectScriptEffect(uint32 effIndex)
// Serpent Sting - Instantly deals 40% of the damage done by your Serpent Sting.
if ((familyFlag & UI64LIT(0x0000000000004000)) && aura->GetEffIndex() == 0)
{
spellId = 53353; // 53353 Chimera Shot - Serpent
// m_amount already include RAP bonus
basePoint = aura->GetModifier()->m_amount * 5 * 40 / 100;
spellId = 53353; // Chimera Shot - Serpent
}
// Viper Sting - Instantly restores mana to you equal to 60% of the total amount drained by your Viper Sting.
if ((familyFlag & UI64LIT(0x0000008000000000)) && aura->GetEffIndex() == 0)
{
spellId = 53358; // 53358 Chimera Shot - Viper
basePoint = aura->GetModifier()->m_amount * 4 * 60 / 100;
uint32 target_max_mana = unitTarget->GetMaxPower(POWER_MANA);
if (!target_max_mana)
continue;
// ignore non positive values (can be result apply spellmods to aura damage
uint32 pdamage = aura->GetModifier()->m_amount > 0 ? aura->GetModifier()->m_amount : 0;
// Special case: draining x% of mana (up to a maximum of 2*x% of the caster's maximum mana)
uint32 maxmana = m_caster->GetMaxPower(POWER_MANA) * pdamage * 2 / 100;
pdamage = target_max_mana * pdamage / 100;
if (pdamage > maxmana)
pdamage = maxmana;
pdamage *= 4; // total aura damage
basePoint = pdamage * 60 / 100;
spellId = 53358; // Chimera Shot - Viper
target = m_caster;
}
// Scorpid Sting - Attempts to Disarm the target for 10 sec. This effect cannot occur more than once per 1 minute.
if (familyFlag & UI64LIT(0x0000000000008000))
spellId = 53359; // 53359 Chimera Shot - Scorpid
spellId = 53359; // Chimera Shot - Scorpid
// ?? nothing say in spell desc (possibly need addition check)
//if ((familyFlag & UI64LIT(0x0000010000000000)) || // dot
// (familyFlag & UI64LIT(0x0000100000000000))) // stun