Skip to content

Commit

Permalink
[9365] Implement spell 31226 and ranks in non-consume poison part.
Browse files Browse the repository at this point in the history
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
  • Loading branch information
laise authored and VladimirMangos committed Feb 12, 2010
1 parent ff34937 commit acaaac7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
22 changes: 20 additions & 2 deletions src/game/SpellEffects.cpp
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9364"
#define REVISION_NR "9365"
#endif // __REVISION_NR_H__

0 comments on commit acaaac7

Please sign in to comment.