Core/Game: Fix remaining warnings on windows (and most likely almost all of the ones on *nix)
--HG-- branch : trunk
This commit is contained in:
@@ -1143,7 +1143,7 @@ void Item::UpdatePlayedTime(Player *owner)
|
||||
uint32 current_playtime = GetUInt32Value(ITEM_FIELD_CREATE_PLAYED_TIME);
|
||||
// Calculate time elapsed since last played time update
|
||||
time_t curtime = time(NULL);
|
||||
uint32 elapsed = curtime - m_lastPlayedTimeUpdate;
|
||||
uint32 elapsed = uint32(curtime - m_lastPlayedTimeUpdate);
|
||||
uint32 new_playtime = current_playtime + elapsed;
|
||||
// Check if the refund timer has expired yet
|
||||
if (new_playtime <= 2*HOUR)
|
||||
@@ -1164,7 +1164,7 @@ void Item::UpdatePlayedTime(Player *owner)
|
||||
uint32 Item::GetPlayedTime()
|
||||
{
|
||||
time_t curtime = time(NULL);
|
||||
uint32 elapsed = curtime - m_lastPlayedTimeUpdate;
|
||||
uint32 elapsed = uint32(curtime - m_lastPlayedTimeUpdate);
|
||||
return GetUInt32Value(ITEM_FIELD_CREATE_PLAYED_TIME) + elapsed;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user