[9365] Implement spell 31226 and ranks in non-consume poison part.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
laise 2010-02-12 15:52:06 +03:00 committed by VladimirMangos
parent 71d0989db3
commit f272aa8d1a
2 changed files with 21 additions and 3 deletions

View file

@ -559,12 +559,30 @@ void Spell::EffectSchoolDMG(uint32 effect_idx)
// count consumed deadly poison doses at target
if (poison)
{
bool needConsume = true;
uint32 spellId = poison->GetId();
uint32 doses = poison->GetStackAmount();
if (doses > combo)
doses = combo;
for (uint32 i = 0; i < doses; ++i)
unitTarget->RemoveSingleSpellAurasFromStack(spellId);
// Master Poisoner
Unit::AuraList const& auraList = ((Player*)m_caster)->GetAurasByType(SPELL_AURA_MOD_DURATION_OF_EFFECTS_BY_DISPEL);
for(Unit::AuraList::const_iterator iter = auraList.begin(); iter!=auraList.end(); ++iter)
{
if ((*iter)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_ROGUE && (*iter)->GetSpellProto()->SpellIconID == 1960)
{
if (int32 chance = (*iter)->GetSpellProto()->CalculateSimpleValue(2))
if (roll_chance_i(chance))
needConsume = false;
break;
}
}
if(needConsume)
for (uint32 i = 0; i < doses; ++i)
unitTarget->RemoveSingleSpellAurasFromStack(spellId);
damage *= doses;
damage += int32(((Player*)m_caster)->GetTotalAttackPowerValue(BASE_ATTACK) * 0.09f * doses);
}

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9364"
#define REVISION_NR "9365"
#endif // __REVISION_NR_H__