mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 10:05:32 +01:00
Core/Auras: Update model overwriting rules for SPELL_AURA_TRANSFORM
This commit is contained in:
@@ -1672,9 +1672,6 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const* aurApp, uint8 mo
|
||||
if (aurApp->GetRemoveMode())
|
||||
return;
|
||||
|
||||
if (modelid > 0)
|
||||
target->SetDisplayId(modelid);
|
||||
|
||||
if (PowerType != POWER_MANA)
|
||||
{
|
||||
uint32 oldPower = target->GetPower(PowerType);
|
||||
@@ -1725,6 +1722,12 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const* aurApp, uint8 mo
|
||||
return;
|
||||
|
||||
target->SetShapeshiftForm(form);
|
||||
if (modelid > 0)
|
||||
{
|
||||
SpellInfo const* transformSpellInfo = sSpellMgr->GetSpellInfo(target->getTransForm());
|
||||
if (!transformSpellInfo || !GetSpellInfo()->IsPositive())
|
||||
target->SetDisplayId(modelid);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1847,9 +1850,11 @@ void AuraEffect::HandleAuraTransform(AuraApplication const* aurApp, uint8 mode,
|
||||
|
||||
if (apply)
|
||||
{
|
||||
// update active transform spell only when transform or shapeshift not set or not overwriting negative by positive case
|
||||
if (!target->GetModelForForm(target->GetShapeshiftForm()) || !GetSpellInfo()->IsPositive())
|
||||
// update active transform spell only when transform not set or not overwriting negative by positive case
|
||||
SpellInfo const* transformSpellInfo = sSpellMgr->GetSpellInfo(target->getTransForm());
|
||||
if (!transformSpellInfo || !GetSpellInfo()->IsPositive() || transformSpellInfo->IsPositive())
|
||||
{
|
||||
target->setTransForm(GetId());
|
||||
// special case (spell specific functionality)
|
||||
if (GetMiscValue() == 0)
|
||||
{
|
||||
@@ -2018,11 +2023,6 @@ void AuraEffect::HandleAuraTransform(AuraApplication const* aurApp, uint8 mode,
|
||||
}
|
||||
}
|
||||
|
||||
// update active transform spell only when transform or shapeshift not set or not overwriting negative by positive case
|
||||
SpellInfo const* transformSpellInfo = sSpellMgr->GetSpellInfo(target->getTransForm());
|
||||
if (!transformSpellInfo || !GetSpellInfo()->IsPositive() || transformSpellInfo->IsPositive())
|
||||
target->setTransForm(GetId());
|
||||
|
||||
// polymorph case
|
||||
if ((mode & AURA_EFFECT_HANDLE_REAL) && target->GetTypeId() == TYPEID_PLAYER && target->IsPolymorphed())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user