Advertisement
LIONN

Fix AIO Skills

Nov 11th, 2013
389
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 2.70 KB | None | 0 0
  1. ### Eclipse Workspace Patch 1.0
  2. #P L2jFrozen_GameServer
  3. Index: head-src/com/l2jfrozen/gameserver/model/base/ClassId.java
  4. ===================================================================
  5. --- head-src/com/l2jfrozen/gameserver/model/base/ClassId.java   (revision 1004)
  6. +++ head-src/com/l2jfrozen/gameserver/model/base/ClassId.java   (working copy)
  7. @@ -519,6 +519,17 @@
  8.     {
  9.         return _parent;
  10.     }
  11. +  
  12. +   /**
  13. +    * @return to the first class
  14. +    */
  15. +   public final ClassId getFirstClass()
  16. +   {
  17. +       if (_parent == null)
  18. +           return this;
  19. +      
  20. +       return _parent.getFirstClass();
  21. +   }
  22.  
  23.     public static ClassId getClassIdByOrdinal(int id){
  24.        
  25. Index: head-src/com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminAio.java
  26. ===================================================================
  27. --- head-src/com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminAio.java    (revision 1004)
  28. +++ head-src/com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminAio.java    (working copy)
  29. @@ -27,6 +27,7 @@
  30.  import com.l2jfrozen.Config;
  31.  import com.l2jfrozen.gameserver.datatables.GmListTable;
  32.  import com.l2jfrozen.gameserver.handler.IAdminCommandHandler;
  33. +import com.l2jfrozen.gameserver.model.L2Skill;
  34.  import com.l2jfrozen.gameserver.model.L2World;
  35.  import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
  36.  import com.l2jfrozen.gameserver.network.serverpackets.EtcStatusUpdate;
  37. @@ -198,6 +199,10 @@
  38.  
  39.         if(days > 0)
  40.         {
  41. +           _player.setClassId(_player.getClassId().getFirstClass().getId());
  42. +           for (L2Skill skill : _player.getAllSkills())
  43. +               _player.removeSkill(skill);
  44. +          
  45.             _player.setAio(true);
  46.             _player.setEndTime("aio", days);
  47.             _player.getStat().addExp(_player.getStat().getExpForLevel(81));
  48. Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java
  49. ===================================================================
  50. --- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java    (revision 1004)
  51. +++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java    (working copy)
  52. @@ -10348,18 +10348,6 @@
  53.                             }
  54.                     }
  55.                 }
  56. -               if(player.getClassIndex() == 0 && activeClassId != player.getBaseClass())
  57. -               {
  58. -                   // Subclass in use but doesn't exist in DB -
  59. -                   // a possible restart-while-modifysubclass cheat has been attempted.
  60. -                   // Switching to use base class
  61. -                   player.setClassId(player.getBaseClass());
  62. -                   _log.warning("Player " + player.getName() + " reverted to base class. Possibly has tried a relogin exploit while subclassing.");
  63. -               }
  64. -               else
  65. -               {
  66. -                   player._activeClass = activeClassId;
  67. -               }
  68.  
  69.                 player.setApprentice(rset.getInt("apprentice"));
  70.                 player.setSponsor(rset.getInt("sponsor"));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement