Browse Source

BETA: Reduced some calculations.

MELERIX 12 years ago
parent
commit
5e026bc09d

+ 1 - 1
L2J_Server_BETA/java/com/l2jserver/gameserver/model/L2TradeList.java

@@ -305,7 +305,7 @@ public class L2TradeList
 		 */
 		public void setRestoreDelay(long restoreDelay)
 		{
-			_restoreDelay = restoreDelay * 60 * 60 * 1000;
+			_restoreDelay = restoreDelay * 3600000;
 		}
 		
 		/**

+ 1 - 1
L2J_Server_BETA/java/com/l2jserver/gameserver/model/entity/Auction.java

@@ -234,7 +234,7 @@ public class Auction
 		long taskDelay = 0;
 		if (_endDate <= currentTime)
 		{
-			_endDate = currentTime + (7 * 24 * 60 * 60 * 1000);
+			_endDate = currentTime + (7 * 24 * 3600000);
 			saveAuctionDate();
 		}
 		else

+ 2 - 2
L2J_Server_BETA/java/com/l2jserver/gameserver/model/entity/Fort.java

@@ -279,7 +279,7 @@ public class Fort
 		if ((getOwnerClan() != null) && (getFortState() == 0))
 		{
 			spawnSpecialEnvoys();
-			ThreadPoolManager.getInstance().scheduleGeneral(new ScheduleSpecialEnvoysDeSpawn(this), 1 * 60 * 60 * 1000); // Prepare 1hr task for special envoys despawn
+			ThreadPoolManager.getInstance().scheduleGeneral(new ScheduleSpecialEnvoysDeSpawn(this), 3600000); // Prepare 1hr task for special envoys despawn
 		}
 	}
 	
@@ -485,7 +485,7 @@ public class Fort
 		}
 		
 		spawnSpecialEnvoys();
-		ThreadPoolManager.getInstance().scheduleGeneral(new ScheduleSpecialEnvoysDeSpawn(this), 1 * 60 * 60 * 1000); // Prepare 1hr task for special envoys despawn
+		ThreadPoolManager.getInstance().scheduleGeneral(new ScheduleSpecialEnvoysDeSpawn(this), 3600000); // Prepare 1hr task for special envoys despawn
 		// if clan have already fortress, remove it
 		if (clan.getFortId() > 0)
 		{

+ 0 - 62
L2J_Server_BETA/java/com/l2jserver/gameserver/model/skills/L2Skill.java

@@ -132,9 +132,6 @@ public abstract class L2Skill implements IChanceSkillTrigger
 	// Abnormal levels for skills and their canceling, e.g. poison vs negate
 	private final int _abnormalLvl; // e.g. poison or bleed lvl 2
 	// Note: see also _effectAbnormalLvl
-	private final int _negateLvl; // abnormalLvl is negated with negateLvl
-	private final int[] _negateId; // cancels the effect of skill ID
-	private final L2SkillType[] _negateStats; // lists the effect types that are canceled
 	private final Map<String, Byte> _negateAbnormals; // lists the effect abnormal types with order below the presented that are canceled
 	private final int _maxNegatedEffects; // maximum number of effects to negate
 	
@@ -290,37 +287,7 @@ public abstract class L2Skill implements IChanceSkillTrigger
 		
 		_abnormalLvl = set.getInteger("abnormalLvl", -1);
 		_effectAbnormalLvl = set.getInteger("effectAbnormalLvl", -1); // support for a separate effect abnormal lvl, e.g. poison inside a different skill
-		_negateLvl = set.getInteger("negateLvl", -1);
-		
 		_attribute = set.getString("attribute", "");
-		String str = set.getString("negateStats", "");
-		
-		if (str.isEmpty())
-		{
-			_negateStats = new L2SkillType[0];
-		}
-		else
-		{
-			String[] stats = str.split(" ");
-			L2SkillType[] array = new L2SkillType[stats.length];
-			
-			for (int i = 0; i < stats.length; i++)
-			{
-				L2SkillType type = null;
-				try
-				{
-					type = Enum.valueOf(L2SkillType.class, stats[i]);
-				}
-				catch (Exception e)
-				{
-					throw new IllegalArgumentException("SkillId: " + _id + "Enum value of type " + L2SkillType.class.getName() + "required, but found: " + stats[i]);
-				}
-				
-				array[i] = type;
-			}
-			_negateStats = array;
-		}
-		
 		String negateAbnormals = set.getString("negateAbnormals", null);
 		if ((negateAbnormals != null) && !negateAbnormals.isEmpty())
 		{
@@ -354,20 +321,6 @@ public abstract class L2Skill implements IChanceSkillTrigger
 			_negateAbnormals = null;
 		}
 		
-		String negateId = set.getString("negateId", null);
-		if (negateId != null)
-		{
-			String[] valuesSplit = negateId.split(",");
-			_negateId = new int[valuesSplit.length];
-			for (int i = 0; i < valuesSplit.length; i++)
-			{
-				_negateId[i] = Integer.parseInt(valuesSplit[i]);
-			}
-		}
-		else
-		{
-			_negateId = new int[0];
-		}
 		_maxNegatedEffects = set.getInteger("maxNegated", 0);
 		
 		_stayAfterDeath = set.getBool("stayAfterDeath", false);
@@ -650,11 +603,6 @@ public abstract class L2Skill implements IChanceSkillTrigger
 		return isPvE ? _pvePower : isPvP ? _pvpPower : _power;
 	}
 	
-	public final L2SkillType[] getNegateStats()
-	{
-		return _negateStats;
-	}
-	
 	public final Map<String, Byte> getNegateAbnormals()
 	{
 		return _negateAbnormals;
@@ -665,16 +613,6 @@ public abstract class L2Skill implements IChanceSkillTrigger
 		return _abnormalLvl;
 	}
 	
-	public final int getNegateLvl()
-	{
-		return _negateLvl;
-	}
-	
-	public final int[] getNegateId()
-	{
-		return _negateId;
-	}
-	
 	public final int getMagicLevel()
 	{
 		return _magicLevel;

+ 1 - 1
L2J_Server_BETA/java/com/l2jserver/loginserver/L2LoginServer.java

@@ -294,7 +294,7 @@ public final class L2LoginServer
 			{
 				try
 				{
-					Thread.sleep(Config.LOGIN_SERVER_SCHEDULE_RESTART_TIME * 60 * 60 * 1000);
+					Thread.sleep(Config.LOGIN_SERVER_SCHEDULE_RESTART_TIME * 3600000);
 				}
 				catch (InterruptedException e)
 				{