Core/Entities: Regenerated updatefields code with latest generator fixes

Port From (https://github.com/TrinityCore/TrinityCore/commit/331b9ccd6a3be12e92e7c2aab7b793739b405d2f)
This commit is contained in:
hondacrx
2021-02-18 12:08:56 -05:00
parent 03456fb574
commit 6c121e7ef5
5 changed files with 33 additions and 26 deletions
+5 -1
View File
@@ -4141,11 +4141,15 @@ namespace Game.Spells
if (!mode.HasAnyFlag(AuraEffectHandleModes.ChangeAmountMask))
return;
// handled in SpellInfo::CalcPowerCost, this is only for client UI
if ((GetMiscValueB() & (1 << (int)PowerType.Mana)) == 0)
return;
Unit target = aurApp.GetTarget();
for (int i = 0; i < (int)SpellSchools.Max; ++i)
if (Convert.ToBoolean(GetMiscValue() & (1 << i)))
target.ApplyModPowerCostModifier((SpellSchools)i, GetAmount(), apply);
target.ApplyModManaCostModifier((SpellSchools)i, GetAmount(), apply);
}
[AuraEffectHandler(AuraType.ArenaPreparation)]
+1 -1
View File
@@ -2774,7 +2774,7 @@ namespace Game.Spells
}
if (power.PowerType == PowerType.Mana)
flatMod *= (int)(1.0f + caster.m_unitData.ManaCostModifierModifier);
flatMod *= (int)(1.0f + caster.m_unitData.ManaCostMultiplier); // this is wrong
powerCost += flatMod;
}