[10237] Implement additional damage proc on hit for Spell 8024 and ranks.

This commit is contained in:
Lynx3d 2010-07-20 23:44:19 +02:00
parent d7b6840634
commit a4a6a7a609
7 changed files with 77 additions and 26 deletions

View file

@ -2362,6 +2362,23 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
m_caster->CastCustomSpell(unitTarget, 52032, &damage, 0, 0, true, 0, 0, m_originalCasterGUID);
return;
}
// Flametongue Weapon Proc, Ranks
if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000000000200000))
{
if (!m_CastItem)
{
sLog.outError("Spell::EffectDummy: spell %i requires cast Item", m_spellInfo->Id);
return;
}
// found spelldamage coefficients of 0.381% per 0.1 speed and 15.244 per 4.0 speed
// but own calculation say 0.385 gives at most one point difference to published values
int32 spellDamage = m_caster->SpellBaseDamageBonusDone(GetSpellSchoolMask(m_spellInfo));
float weaponSpeed = (1.0f/IN_MILLISECONDS) * m_CastItem->GetProto()->Delay;
int32 totalDamage = int32((damage + 3.85f * spellDamage) * 0.01 * weaponSpeed);
m_caster->CastCustomSpell(unitTarget, 10444, &totalDamage, NULL, NULL, true, m_CastItem);
return;
}
if (m_spellInfo->Id == 39610) // Mana Tide Totem effect
{
if (!unitTarget || unitTarget->getPowerType() != POWER_MANA)