瀏覽代碼

Rounding some stat values.

JIV 15 年之前
父節點
當前提交
c1b158a57c

+ 0 - 17
L2_GameServer/java/com/l2jserver/gameserver/model/actor/L2Character.java

@@ -4969,23 +4969,6 @@ public abstract class L2Character extends L2Object
 //	}
 //	}
 //
 //
 
 
-	/**
-	 * Return the Weapon Expertise Penalty of the L2Character.<BR><BR>
-	 */
-	public float getWeaponExpertisePenalty()
-	{
-		return 1.f;
-	}
-
-	/**
-	 * Return the Armour Expertise Penalty of the L2Character.<BR><BR>
-	 */
-	public float getArmourExpertisePenalty()
-	{
-		return 1.f;
-	}
-
-
 	/**
 	/**
 	 * Set _attacking corresponding to Attacking Body part to CHEST.<BR><BR>
 	 * Set _attacking corresponding to Attacking Body part to CHEST.<BR><BR>
 	 */
 	 */

+ 4 - 6
L2_GameServer/java/com/l2jserver/gameserver/model/actor/stat/CharStat.java

@@ -140,8 +140,7 @@ public class CharStat
 	{
 	{
 		if (_activeChar == null)
 		if (_activeChar == null)
 			return 0;
 			return 0;
-		
-		return (int) (calcStat(Stats.ACCURACY_COMBAT, 0, null, null) / _activeChar.getWeaponExpertisePenalty());
+		return (int) Math.round(calcStat(Stats.ACCURACY_COMBAT, 0, null, null));
 	}
 	}
 
 
 	public L2Character getActiveChar()
 	public L2Character getActiveChar()
@@ -182,7 +181,7 @@ public class CharStat
 		if (_activeChar == null)
 		if (_activeChar == null)
 			return 1;
 			return 1;
 		
 		
-		int criticalHit = (int) (calcStat(Stats.CRITICAL_RATE, _activeChar.getTemplate().baseCritRate, target, skill)*10.0 + 0.5);
+		int criticalHit = (int) Math.round(calcStat(Stats.CRITICAL_RATE, _activeChar.getTemplate().baseCritRate, target, skill)*10.0 + 0.5);
 		criticalHit /= 10;
 		criticalHit /= 10;
 		// Set a cap of Critical Hit at 500
 		// Set a cap of Critical Hit at 500
 		if (criticalHit > Config.MAX_PCRIT_RATE)
 		if (criticalHit > Config.MAX_PCRIT_RATE)
@@ -206,7 +205,7 @@ public class CharStat
     	if (_activeChar == null)
     	if (_activeChar == null)
     		return 1;
     		return 1;
 
 
-		int val = (int) (calcStat(Stats.EVASION_RATE, 0, target, null) / _activeChar.getArmourExpertisePenalty());
+		int val = (int) Math.round(calcStat(Stats.EVASION_RATE, 0, target, null));
 		if (val > Config.MAX_EVASION && !_activeChar.isGM())
 		if (val > Config.MAX_EVASION && !_activeChar.isGM())
 			val = Config.MAX_EVASION;
 			val = Config.MAX_EVASION;
 		return val;
 		return val;
@@ -358,7 +357,6 @@ public class CharStat
     	if  (Config.L2JMOD_CHAMPION_ENABLE && _activeChar.isChampion())
     	if  (Config.L2JMOD_CHAMPION_ENABLE && _activeChar.isChampion())
     		bonusSpdAtk = Config.L2JMOD_CHAMPION_SPD_ATK;
     		bonusSpdAtk = Config.L2JMOD_CHAMPION_SPD_ATK;
 		double val = calcStat(Stats.MAGIC_ATTACK_SPEED, _activeChar.getTemplate().baseMAtkSpd * bonusSpdAtk, null, null);
 		double val = calcStat(Stats.MAGIC_ATTACK_SPEED, _activeChar.getTemplate().baseMAtkSpd * bonusSpdAtk, null, null);
-		val /= _activeChar.getArmourExpertisePenalty();
 		if (val > Config.MAX_MATK_SPEED && !_activeChar.isGM())
 		if (val > Config.MAX_MATK_SPEED && !_activeChar.isGM())
 			val = Config.MAX_MATK_SPEED;
 			val = Config.MAX_MATK_SPEED;
 		return (int) val;
 		return (int) val;
@@ -521,7 +519,7 @@ public class CharStat
     	float bonusAtk = 1;
     	float bonusAtk = 1;
         if  (Config.L2JMOD_CHAMPION_ENABLE && _activeChar.isChampion())
         if  (Config.L2JMOD_CHAMPION_ENABLE && _activeChar.isChampion())
     		bonusAtk = Config.L2JMOD_CHAMPION_SPD_ATK;
     		bonusAtk = Config.L2JMOD_CHAMPION_SPD_ATK;
-		int val = (int) (calcStat(Stats.POWER_ATTACK_SPEED, _activeChar.getTemplate().basePAtkSpd * bonusAtk, null, null) / _activeChar.getArmourExpertisePenalty());
+		int val = (int) Math.round(calcStat(Stats.POWER_ATTACK_SPEED, _activeChar.getTemplate().basePAtkSpd * bonusAtk, null, null));
 		return val;
 		return val;
 	}
 	}
 
 

+ 4 - 3
L2_GameServer/java/com/l2jserver/gameserver/model/actor/stat/PcStat.java

@@ -379,17 +379,18 @@ public class PcStat extends PlayableStat
 		if (getActiveChar() == null)
 		if (getActiveChar() == null)
 			return 1;
 			return 1;
 		
 		
-		int val = super.getRunSpeed();
+		int val;
 		
 		
 		L2PcInstance player = getActiveChar();
 		L2PcInstance player = getActiveChar();
 		if (player.isMounted())
 		if (player.isMounted())
 		{
 		{
 			int baseRunSpd = PetDataTable.getInstance().getPetData(player.getMountNpcId(), player.getMountLevel()).getPetSpeed();
 			int baseRunSpd = PetDataTable.getInstance().getPetData(player.getMountNpcId(), player.getMountLevel()).getPetSpeed();
-			val = (int) calcStat(Stats.RUN_SPEED, baseRunSpd, null, null);
+			val = (int) Math.round(calcStat(Stats.RUN_SPEED, baseRunSpd, null, null));
 		}
 		}
+		else
+			val = super.getRunSpeed();
 		
 		
 		val += Config.RUN_SPD_BOOST;
 		val += Config.RUN_SPD_BOOST;
-		val /= player.getArmourExpertisePenalty();
 		
 		
     	// Apply max run speed cap.
     	// Apply max run speed cap.
 		if (val > Config.MAX_RUN_SPEED && !getActiveChar().isGM())
 		if (val > Config.MAX_RUN_SPEED && !getActiveChar().isGM())