diff options
author | QAston <none@none> | 2010-12-27 20:14:54 +0100 |
---|---|---|
committer | QAston <none@none> | 2010-12-27 20:14:54 +0100 |
commit | ef968f4b1552c2f1673a2ec79d8cd6b1ec9c2d11 (patch) | |
tree | d9909a464e9131ffdbe3a6577f0c907560e5f799 /src/server/shared/Utilities/Util.h | |
parent | da8d794f4bd6765c45847d93626057e272f7358e (diff) |
Core/Unit: Big cleanup in Unit::CalcAbsorbResist
Core/AuraScript:
Fix compile time check for AuraScript functions
Remove AuraApplication from hook functions parameter list, use GetTarget() and GetTargetApplication() instead
Add OnEffectAbsorb hook
Scripts: move handlers of Spell Deflection, Savage Defense, Primal Tenacity, Nerves of Steel, Astral shift from core to scripts.
--HG--
branch : trunk
Diffstat (limited to 'src/server/shared/Utilities/Util.h')
-rwxr-xr-x | src/server/shared/Utilities/Util.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/server/shared/Utilities/Util.h b/src/server/shared/Utilities/Util.h index e84b26d4df8..abe3c16c48e 100755 --- a/src/server/shared/Utilities/Util.h +++ b/src/server/shared/Utilities/Util.h @@ -154,6 +154,12 @@ inline T ApplyPctU(T& base, uint32 pct) return base = CalculatePctU(base, pct); } +template <class T> +inline T RoundToInterval(T& num, T floor, T ceil) +{ + return num = std::min(std::max(num, floor), ceil); +} + // UTF8 handling bool Utf8toWStr(const std::string& utf8str, std::wstring& wstr); // in wsize==max size of buffer, out wsize==real string size |