Secret Experience

Secret Experience (https://secretexperience.net/index.php)
-   [Lineage] Java Mods (https://secretexperience.net/forumdisplay.php?f=636)
-   -   [Outros] Obtendo Mais Que 3 Subclasses (https://secretexperience.net/showthread.php?t=34249)

Setokaiba 03-10-2013 03:43 PM

Obtendo Mais Que 3 Subclasses
 
Descrição: Isso permite que o personagem obtenha mais que 3 subclasses (limite padrão).
Isso é bastante útil, poupa a criação de inúmeros personagens.

Altere o número de subclasses que você deseja, antes de aplicar o patch.

Código:

Index: config/other.properties
===================================================================
--- config/other.properties (revision 1283)
+++ config/other.properties (working copy)
@@ -167,3 +167,8 @@
# Death Penalty chance if killed by mob (%)
#------------------------------------------
DeathPenaltyChance = 20
+
+#-----------------------------------------
+#Maximum number of subclass
+#-----------------------------------------
+MaxSubClass = 3
\ No newline at end of file
Index: net/sf/l2j/Config.java
===================================================================
--- net/sf/l2j/Config.java (revision 1283)
+++ net/sf/l2j/Config.java (working copy)
@@ -971,6 +971,9 @@
    /** Death Penalty chance */
    public static int  DEATH_PENALTY_CHANCE;

+ /** Max SubClass Number */
+ public static int  MAX_SUB;
+
    /** Player Protection control */
    public static int  PLAYER_SPAWN_PROTECTION;
    public static int  PLAYER_FAKEDEATH_UP_PROTECTION;
@@ -1552,6 +1555,7 @@
                JAIL_DISABLE_CHAT = Boolean.valueOf(otherSettings.getProperty("JailDisableChat", "True"));
             
                DEATH_PENALTY_CHANCE = Integer.parseInt(otherSettings.getProperty("DeathPenaltyChance", "20"));
+ MAX_SUB = Integer.parseInt(otherSettings.getProperty("MaxSubClass", "3"));
            }
            catch (Exception e)
            {
Index: net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 1283)
+++ net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (working copy)
@@ -8292,7 +8292,7 @@
      */
    public boolean addSubClass(int classId, int classIndex)
    {
-    if (getTotalSubClasses() == 3 || classIndex == 0)
+    if (getTotalSubClasses() == Config.MAX_SUB || classIndex == 0)
    return false;

    if (getSubClasses().containsKey(classIndex))

Index: net/sf/l2j/gameserver/model/actor/instance/L2VillageMasterInstance.java
===================================================================
--- net/sf/l2j/gameserver/model/actor/instance/L2VillageMasterInstance.java (revision 1283)
+++ net/sf/l2j/gameserver/model/actor/instance/L2VillageMasterInstance.java (working copy)
@@ -197,7 +197,7 @@
            {
                case 1: // Add Subclass - Initial
                    // Avoid giving player an option to add a new sub class, if they have three already.
-                    if (player.getTotalSubClasses() == 3)
+                    if (player.getTotalSubClasses() == Config.MAX_SUB)
                    {
                        player.sendMessage("You can now only change one of your current sub classes.");
                        return;



Horários baseados na GMT -3. Agora são 12:52 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.