*Implement second part of Furor, closes #333.
*Add missed part of last commit (oops) --HG-- branch : trunk
This commit is contained in:
+12
-3
@@ -3549,20 +3549,29 @@ void AuraEffect::HandleAuraModShapeshift(bool apply, bool Real, bool changeAmoun
|
||||
// get furor proc chance
|
||||
uint32 FurorChance = 0;
|
||||
if (AuraEffect const *dummy = m_target->GetDummyAura(SPELLFAMILY_DRUID, 238, 0))
|
||||
FurorChance = dummy->GetAmount() > 0 ? uint32(dummy->GetAmount()) : 0;
|
||||
FurorChance = std::max(dummy->GetAmount(), 0);
|
||||
|
||||
if (GetMiscValue() == FORM_CAT)
|
||||
switch (GetMiscValue())
|
||||
{
|
||||
case FORM_CAT:
|
||||
{
|
||||
int32 basePoints = int32(std::min(oldPower, FurorChance));
|
||||
m_target->CastCustomSpell(m_target, 17099, &basePoints, NULL, NULL, true, NULL, this);
|
||||
}
|
||||
else
|
||||
break;
|
||||
case FORM_BEAR:
|
||||
case FORM_DIREBEAR:
|
||||
if (urand(0,99) < FurorChance)
|
||||
m_target->SetPower(POWER_RAGE, 10);
|
||||
default:
|
||||
{
|
||||
uint32 newEnergy = std::min(m_target->GetPower(POWER_ENERGY), FurorChance);
|
||||
m_target->SetPower(POWER_ENERGY, newEnergy);
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -6750,7 +6750,7 @@ void Spell::EffectPlayerPull(uint32 i)
|
||||
if(!unitTarget)
|
||||
return;
|
||||
|
||||
unitTarget->GetMotionMaster()->MoveJump(m_caster->GetPositionX(), m_caster->GetPositionY(), float(damage ? damage : unitTarget->GetDistance2d(m_caster)), float(m_spellInfo->EffectMiscValue[i])/10);
|
||||
unitTarget->GetMotionMaster()->MoveJump(m_caster->GetPositionX(), m_caster->GetPositionY(), m_caster->GetPositionZ(), float(damage ? damage : unitTarget->GetDistance2d(m_caster)), float(m_spellInfo->EffectMiscValue[i])/10);
|
||||
}
|
||||
|
||||
void Spell::EffectDispelMechanic(uint32 i)
|
||||
|
||||
Reference in New Issue
Block a user