aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormaximius <none@none>2009-10-31 17:09:38 -0700
committermaximius <none@none>2009-10-31 17:09:38 -0700
commit81c5903d03e233b3e0ac6f270b84199ac74f6acd (patch)
tree286e8b1d497c0aff6c55c638a436c1989e898cfa /src
parente335592a52b7f75b7734dcd23f57f7c15326b868 (diff)
*Implement Master Poisoner - chance to not consume Deadly Poison, thanks Sisif
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/SpellEffects.cpp22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index bc239627cd9..4d947f41bde 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -556,13 +556,29 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
if (AuraEffect const * aurEff = unitTarget->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_ROGUE, 0x10000, 0, 0, m_caster->GetGUID()))
{
// count consumed deadly poison doses at target
- //Aura *poison = 0;
+ bool needConsume = true;
uint32 spellId = aurEff->GetId();
uint32 doses = aurEff->GetParentAura()->GetStackAmount();
if (doses > combo)
doses = combo;
- for (uint32 i = 0; i < doses; ++i)
- unitTarget->RemoveAuraFromStack(spellId);
+ // Master Poisoner
+ Unit::AuraEffectList const& auraList = ((Player*)m_caster)->GetAurasByType(SPELL_AURA_MOD_AURA_DURATION_BY_DISPEL_NOT_STACK);
+ for (Unit::AuraEffectList::const_iterator iter = auraList.begin(); iter != auraList.end(); ++iter)
+ {
+ if ((*iter)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_ROGUE && (*iter)->GetSpellProto()->SpellIconID == 1960)
+ {
+ uint32 chance = (*iter)->GetSpellProto()->CalculateSimpleValue(2);
+
+ if (chance && roll_chance_i(chance))
+ needConsume = false;
+
+ break;
+ }
+ }
+
+ if (needConsume)
+ for (uint32 i = 0; i < doses; ++i)
+ unitTarget->RemoveAuraFromStack(spellId);
damage *= doses;
damage += int32(((Player*)m_caster)->GetTotalAttackPowerValue(BASE_ATTACK) * 0.03f * doses);
}