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
@@ -13,7 +13,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
*/
namespace Framework.Constants
{
@@ -576,4 +576,10 @@ namespace Framework.Constants
Level4 = 3,
TauntImmune = 4
}
public enum AuraTriggerOnPowerChangeDirection
{
Gain = 0,
Loss = 1
}
}
+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);