aboutsummaryrefslogtreecommitdiff
path: root/src/common/Utilities/Util.h
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2017-02-27 14:20:32 -0300
committerariel- <ariel-@users.noreply.github.com>2017-02-27 14:24:20 -0300
commitc69a7d1223b2ce108a221e5cc70f76cd80ae6675 (patch)
treec45764f47845f309379f251e14aab3a3bd290223 /src/common/Utilities/Util.h
parent8f2bcd79da39ef9448938842de32b6f8572facdf (diff)
Core/Auras: reworked multiplicative AuraEffects calculation
- Splitted containers for flat modifiers and pct modifiers, as they now have different handling - Amount is now multiplied only on apply; on unapply, iterate through auras and reset the counter - Fixes many cases of rounding error due to applying/unapplying of small factors - Allows amounts to be zeroed (ie with an AuraEffect of amount -100) - Do a partial revert of 6dc37a9add631888fe5fbcd43d19c2b07bed8a57, auras should update amounts only for items allowed (ie no more giving crit to a sword while having an axe in the other hand and being Poleaxe spec'd) - SPELL_AURA_MOD_SCALE now scales additively, rather than multiplicatively (checked in sniffs) Closes #18687
Diffstat (limited to 'src/common/Utilities/Util.h')
-rw-r--r--src/common/Utilities/Util.h7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/common/Utilities/Util.h b/src/common/Utilities/Util.h
index 7b9db849b50..92a2f601c3f 100644
--- a/src/common/Utilities/Util.h
+++ b/src/common/Utilities/Util.h
@@ -78,13 +78,6 @@ TC_COMMON_API std::string secsToTimeString(uint64 timeInSecs, bool shortText = f
TC_COMMON_API uint32 TimeStringToSecs(const std::string& timestring);
TC_COMMON_API std::string TimeToTimestampStr(time_t t);
-inline void ApplyPercentModFloatVar(float& var, float val, bool apply)
-{
- if (val == -100.0f) // prevent set var to zero
- val = -99.99f;
- var *= (apply ? (100.0f + val) / 100.0f : 100.0f / (100.0f + val));
-}
-
// Percentage calculation
template <class T, class U>
inline T CalculatePct(T base, U pct)