Core/Spells Handle auras 328 & 396 (SPELL_AURA_TRIGGER_SPELL_ON_POWER_*)

Port From (https://github.com/TrinityCore/TrinityCore/commit/56e9560661adca81fc1e9a297cb6823cf7a6cb22)
This commit is contained in:
hondacrx
2021-03-08 13:50:15 -05:00
parent cb25ddc507
commit ee97dc7b32
4 changed files with 115 additions and 1 deletions
+5
View File
@@ -171,6 +171,11 @@ public static class MathFunctions
return (ulong)(value * pct / 100.0f);
}
public static float GetPctOf(float value, float max)
{
return value / max * 100.0f;
}
public static int RoundToInterval(ref int num, dynamic floor, dynamic ceil)
{
return num = (int)Math.Min(Math.Max(num, floor), ceil);