Cast numbers

This commit is contained in:
brenoepic 2022-04-29 20:34:46 -03:00
parent a4e175f656
commit f99d7168bb
2 changed files with 2 additions and 2 deletions

View File

@ -28,7 +28,7 @@ public class RoomVisitsComposer extends MessageComposer {
Calendar cal = Calendar.getInstance(TimeZone.getDefault());
for (ModToolRoomVisit visit : this.roomVisits) {
cal.setTimeInMillis(visit.timestamp * 1000);
cal.setTimeInMillis(visit.timestamp * 1000L);
this.response.appendInt(visit.roomId);
this.response.appendString(visit.roomName);
this.response.appendInt(cal.get(Calendar.HOUR));

View File

@ -24,7 +24,7 @@ public class PetInfoMessageComposer extends MessageComposer {
@Override
protected ServerMessage composeInternal() {
double days = Math.floor((Emulator.getIntUnixTimestamp() - this.pet.getCreated()) / (3600 * 24));
double days = Math.floor((Emulator.getIntUnixTimestamp() - this.pet.getCreated()) / (3600.0 * 24));
this.response.init(Outgoing.PetInfoMessageComposer);
this.response.appendInt(this.pet.getId());
this.response.appendString(this.pet.getName());