[10248] Implement applying proper penalty spell when making use of talent 46917.

This commit is contained in:
Lynx3d 2010-07-23 06:04:04 +02:00
parent 5efb7410f2
commit 33e7d46519
4 changed files with 32 additions and 5 deletions

View file

@ -7825,10 +7825,18 @@ void Spell::EffectActivateRune(SpellEffectIndex eff_idx)
}
}
void Spell::EffectTitanGrip(SpellEffectIndex /*eff_idx*/)
void Spell::EffectTitanGrip(SpellEffectIndex eff_idx)
{
// Make sure "Titan's Grip" (49152) penalty spell does not silently change
if (m_spellInfo->EffectMiscValue[eff_idx] != 49152)
sLog.outError("Spell::EffectTitanGrip: Spell %u has unexpected EffectMiscValue '%u'", m_spellInfo->Id, m_spellInfo->EffectMiscValue[eff_idx]);
if (unitTarget && unitTarget->GetTypeId() == TYPEID_PLAYER)
((Player*)unitTarget)->SetCanTitanGrip(true);
{
Player *plr = (Player*)m_caster;
plr->SetCanTitanGrip(true);
if (plr->HasTwoHandWeaponInOneHand() && !plr->HasAura(49152))
plr->CastSpell(plr, 49152, true);
}
}
void Spell::EffectRenamePet(SpellEffectIndex /*eff_idx*/)