Ver código fonte

Cast to long after operating in int range

durgus 17 anos atrás
pai
commit
4583612080

+ 1 - 1
L2_GameServer/java/net/sf/l2j/gameserver/model/actor/stat/PetStat.java

@@ -106,7 +106,7 @@ public class PetStat extends SummonStat
     	catch (NullPointerException e)
     	{
     		_log.warning("Pet NPC ID "+getActiveChar().getNpcId()+", level "+level+" is missing data from pets_stats table!");
-    		return 5000000*level; // temp value calculated from lvl 81 wyvern, 395734658
+    		return 5000000L*level; // temp value calculated from lvl 81 wyvern, 395734658
     	}
     }
 

+ 3 - 3
L2_GameServer/java/net/sf/l2j/gameserver/model/entity/TvTManager.java

@@ -66,7 +66,7 @@ public class TvTManager
 	 */
     public void scheduleEventStart()
     {
-        _task = new TvTStartTask(System.currentTimeMillis() + Config.TVT_EVENT_INTERVAL*60*1000);
+        _task = new TvTStartTask(System.currentTimeMillis() + 60000L*Config.TVT_EVENT_INTERVAL);
         ThreadPoolManager.getInstance().executeTask(_task);
     }
 
@@ -87,7 +87,7 @@ public class TvTManager
 	        Announcements.getInstance().announceToAll("TvT Event: Registration opened for " + Config.TVT_EVENT_PARTICIPATION_TIME +  " minute(s).");
             
 	        // schedule registration end
-	        _task.setStartTime(System.currentTimeMillis() + Config.TVT_EVENT_PARTICIPATION_TIME*60*1000);
+	        _task.setStartTime(System.currentTimeMillis() + 60000L*Config.TVT_EVENT_PARTICIPATION_TIME);
 	        ThreadPoolManager.getInstance().executeTask(_task);
 	    }
 	}
@@ -107,7 +107,7 @@ public class TvTManager
         else
         {
             TvTEvent.sysMsgToAllParticipants("TvT Event: Teleporting participants to an arena in " + Config.TVT_EVENT_START_LEAVE_TELEPORT_DELAY + " second(s).");
-            _task.setStartTime(System.currentTimeMillis() + Config.TVT_EVENT_RUNNING_TIME*60*1000);
+            _task.setStartTime(System.currentTimeMillis() + 60000L*Config.TVT_EVENT_RUNNING_TIME);
             ThreadPoolManager.getInstance().executeTask(_task);
         }
     }