chore(Core/Misc): update floor and ceil to std (#19837)
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
#include "UpdateData.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldSession.h"
|
||||
#include <cmath>
|
||||
|
||||
void WorldSession::HandleSplitItemOpcode(WorldPacket& recvData)
|
||||
{
|
||||
@@ -1111,7 +1112,7 @@ void WorldSession::SendListInventory(ObjectGuid vendorGuid, uint32 vendorEntry)
|
||||
}
|
||||
|
||||
// reputation discount
|
||||
int32 price = item->IsGoldRequired(itemTemplate) ? uint32(floor(itemTemplate->BuyPrice * discountMod)) : 0;
|
||||
int32 price = item->IsGoldRequired(itemTemplate) ? uint32(std::floor(itemTemplate->BuyPrice * discountMod)) : 0;
|
||||
|
||||
data << uint32(slot + 1); // client expects counting to start at 1
|
||||
data << uint32(item->item);
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "UpdateMask.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldSession.h"
|
||||
#include <cmath>
|
||||
|
||||
enum StableResultCode
|
||||
{
|
||||
@@ -164,7 +165,7 @@ void WorldSession::SendTrainerList(ObjectGuid guid, const std::string& strTitle)
|
||||
|
||||
data << uint32(tSpell->spell); // learned spell (or cast-spell in profession case)
|
||||
data << uint8(state == TRAINER_SPELL_GREEN_DISABLED ? TRAINER_SPELL_GREEN : state);
|
||||
data << uint32(floor(tSpell->spellCost * fDiscountMod));
|
||||
data << uint32(std::floor(tSpell->spellCost * fDiscountMod));
|
||||
|
||||
data << uint32(primary_prof_first_rank && can_learn_primary_prof ? 1 : 0);
|
||||
// primary prof. learn confirmation dialog
|
||||
@@ -247,7 +248,7 @@ void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket& recvData)
|
||||
return;
|
||||
|
||||
// apply reputation discount
|
||||
uint32 nSpellCost = uint32(floor(trainer_spell->spellCost * _player->GetReputationPriceDiscount(unit)));
|
||||
uint32 nSpellCost = uint32(std::floor(trainer_spell->spellCost * _player->GetReputationPriceDiscount(unit)));
|
||||
|
||||
// check money requirement
|
||||
if (!_player->HasEnoughMoney(nSpellCost))
|
||||
|
||||
Reference in New Issue
Block a user