Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Eclipse Workspace Patch 1.0
- #P trunk_335
- Index: aCis_gameserver/config/players.properties
- ===================================================================
- --- aCis_gameserver/config/players.properties (revision 76)
- +++ aCis_gameserver/config/players.properties (working copy)
- @@ -218,15 +218,6 @@
- GMStartupAutoList = True
- #=============================================================
- -# Limits System
- -#=============================================================
- -
- -# Those settings put a cap limit to some players' stats.
- -# Default: 1400, 1600
- -MaxPAtkSpeed = 1400
- -MaxMAtkSpeed = 1600
- -
- -#=============================================================
- # Petitions
- #=============================================================
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/stat/CharStat.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/stat/CharStat.java (revision 76)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/stat/CharStat.java (working copy)
- @@ -153,36 +153,76 @@
- * @param skill
- * @return the Critical Hit rate (base+modifier) of the L2Character.
- */
- - public int getCriticalHit(L2Character target, L2Skill skill)
- - {
- - return Math.min((int) calcStat(Stats.CRITICAL_RATE, _activeChar.getTemplate().getBaseCritRate(), target, skill), 500);
- - }
- + public int getCriticalHit(L2Character target, L2Skill skill)
- + {
- + if (_activeChar == null)
- + {
- + return 1;
- + }
- +
- + int criticalHit = Math.min((int)calcStat(Stats.CRITICAL_RATE, _activeChar.getTemplate().getBaseCritRate(), target, skill), 500);
- +
- + if (criticalHit > Config.MAX_PCRIT_RATE) {
- + criticalHit = Config.MAX_PCRIT_RATE;
- + }
- + return criticalHit;
- + }
- /**
- * @param target
- * @param skill
- * @return the Magic Critical Hit rate (base+modifier) of the L2Character.
- */
- - public final int getMCriticalHit(L2Character target, L2Skill skill)
- - {
- - return (int) calcStat(Stats.MCRITICAL_RATE, 8, target, skill);
- - }
- + public final int getMCriticalHit(L2Character target, L2Skill skill)
- + {
- + if (_activeChar == null)
- + {
- + return 1;
- + }
- +
- + double mrate = calcStat(Stats.MCRITICAL_RATE, 8.0D, target, skill);
- +
- + if (mrate > Config.MAX_MCRIT_RATE) {
- + mrate = Config.MAX_MCRIT_RATE;
- + }
- + return (int)mrate;
- + }
- /**
- * @param target
- * @return the Attack Evasion rate (base+modifier) of the L2Character.
- */
- - public int getEvasionRate(L2Character target)
- - {
- - return (int) calcStat(Stats.EVASION_RATE, 0, target, null);
- - }
- + public int getEvasionRate(L2Character target)
- + {
- + if (_activeChar == null)
- + {
- + return 1;
- + }
- + int val = (int)Math.round(calcStat(Stats.EVASION_RATE, 0.0D, target, null));
- +
- + if ((val > Config.MAX_EVASION) && (!_activeChar.isGM()))
- + {
- + val = Config.MAX_EVASION;
- + }
- + return val;
- + }
- /**
- * @return the Accuracy (base+modifier) of the L2Character in function of the Weapon Expertise Penalty.
- */
- public int getAccuracy()
- {
- - return (int) calcStat(Stats.ACCURACY_COMBAT, 0, null, null);
- + if (_activeChar == null)
- + {
- + return 1;
- + }
- + int val = (int)Math.round(calcStat(Stats.ACCURACY_COMBAT, 0.0D, null, null));
- +
- + if ((val > Config.MAX_ACCURACY) && (!_activeChar.isGM()))
- + {
- + val = Config.MAX_ACCURACY;
- + }
- + return val;
- }
- public int getMaxHp()
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/stat/PcStat.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/stat/PcStat.java (revision 76)
- +++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/stat/PcStat.java (working copy)
- @@ -330,67 +330,61 @@
- else
- val = super.getRunSpeed();
- - final int penalty = getActiveChar().getExpertiseArmorPenalty();
- - if (penalty > 0)
- - val *= Math.pow(0.84, penalty);
- -
- - return val;
- + val += Config.RUN_SPD_BOOST;
- +
- + if ((val > Config.MAX_RUN_SPEED) && (!getActiveChar().isGM()))
- + {
- + return Config.MAX_RUN_SPEED;
- + }
- + return val;
- }
- @Override
- - public int getMAtkSpd()
- - {
- - int val = super.getMAtkSpd();
- -
- - if (val > Config.MAX_MATK_SPEED)
- - return Config.MAX_MATK_SPEED;
- -
- - final int penalty = getActiveChar().getExpertiseArmorPenalty();
- - if (penalty > 0)
- - val *= Math.pow(0.84, penalty);
- -
- - return val;
- - }
- + public int getMAtkSpd()
- + {
- + int val = super.getMAtkSpd();
- +
- + if ((val > Config.MAX_MATK_SPEED) && (!getActiveChar().isGM()))
- + {
- + return Config.MAX_MATK_SPEED;
- + }
- + return val;
- + }
- @Override
- - public int getPAtkSpd()
- - {
- - if (getActiveChar() == null)
- - return 1;
- -
- - int val = super.getPAtkSpd();
- -
- - if (val > Config.MAX_PATK_SPEED)
- - return Config.MAX_PATK_SPEED;
- -
- - final int penalty = getActiveChar().getExpertiseArmorPenalty();
- - if (penalty > 0)
- - val *= Math.pow(0.84, penalty);
- -
- - return val;
- - }
- + public int getPAtkSpd()
- + {
- + int val = super.getPAtkSpd();
- +
- + if ((val > Config.MAX_PATK_SPEED) && (!getActiveChar().isGM()))
- + {
- + return Config.MAX_PATK_SPEED;
- + }
- + return val;
- + }
- @Override
- - public int getEvasionRate(L2Character target)
- - {
- - int val = super.getEvasionRate(target);
- -
- - final int penalty = getActiveChar().getExpertiseArmorPenalty();
- - if (penalty > 0)
- - val -= (2 * penalty);
- -
- - return val;
- - }
- + public int getEvasionRate(L2Character target)
- + {
- + int val = super.getEvasionRate(target);
- +
- + if ((val > Config.MAX_EVASION) && (!getActiveChar().isGM()))
- + {
- + return Config.MAX_EVASION;
- + }
- + return val;
- + }
- @Override
- public int getAccuracy()
- {
- - int val = super.getAccuracy();
- -
- - if (getActiveChar().getExpertiseWeaponPenalty())
- - val -= 20;
- -
- - return val;
- + int val = super.getAccuracy();
- +
- + if ((val > Config.MAX_ACCURACY) && (!getActiveChar().isGM()))
- + {
- + return Config.MAX_ACCURACY;
- + }
- + return val;
- }
- @Override
- Index: aCis_gameserver/java/net/sf/l2j/Config.java
- ===================================================================
- --- aCis_gameserver/java/net/sf/l2j/Config.java (revision 77)
- +++ aCis_gameserver/java/net/sf/l2j/Config.java (working copy)
- @@ -416,6 +416,15 @@
- public static int PVP_TO_USE_STORE;
- public static boolean SERVER_TIME_ON_START;
- public static boolean ALLOW_ONLINE_VIEW;
- + /** Limits */
- + public static int RUN_SPD_BOOST;
- + public static int MAX_RUN_SPEED;
- + public static int MAX_PCRIT_RATE;
- + public static int MAX_MCRIT_RATE;
- + public static int MAX_PATK_SPEED;
- + public static int MAX_MATK_SPEED;
- + public static int MAX_EVASION;
- + public static int MAX_ACCURACY;
- // --------------------------------------------------
- // Players
- @@ -510,9 +519,6 @@
- public static boolean GM_STARTUP_SILENCE;
- public static boolean GM_STARTUP_AUTO_LIST;
- - /** Limits */
- - public static int MAX_PATK_SPEED;
- - public static int MAX_MATK_SPEED;
- /** petitions */
- public static boolean PETITIONING_ALLOWED;
- @@ -961,7 +967,15 @@
- PVP_TO_USE_STORE = aCis.getProperty("PvPToUseStore", 0);
- SERVER_TIME_ON_START = aCis.getProperty("ShowServerTimeOnStart", false);
- ALLOW_ONLINE_VIEW = aCis.getProperty("AllowOnlineView", false);
- -
- + RUN_SPD_BOOST = aCis.getProperty("RunSpeedBoost", 0);
- + MAX_RUN_SPEED = aCis.getProperty("MaxRunSpeed", 250);
- + MAX_PCRIT_RATE = aCis.getProperty("MaxPCritRate", 500);
- + MAX_MCRIT_RATE = aCis.getProperty("MaxMCritRate", 200);
- + MAX_PATK_SPEED = aCis.getProperty("MaxPAtkSpeed", 1500);
- + MAX_MATK_SPEED = aCis.getProperty("MaxMAtkSpeed", 1999);
- + MAX_EVASION = aCis.getProperty("MaxEvasion", 250);
- + MAX_ACCURACY = aCis.getProperty("MaxAccuracy", 300);
- +
- // NPCs / Monsters
- ExProperties npcs = load(NPCS_FILE);
- CHAMPION_FREQUENCY = npcs.getProperty("ChampionFrequency", 0);
- @@ -1154,8 +1168,6 @@
- GM_STARTUP_SILENCE = players.getProperty("GMStartupSilence", true);
- GM_STARTUP_AUTO_LIST = players.getProperty("GMStartupAutoList", true);
- - MAX_PATK_SPEED = Integer.parseInt(players.getProperty("MaxPAtkSpeed", "1400"));
- - MAX_MATK_SPEED = Integer.parseInt(players.getProperty("MaxMAtkSpeed", "1600"));
- PETITIONING_ALLOWED = players.getProperty("PetitioningAllowed", true);
- MAX_PETITIONS_PER_PLAYER = players.getProperty("MaxPetitionsPerPlayer", 5);
- Index: aCis_gameserver/config/aCis.properties
- ===================================================================
- --- aCis_gameserver/config/aCis.properties (revision 77)
- +++ aCis_gameserver/config/aCis.properties (working copy)
- @@ -30,3 +30,38 @@
- # Displays The Number of The Players That are Currently Online.
- # Default : False
- AllowOnlineView = False
- +
- +#=============================================================
- +# Limits
- +#=============================================================
- +
- +# Run speed modifier. Example: Setting this to 5 will give players +5 to their running speed.
- +# Default: 0
- +RunSpeedBoost = 0
- +
- +# Maximum character running speed.
- +# Default: 250
- +MaxRunSpeed = 250
- +
- +# Maximum character Physical Critical Rate. (10 = 1%)
- +# Default: 500
- +MaxPCritRate = 500
- +
- +# Maximum character Magic Critical Rate. (10 = 1%)
- +# Default: 200
- +MaxMCritRate = 200
- +
- +# Maximum character Attack Speed.
- +# Default: 1500
- +MaxPAtkSpeed = 1500
- +
- +# Maximum character Cast Speed.
- +# Default: 1999
- +MaxMAtkSpeed = 1999
- +
- +# Maximum character Evasion.
- +# Default: 250
- +MaxEvasion = 250
- +
- +# Maxmum character Accuracy
- +MaxAccuracy = 300
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement