Core/Auras: Check min power instead of 0 for SPELL_AURA_OBS_MOD_POWER
Port From (https://github.com/TrinityCore/TrinityCore/commit/c850e2f7801fecd9a56d88dda1fc60e27fd30bdf)
This commit is contained in:
@@ -177,7 +177,7 @@ namespace Game.Entities
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int GetMinPower(PowerType power) { return power == PowerType.LunarPower ? -100 : 0; }
|
public int GetMinPower(PowerType power) { return power == PowerType.LunarPower ? -100 : 0; }
|
||||||
|
|
||||||
// returns negative amount on power reduction
|
// returns negative amount on power reduction
|
||||||
public int ModifyPower(PowerType power, int dVal, bool withPowerUpdate = true)
|
public int ModifyPower(PowerType power, int dVal, bool withPowerUpdate = true)
|
||||||
|
|||||||
@@ -5578,8 +5578,13 @@ namespace Game.Spells
|
|||||||
// don't regen when permanent aura and limit is already reached
|
// don't regen when permanent aura and limit is already reached
|
||||||
if (GetBase().IsPermanent())
|
if (GetBase().IsPermanent())
|
||||||
{
|
{
|
||||||
if ((target.GetPower(powerType) == target.GetMaxPower(powerType) && GetAmount() > 0)
|
if (GetAmount() >= 0)
|
||||||
|| (target.GetPower(powerType) == 0 && GetAmount() < 0))
|
{
|
||||||
|
if (target.GetPower(powerType) >= target.GetMaxPower(powerType))
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (target.GetPower(powerType) <= target.GetMinPower(powerType))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user