diff options
Diffstat (limited to 'src/common/Utilities/Util.h')
| -rw-r--r-- | src/common/Utilities/Util.h | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/src/common/Utilities/Util.h b/src/common/Utilities/Util.h index e5ced06991..3976d4e76b 100644 --- a/src/common/Utilities/Util.h +++ b/src/common/Utilities/Util.h @@ -1,14 +1,14 @@ /* * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by the - * Free Software Foundation; either version 3 of the License, or (at your - * option) any later version. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along @@ -47,15 +47,6 @@ AC_COMMON_API Optional<int32> MoneyStringToMoney(std::string_view moneyString); std::string secsToTimeString(uint64 timeInSecs, bool shortText = false); uint32 TimeStringToSecs(const std::string& timestring); -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) |
