Core/Refactor: Fix alot of Possible loss of fraction warnings

This commit is contained in:
hondacrx
2018-05-07 17:34:41 -04:00
parent daa425b029
commit b2c1554065
17 changed files with 31 additions and 30 deletions
@@ -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
+1 -1
View File
@@ -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)
{