mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 22:37:02 +00:00
[7661] Fixed problem with not remove health regeneration from polymorph.
Signed-off-by: VladimirMangos <vladimir@getmangos.com> Also fixed problem with remembering transform spell in case possible stacked negative and positive transforms.
This commit is contained in:
parent
cce772c08c
commit
f89c2052ea
2 changed files with 21 additions and 18 deletions
|
|
@ -2843,9 +2843,12 @@ void Aura::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())
|
||||||
{
|
{
|
||||||
|
|
@ -2861,13 +2864,13 @@ void Aura::HandleAuraTransform(bool apply, bool Real)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Unit::AuraList 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::AuraList const& otherTransforms = m_target->GetAurasByType(SPELL_AURA_TRANSFORM);
|
||||||
|
if (!otherTransforms.empty())
|
||||||
{
|
{
|
||||||
// look for other transform auras
|
// look for other transform auras
|
||||||
Aura* handledAura = *otherTransforms.begin();
|
Aura* handledAura = *otherTransforms.begin();
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7660"
|
#define REVISION_NR "7661"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue