Core/Spells:
* fixed Revealing Strike damage bonus * convert Envenom to spellscript
This commit is contained in:
1 parent
7fe99b1a43
commit
4a3ef30d91
3 files changed
+121
-58
No files matched your search
@@ -433,58 +433,6 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex)
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_ROGUE:
|
||||
{
|
||||
// Envenom
|
||||
if (m_spellInfo->SpellFamilyFlags[1] & 0x00000008)
|
||||
{
|
||||
if (Player* player = m_caster->ToPlayer())
|
||||
{
|
||||
// consume from stack dozes not more that have combo-points
|
||||
if (uint32 combo = player->GetComboPoints())
|
||||
{
|
||||
// Lookup for Deadly poison (only attacker applied)
|
||||
if (AuraEffect const* aurEff = unitTarget->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_ROGUE, 0x00010000, 0, 0, m_caster->GetGUID()))
|
||||
{
|
||||
// count consumed deadly poison doses at target
|
||||
bool needConsume = true;
|
||||
uint32 spellId = aurEff->GetId();
|
||||
|
||||
uint32 doses = aurEff->GetBase()->GetStackAmount();
|
||||
if (doses > combo)
|
||||
doses = combo;
|
||||
|
||||
// Master Poisoner
|
||||
Unit::AuraEffectList const& auraList = player->GetAuraEffectsByType(SPELL_AURA_MOD_AURA_DURATION_BY_DISPEL_NOT_STACK);
|
||||
for (Unit::AuraEffectList::const_iterator iter = auraList.begin(); iter != auraList.end(); ++iter)
|
||||
{
|
||||
if ((*iter)->GetSpellInfo()->SpellFamilyName == SPELLFAMILY_ROGUE && (*iter)->GetSpellInfo()->SpellIconID == 1960)
|
||||
{
|
||||
uint32 chance = (*iter)->GetSpellInfo()->Effects[EFFECT_2].CalcValue(m_caster);
|
||||
|
||||
if (chance && roll_chance_i(chance))
|
||||
needConsume = false;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (needConsume)
|
||||
for (uint32 i = 0; i < doses; ++i)
|
||||
unitTarget->RemoveAuraFromStack(spellId, m_caster->GetGUID());
|
||||
|
||||
damage *= doses;
|
||||
damage += int32(player->GetTotalAttackPowerValue(BASE_ATTACK) * 0.09f * combo);
|
||||
}
|
||||
|
||||
// Eviscerate and Envenom Bonus Damage (item set effect)
|
||||
if (m_caster->HasAura(37169))
|
||||
damage += combo * 40;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_DEATHKNIGHT:
|
||||
{
|
||||
// Blood Boil - bonus for diseased targets
|
||||
|
||||
Reference in new issue
Block a user