### Eclipse Workspace Patch 1.0 #P L2jFrozen_GameServer Index: head-src/com/l2jfrozen/gameserver/model/entity/olympiad/Olympiad.java =================================================================== --- head-src/com/l2jfrozen/gameserver/model/entity/olympiad/Olympiad.java (revision 1132) +++ head-src/com/l2jfrozen/gameserver/model/entity/olympiad/Olympiad.java (working copy) @@ -331,13 +331,27 @@ else milliToEnd = getMillisToValidationEnd(); - LOGGER.info("Olympiad System: " + Math.round(milliToEnd / 60000) + " minutes until period ends"); + double numSecs = (milliToEnd / 1000) % 60; + double countDown = ((milliToEnd / 1000) - numSecs) / 60; + final int numMins = (int) Math.floor(countDown % 60); + countDown = (countDown - numMins) / 60; + int numHours = (int) Math.floor(countDown % 24); + int numDays = (int) Math.floor((countDown - numHours) / 24); + LOGGER.info("Olympiad System: " + numDays + " days, " + numHours + " hours and " + numMins + " mins. until period ends"); + if (_period == 0) { - milliToEnd = getMillisToWeekChange(); + long milliToEnd2 = getMillisToWeekChange(); - LOGGER.info("Olympiad System: Next weekly change is in " + Math.round(milliToEnd / 60000) + " minutes"); + double numSecs1 = (milliToEnd2 / 1000) % 60; + double countDown1 = ((milliToEnd2 / 1000) - numSecs1) / 60; + final int numMins1 = (int) Math.floor(countDown1 % 60); + countDown1 = (countDown - numMins1) / 60; + int numHours1 = (int) Math.floor(countDown1 % 24); + int numDays1 = (int) Math.floor((countDown1 - numHours1) / 24); + + LOGGER.info("Olympiad System: Next weekly change in " + numDays1 + " days, " + numHours1 + " hours and " + numMins1 + " mins."); } }
Créditos: tazerman2