[7661] Fixed problem with not remove health regeneration from polymorph. Author: False.Genesis
Also fixed problem with remembering transform spell in case possible stacked negative and positive transforms. --HG-- branch : trunk
This commit is contained in:
+11
-8
@@ -3161,16 +3161,19 @@ void AuraEffect::HandleAuraTransform(bool apply, bool Real)
|
|||||||
if(GetId()==42016 && m_target->GetMountID() && !m_target->GetAurasByType(SPELL_AURA_MOD_INCREASE_FLIGHT_SPEED).empty())
|
if(GetId()==42016 && m_target->GetMountID() && !m_target->GetAurasByType(SPELL_AURA_MOD_INCREASE_FLIGHT_SPEED).empty())
|
||||||
m_target->SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID,16314);
|
m_target->SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID,16314);
|
||||||
}
|
}
|
||||||
m_target->setTransForm(GetId());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// update active transform spell only not set or not overwriting negative by positive case
|
||||||
|
if (!m_target->getTransForm() || !IsPositiveSpell(GetId()) || IsPositiveSpell(m_target->getTransForm()))
|
||||||
|
m_target->setTransForm(GetId());
|
||||||
|
|
||||||
// polymorph case
|
// polymorph case
|
||||||
if (Real && m_target->GetTypeId() == TYPEID_PLAYER && m_target->IsPolymorphed())
|
if (Real && m_target->GetTypeId() == TYPEID_PLAYER && m_target->IsPolymorphed())
|
||||||
{
|
{
|
||||||
// for players, start regeneration after 1s (in polymorph fast regeneration case)
|
// for players, start regeneration after 1s (in polymorph fast regeneration case)
|
||||||
// only if caster is Player (after patch 2.4.2)
|
// only if caster is Player (after patch 2.4.2)
|
||||||
if (IS_PLAYER_GUID(GetCasterGUID()) )
|
if (IS_PLAYER_GUID(GetCasterGUID()) )
|
||||||
((Player*)m_target)->setRegenTimer(1000);
|
((Player*)m_target)->setRegenTimer(1*IN_MILISECONDS);
|
||||||
|
|
||||||
//dismount polymorphed target (after patch 2.4.2)
|
//dismount polymorphed target (after patch 2.4.2)
|
||||||
if (m_target->IsMounted())
|
if (m_target->IsMounted())
|
||||||
@@ -3179,13 +3182,13 @@ void AuraEffect::HandleAuraTransform(bool apply, bool Real)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Unit::AuraEffectList const& otherTransforms = m_target->GetAurasByType(SPELL_AURA_TRANSFORM);
|
// ApplyModifier(true) will reapply it if need
|
||||||
if(otherTransforms.empty())
|
|
||||||
{
|
|
||||||
m_target->SetDisplayId(m_target->GetNativeDisplayId());
|
|
||||||
m_target->setTransForm(0);
|
m_target->setTransForm(0);
|
||||||
}
|
m_target->SetDisplayId(m_target->GetNativeDisplayId());
|
||||||
else
|
|
||||||
|
// re-aplly some from still active with preference negative cases
|
||||||
|
Unit::AuraEffectList const& otherTransforms = m_target->GetAurasByType(SPELL_AURA_TRANSFORM);
|
||||||
|
if (!otherTransforms.empty())
|
||||||
{
|
{
|
||||||
// look for other transform auras
|
// look for other transform auras
|
||||||
AuraEffect* handledAura = *otherTransforms.begin();
|
AuraEffect* handledAura = *otherTransforms.begin();
|
||||||
|
|||||||
Reference in New Issue
Block a user