mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 13:46:24 +00:00
refactor(Core/Misc): ceil() to std::ceil() (#9791)
- prefer std functions over C functions
This commit is contained in:
@@ -891,7 +891,7 @@ bool BfCapturePoint::HandlePlayerEnter(Player* player)
|
||||
if (GameObject* go = GetCapturePointGo(player))
|
||||
{
|
||||
player->SendUpdateWorldState(go->GetGOInfo()->capturePoint.worldState1, 1);
|
||||
player->SendUpdateWorldState(go->GetGOInfo()->capturePoint.worldstate2, uint32(ceil((m_value + m_maxValue) / (2 * m_maxValue) * 100.0f)));
|
||||
player->SendUpdateWorldState(go->GetGOInfo()->capturePoint.worldstate2, uint32(std::ceil((m_value + m_maxValue) / (2 * m_maxValue) * 100.0f)));
|
||||
player->SendUpdateWorldState(go->GetGOInfo()->capturePoint.worldstate3, m_neutralValuePct);
|
||||
}
|
||||
return m_activePlayers[player->GetTeamId()].insert(player->GetGUID()).second;
|
||||
@@ -924,7 +924,7 @@ void BfCapturePoint::SendChangePhase()
|
||||
// send this too, sometimes the slider disappears, dunno why :(
|
||||
player->SendUpdateWorldState(capturePoint->GetGOInfo()->capturePoint.worldState1, 1);
|
||||
// send these updates to only the ones in this objective
|
||||
player->SendUpdateWorldState(capturePoint->GetGOInfo()->capturePoint.worldstate2, (uint32) ceil((m_value + m_maxValue) / (2 * m_maxValue) * 100.0f));
|
||||
player->SendUpdateWorldState(capturePoint->GetGOInfo()->capturePoint.worldstate2, (uint32) std::ceil((m_value + m_maxValue) / (2 * m_maxValue) * 100.0f));
|
||||
// send this too, sometimes it resets :S
|
||||
player->SendUpdateWorldState(capturePoint->GetGOInfo()->capturePoint.worldstate3, m_neutralValuePct);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user