Advertisement
VANPER

P.ATK/M.ATK SPEED LIMITE

Feb 10th, 2020
1,463
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.57 KB | None | 0 0
  1. Index: net.sf.l2j.gameserver.model.actor.stat;PlayerStat.java
  2. ===================================================================
  3. --- net.sf.l2j.gameserver.model.actor.stat;PlayerStat.java (revision 84)
  4. +++ net.sf.l2j.gameserver.model.actor.stat;PlayerStat.java (working copy)
  5.  
  6.  
  7.     @Override
  8.     public int getMAtkSpd()
  9.     {
  10. +       int val = super.getMAtkSpd();
  11. +       if (val > Config.MAX_MATK_SPEED)
  12. +           return Config.MAX_MATK_SPEED;
  13. +       return val;
  14.     }
  15.    
  16.    
  17.     @Override
  18.     public int getPAtkSpd()
  19.     {
  20.         if (getActiveChar().isMounted())
  21.         {
  22.             int base = getActiveChar().getPetDataEntry().getMountAtkSpd();
  23.             if (getActiveChar().checkFoodState(getActiveChar().getPetTemplate().getHungryLimit()))
  24.                 base /= 2;
  25.             return (int) calcStat(Stats.POWER_ATTACK_SPEED, base, null, null);
  26.         }
  27. +       int val = super.getPAtkSpd();
  28. +       if (getActiveChar().getClassId().equals(ClassId.PHANTOM_RANGER) || getActiveChar().getClassId().equals(ClassId.GHOST_SENTINEL))
  29. +       {
  30. +           if (val > Config.MAX_PATK_SPEED_GHOST)
  31. +               return Config.MAX_PATK_SPEED_GHOST;
  32. +       }
  33. +       else if (getActiveChar().getClassId().equals(ClassId.SILVER_RANGER) || getActiveChar().getClassId().equals(ClassId.MOONLIGHT_SENTINEL))
  34. +       {
  35. +           if (val > Config.MAX_PATK_SPEED_MOONL)
  36. +               return Config.MAX_PATK_SPEED_MOONL;
  37. +       }
  38. +       else if (val > Config.MAX_PATK_SPEED)
  39. +           return Config.MAX_PATK_SPEED;
  40. +       return val;
  41.     }
  42.    
  43. Index: net.sf.l2j;Config.java
  44. ===================================================================
  45. --- net.sf.l2j;Config.java (revision 84)
  46. +++ net.sf.l2j;Config.java (working copy)
  47.  
  48. +   public static int MAX_MATK_SPEED;
  49. +   public static int MAX_PATK_SPEED;
  50. +   public static int MAX_PATK_SPEED_GHOST;
  51. +   public static int MAX_PATK_SPEED_MOONL;
  52.    
  53.  
  54. +   MAX_MATK_SPEED = Integer.parseInt(player.getProperty("MaxMAtkSpeed", "1999"));
  55. +   MAX_PATK_SPEED = Integer.parseInt(player.getProperty("MaxPAtkSpeed", "1500"));
  56. +   MAX_PATK_SPEED_GHOST = Integer.parseInt(player.getProperty("MaxPAtkSpeedGhost", "1500"));
  57. +   MAX_PATK_SPEED_MOONL = Integer.parseInt(player.getProperty("MaxPAtkSpeedMoonl", "1500"));
  58.  
  59. Index: config/player.propertis
  60. ===================================================================
  61. --- config/player.propertis (revision 84)
  62. +++ config/player.propertis (working copy)
  63.  
  64. +   #====================================================
  65. +   #         P.ATK/M.ATK SPEED LIMITE
  66. +   #====================================================
  67. +   # All Classes
  68. +   MaxPAtkSpeed = 1500
  69. +  
  70. +   # Dark Elf Fighter
  71. +   MaxPAtkSpeedGhost = 1500
  72. +  
  73. +   # Elf Fighter
  74. +   MaxPAtkSpeedMoonl = 1600
  75. +  
  76. +   # All Classes mages
  77. +   MaxMAtkSpeed = 2000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement