Core/Refactor: Fix alot of Possible loss of fraction warnings
This commit is contained in:
@@ -161,8 +161,8 @@ namespace Game.Entities
|
||||
float xDiff = nextPosition.posX - lastPosition.posX;
|
||||
float yDiff = nextPosition.posY - lastPosition.posY;
|
||||
float zDiff = nextPosition.posZ - lastPosition.posZ;
|
||||
Position interPosition = new Position(lastPosition.posX + (xDiff * (interDiff / timeDiff)), lastPosition.posY +
|
||||
(yDiff * (interDiff / timeDiff)), lastPosition.posZ + (zDiff * (interDiff / timeDiff)));
|
||||
Position interPosition = new Position(lastPosition.posX + (xDiff * ((float)interDiff / timeDiff)), lastPosition.posY +
|
||||
(yDiff * ((float)interDiff / timeDiff)), lastPosition.posZ + (zDiff * ((float)interDiff / timeDiff)));
|
||||
|
||||
// Advance (at speed) to this position. The remote sight object is used
|
||||
// to send update information to player in cinematic
|
||||
|
||||
@@ -3772,7 +3772,7 @@ namespace Game.Entities
|
||||
ulong price = 0;
|
||||
if (crItem.IsGoldRequired(pProto) && pProto.GetBuyPrice() > 0) //Assume price cannot be negative (do not know why it is int32)
|
||||
{
|
||||
float buyPricePerItem = pProto.GetBuyPrice() / pProto.GetBuyCount();
|
||||
float buyPricePerItem = (float)pProto.GetBuyPrice() / pProto.GetBuyCount();
|
||||
ulong maxCount = (ulong)(PlayerConst.MaxMoneyAmount / buyPricePerItem);
|
||||
if (count > maxCount)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user