Skip to content

Commit

Permalink
[9023] Fixed some hunter sting affects.
Browse files Browse the repository at this point in the history
* spell 1978 and ranks RAP bonus
* spell 53209 affect from spell 3034 dot.
  • Loading branch information
VladimirMangos committed Dec 18, 2009
1 parent 23a1a6c commit fc1afde
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/game/SpellAuras.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4788,8 +4788,8 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real)
// Serpent Sting
if (m_spellProto->SpellFamilyFlags & UI64LIT(0x0000000000004000))
{
// $RAP*0.1/5 bonus per tick
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(RANGED_ATTACK) * 10 / 500);
// $RAP*0.2/5 bonus per tick
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(RANGED_ATTACK) * 0.2 / 5);
return;
}
// Immolation Trap
Expand Down
24 changes: 20 additions & 4 deletions src/game/SpellEffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9022"
#define REVISION_NR "9023"
#endif // __REVISION_NR_H__

0 comments on commit fc1afde

Please sign in to comment.