Core/Unit: Random code style/naming adjustments

Port From (https://github.com/TrinityCore/TrinityCore/commit/05119fd90949340cad4a700d12069154a2faf5f6)
This commit is contained in:
hondacrx
2021-11-01 12:09:07 -04:00
parent 3f684eadf9
commit 1e4fa35ac2
7 changed files with 15 additions and 14 deletions
+6 -6
View File
@@ -1250,7 +1250,7 @@ namespace Game.Spells
// and polymorphic affects
if (target.IsPolymorphed())
target.RemoveAurasDueToSpell(target.GetTransForm());
target.RemoveAurasDueToSpell(target.GetTransformSpell());
break;
}
default:
@@ -1272,7 +1272,7 @@ namespace Game.Spells
if (modelid > 0)
{
SpellInfo transformSpellInfo = Global.SpellMgr.GetSpellInfo(target.GetTransForm(), GetBase().GetCastDifficulty());
SpellInfo transformSpellInfo = Global.SpellMgr.GetSpellInfo(target.GetTransformSpell(), GetBase().GetCastDifficulty());
if (transformSpellInfo == null || !GetSpellInfo().IsPositive())
target.SetDisplayId(modelid);
}
@@ -1377,10 +1377,10 @@ namespace Game.Spells
if (apply)
{
// update active transform spell only when transform not set or not overwriting negative by positive case
SpellInfo transformSpellInfo = Global.SpellMgr.GetSpellInfo(target.GetTransForm(), GetBase().GetCastDifficulty());
SpellInfo transformSpellInfo = Global.SpellMgr.GetSpellInfo(target.GetTransformSpell(), GetBase().GetCastDifficulty());
if (transformSpellInfo == null || !GetSpellInfo().IsPositive() || transformSpellInfo.IsPositive())
{
target.SetTransForm(GetId());
target.SetTransformSpell(GetId());
// special case (spell specific functionality)
if (GetMiscValue() == 0)
{
@@ -1558,8 +1558,8 @@ namespace Game.Spells
}
else
{
if (target.GetTransForm() == GetId())
target.SetTransForm(0);
if (target.GetTransformSpell() == GetId())
target.SetTransformSpell(0);
target.RestoreDisplayId(target.IsMounted());