Advertisement
warc222

Allow Players To Add Subclasses At Any Classmaster

Oct 6th, 2015
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.20 KB | None | 0 0
  1. ### Eclipse Workspace Patch 1.0
  2. #P L2jFrozen_GameServer
  3. Index: config/head/altsettings.properties
  4. ===================================================================
  5. --- config/head/altsettings.properties (revision 1118)
  6. +++ config/head/altsettings.properties (working copy)
  7. @@ -131,8 +131,11 @@
  8. AltGameSkillLearn = False
  9.  
  10. # Allow player sub-class addition without checking for unique quest items.
  11. AltSubClassWithoutQuests = True
  12.  
  13. +#Class Master gives ANY sub-class.
  14. +AllowAllSubclassesChange = False
  15. +
  16. # Restore Buffs On Subclass Change.
  17. # IMPORTANT: It's better put it False to avoid exploit
  18. AltRestoreEffectOnSub = False
  19.  
  20. Index: head-src/com/l2jfrozen/Config.java
  21. ===================================================================
  22. --- head-src/com/l2jfrozen/Config.java (revision 1118)
  23. +++ head-src/com/l2jfrozen/Config.java (working copy)
  24. @@ -1038,6 +1038,7 @@
  25. public static boolean ALT_GAME_FREE_TELEPORT;
  26. public static boolean ALT_RECOMMEND;
  27. public static boolean ALT_GAME_SUBCLASS_WITHOUT_QUESTS;
  28. + public static boolean ALL_SUBCLASS;
  29. public static boolean ALT_RESTORE_EFFECTS_ON_SUBCLASS_CHANGE;
  30. public static boolean ALT_GAME_VIEWNPC;
  31. public static int ALT_CLAN_MEMBERS_FOR_WAR;
  32. @@ -1208,6 +1209,7 @@
  33. ALT_GAME_FREE_TELEPORT = Boolean.parseBoolean(altSettings.getProperty("AltFreeTeleporting", "False"));
  34. ALT_RECOMMEND = Boolean.parseBoolean(altSettings.getProperty("AltRecommend", "False"));
  35. ALT_GAME_SUBCLASS_WITHOUT_QUESTS = Boolean.parseBoolean(altSettings.getProperty("AltSubClassWithoutQuests", "False"));
  36. + ALL_SUBCLASS = Boolean.parseBoolean(altSettings.getProperty("AllowAllSubclassesChange", "False"));
  37. ALT_RESTORE_EFFECTS_ON_SUBCLASS_CHANGE = Boolean.parseBoolean(altSettings.getProperty("AltRestoreEffectOnSub", "False"));
  38. ALT_GAME_VIEWNPC = Boolean.parseBoolean(altSettings.getProperty("AltGameViewNpc", "False"));
  39. ALT_GAME_NEW_CHAR_ALWAYS_IS_NEWBIE = Boolean.parseBoolean(altSettings.getProperty("AltNewCharAlwaysIsNewbie", "False"));
  40. Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2VillageMasterInstance.java
  41. ===================================================================
  42. --- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2VillageMasterInstance.java (revision 1118)
  43. +++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2VillageMasterInstance.java (working copy)
  44. @@ -1086,7 +1086,8 @@
  45. availSubs.remove(PlayerClass.values()[availSub.ordinal()]);
  46. }
  47. }
  48. + if(Config.ALL_SUBCLASS)
  49. + {
  50. if (npcRace == PlayerRace.Human || npcRace == PlayerRace.LightElf)
  51. {
  52. // If the master is human or light elf, ensure that fighter-type
  53. // masters only teach fighter classes, and priest-type masters
  54. // only teach priest classes etc.
  55. if (!availSub.isOfType(npcTeachType))
  56. {
  57. availSubs.remove(availSub);
  58. }
  59. else if (!availSub.isOfRace(PlayerRace.Human) && !availSub.isOfRace(PlayerRace.LightElf))
  60. {
  61. availSubs.remove(availSub);
  62. }
  63. }
  64. else
  65. {
  66. // If the master is not human and not light elf,
  67. // then remove any classes not of the same race as the master.
  68. if (npcRace != PlayerRace.Human && npcRace != PlayerRace.LightElf && !availSub.isOfRace(npcRace))
  69. {
  70. availSubs.remove(availSub);
  71. }
  72. }
  73. + }
  74. }
  75. currClass = null;
  76. return availSubs;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement