resticion help of subclass code

    Share

    lordeze

    Posts : 97
    Join date : 2013-05-07

    resticion help of subclass code

    Post  lordeze on 9th August 2013, 10:03

    helps to adapt this code please and revises part but the rest do not know how thanks:


    ****This is the modified code to a part****

    Code:
    index: com/l2jfrozen/Config.java===================================================================
    --- com/l2jfrozen/Config.java  (revision 986)
    +++ com/l2jfrozen/Config.java (working copy)
    @@ -1028,5 +1030,5 @@

        public static boolean ALT_GAME_SUBCLASS_WITHOUT_QUESTS;
    +  public static boolean ALT_GAME_SUBCLASS_ALL_CLASSES;
     
    @@ -1198,13 +1200,13 @@

                    ALT_GAME_SUBCLASS_WITHOUT_QUESTS = Boolean.parseBoolean(altSettings.getProperty("AltSubClassWithoutQuests", "False"));;
    +              ALT_GAME_SUBCLASS_ALL_CLASSES    = Boolean.parseBoolean(altsettings.getProperty("AltSubclassAllClasses", "False"));
                   
    @@ -5210,9 +5220,9 @@


          else if (pName.equalsIgnoreCase("AltSubClassWithoutQuests")) ALT_GAME_SUBCLASS_WITHOUT_QUESTS = Boolean.valueOf(pValue);
    +      else if(pName.equalsIgnoreCase("AltSubclassAllClasses")) ALT_GAME_SUBCLASS_ALL_CLASSES = Boolean.valueOf(pValue);
         

    -----------------------------------------------     
    ********up here is what changed********
    -----------------------------------------------


          Index: java/com/l2jserver/gameserver/model/base/PlayerClass.java
    ===================================================================
    --- com.l2jfrozen/gameserver/model/base/PlayerClass.java  (revision 986)
    +++com.l2jfrozen/gameserver/model/base/PlayerClass.java  (working copy)
    @@ -43,6 +43,7 @@
     import java.util.Set;
     
     import static com.l2jfrozen.gameserver.model.base.PlayerRace.Orc;
    +import com.l2jfrozen.Config;
     
     
     /**
    @@ -250,7 +250,13 @@
     
    -      if (_level == Third)
    -    {
    +if (Config.ALT_GAME_SUBCLASS_ALL_CLASSES)
    +            {
    +            subclasses = EnumSet.copyOf(mainSubclassSet);
    +            subclasses.addAll(neverSubclassed);
    +            subclasses.remove(this);
    +            }
    +            else if(_level == Third)
              {
                subclasses = EnumSet.copyOf(mainSubclassSet);
     
    Index: java/config/Character.properties
    ===================================================================
    --- config/head/alsettings.properties  (revision 4211)
    +++config/head/alsettings.properties  (working copy)
    @@ -136,1 +140,1 @@
     # Default: False
     AltSubClassWithoutQuests = False
     
    +# Allow player to take any sub-class without any restriction.
    +# Including Warsmith and Overlord.
    +# Default: False
    +AltSubclassAllClasses = False
    +
     # Allow player to add/change subclass at all village master
     # Default: False
     AltSubclassEverywhere = False
    ****this is the original code****
    Code:
    ndex: com/l2jfrozen/Config.java===================================================================
    --- com/l2jfrozen/Config.java  (revision 986)
    +++ com/l2jfrozen/Config.java (working copy)
    @@ -1028,5 +1030,5 @@
        public static boolean DIVINE_SP_BOOK_NEEDED;
        public static boolean ALT_GAME_SKILL_LEARN;
        public static boolean ALT_GAME_SUBCLASS_WITHOUT_QUESTS;
    +  public static boolean ALT_GAME_SUBCLASS_ALL_CLASSES;
        public static boolean ALT_GAME_SUBCLASS_EVERYWHERE;
        public static int MAX_RUN_SPEED;
        public static int MAX_PCRIT_RATE;
    @@ -1198,13 +1200,13 @@
                    DIVINE_SP_BOOK_NEEDED = Boolean.parseBoolean(Character.getProperty("DivineInspirationSpBookNeeded", "true"));
                    ALT_GAME_SKILL_LEARN = Boolean.parseBoolean(Character.getProperty("AltGameSkillLearn", "false"));
                    ALT_GAME_SUBCLASS_WITHOUT_QUESTS = Boolean.parseBoolean(Character.getProperty("AltSubClassWithoutQuests", "False"));
    +              ALT_GAME_SUBCLASS_ALL_CLASSES = Boolean.parseBoolean(Character.getProperty("AltSubclassAllClasses", "False"));
                    ALT_GAME_SUBCLASS_EVERYWHERE = Boolean.parseBoolean(Character.getProperty("AltSubclassEverywhere", "False"));
                    ENABLE_VITALITY = Boolean.parseBoolean(Character.getProperty("EnableVitality", "True"));
                    RECOVER_VITALITY_ON_RECONNECT = Boolean.parseBoolean(Character.getProperty("RecoverVitalityOnReconnect", "True"));
    @@ -5210,9 +5220,9 @@

    else if(pName.equalsIgnoreCase("AltFreeTeleporting"))
          {
            ALT_GAME_FREE_TELEPORT = Boolean.valueOf(pValue);
          }
          else if(pName.equalsIgnoreCase("AltSubClassWithoutQuests"))
          {
            ALT_GAME_SUBCLASS_WITHOUT_QUESTS = Boolean.valueOf(pValue);
          }
    +      else if(pName.equalsIgnoreCase("AltSubclassAllClasses"))
    +      {
    +        ALT_GAME_SUBCLASS_ALL_CLASSES = Boolean.valueOf(pValue);
    +      }
          else if(pName.equalsIgnoreCase("AltRestoreEffectOnSub"))
          {
            ALT_RESTORE_EFFECTS_ON_SUBCLASS_CHANGE = Boolean.valueOf(pValue);
          }
         

          Index: java/com/l2jserver/gameserver/model/base/PlayerClass.java
    ===================================================================
    --- com.l2jfrozen/gameserver/model/base/PlayerClass.java  (revision 986)
    +++com.l2jfrozen/gameserver/model/base/PlayerClass.java  (working copy)
    @@ -43,6 +43,7 @@
     import java.util.Set;
     
     import static com.l2jfrozen.gameserver.model.base.PlayerRace.Orc;
    +import com.l2jfrozen.Config;
     
     
     /**
    @@ -250,7 +250,13 @@
     
    -      if (_level == Third)
    -    {
    +if (Config.ALT_GAME_SUBCLASS_ALL_CLASSES)
    +            {
    +            subclasses = EnumSet.copyOf(mainSubclassSet);
    +            subclasses.addAll(neverSubclassed);
    +            subclasses.remove(this);
    +            }
    +            else if(_level == Third)
              {
                subclasses = EnumSet.copyOf(mainSubclassSet);
     
    Index: java/config/Character.properties
    ===================================================================
    --- config/head/alsettings.properties  (revision 4211)
    +++config/head/alsettings.properties  (working copy)
    @@ -136,1 +140,1 @@
     # Default: False
     AltSubClassWithoutQuests = False
     
    +# Allow player to take any sub-class without any restriction.
    +# Including Warsmith and Overlord.
    +# Default: False
    +AltSubclassAllClasses = False
    +
     # Allow player to add/change subclass at all village master
     # Default: False
     AltSubclassEverywhere = False

      Current date/time is 24th July 2017, 09:35