refactor(Core/Misc): abs() to std::abs() (#9789)

This commit is contained in:
Kitzunu
2021-12-31 23:29:39 +01:00
committed by GitHub
parent fe9305c724
commit ac99eb48e1
25 changed files with 60 additions and 60 deletions

View File

@@ -1085,7 +1085,7 @@ void BattlefieldWG::UpdateTenacity()
if (Player* newPlayer = ObjectAccessor::FindPlayer(*itr))
if ((newPlayer->GetTeamId() == TEAM_ALLIANCE && m_tenacityStack > 0) || (newPlayer->GetTeamId() == TEAM_HORDE && m_tenacityStack < 0))
{
newStack = std::min(abs(newStack), 20);
newStack = std::min(std::abs(newStack), 20);
uint32 buff_honor = GetHonorBuff(newStack);
newPlayer->SetAuraStack(SPELL_TENACITY, newPlayer, newStack);
if (buff_honor)
@@ -1119,7 +1119,7 @@ void BattlefieldWG::UpdateTenacity()
if (newStack)
{
team = newStack > 0 ? TEAM_ALLIANCE : TEAM_HORDE;
newStack = std::min(abs(newStack), 20);
newStack = std::min(std::abs(newStack), 20);
uint32 buff_honor = GetHonorBuff(newStack);
for (GuidUnorderedSet::const_iterator itr = m_PlayersInWar[team].begin(); itr != m_PlayersInWar[team].end(); ++itr)