» Find Revision
L2J Revision Number: 4004
L2JDP Revision Number:
hello, first sorry for my bad English.
I need help with gracia epilogue, I know compile ... but dont know nothing about programming in java and I need to do this:
"I need to make subclass accumulative but only the active skills, passive not want to accumulate, need have only passive of the current class, and all active skills".
This is my own patch but accumulate active and passive skills:
Code: Select all
Index: C:/workspace/x7 L2_GameServer/java/config/Character.properties===================================================================--- C:/workspace/x7 L2_GameServer/java/config/Character.properties (revision 4004)+++ C:/workspace/x7 L2_GameServer/java/config/Character.properties (working copy)@@ -133,6 +133,10 @@ # Deault: False SubclassStoreSkillCooltime = False +# If true, previous skills will not be removed when you change your subclass.+# default = false+AltSubClassSkills = False+ # These are alternative rules for shields. # If True and they block: # The damage is powerAtk-shieldDef, Index: C:/workspace/x7 L2_GameServer/java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java===================================================================--- C:/workspace/x7 L2_GameServer/java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (revision 4004)+++ C:/workspace/x7 L2_GameServer/java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (working copy)@@ -257,6 +257,7 @@ public final class L2PcInstance extends L2Playable { // Character Skill SQL String Definitions:+ private static final String ACUMULATE_SKILLS_FOR_CHAR_SUB = "SELECT skill_id,skill_level FROM character_skills WHERE charId=? ORDER BY skill_id , skill_level ASC"; private static final String RESTORE_SKILLS_FOR_CHAR = "SELECT skill_id,skill_level FROM character_skills WHERE charId=? AND class_index=?"; private static final String ADD_NEW_SKILL = "INSERT INTO character_skills (charId,skill_id,skill_level,class_index) VALUES (?,?,?,?)"; private static final String UPDATE_CHARACTER_SKILL_LEVEL = "UPDATE character_skills SET skill_level=? WHERE skill_id=? AND charId=? AND class_index=?";@@ -8104,15 +8105,18 @@ { Connection con = null; - try- {- // Retrieve all skills of this L2PcInstance from the database- con = L2DatabaseFactory.getInstance().getConnection();- PreparedStatement statement = con.prepareStatement(RESTORE_SKILLS_FOR_CHAR);- - statement.setInt(1, getObjectId());- statement.setInt(2, getClassIndex());- ResultSet rset = statement.executeQuery();+ try+ {+ boolean isAcumulative = Config.ACUMULATIVE_SUBCLASS_SKILLS;+ + // Retrieve all skills of this L2PcInstance from the database+ con = L2DatabaseFactory.getInstance().getConnection();+ PreparedStatement statement = con.prepareStatement(isAcumulative ? ACUMULATE_SKILLS_FOR_CHAR_SUB : RESTORE_SKILLS_FOR_CHAR);+ + statement.setInt(1, getObjectId());+ if (!isAcumulative)+ statement.setInt(2, getClassIndex());+ ResultSet rset = statement.executeQuery(); // Go though the recordset of this SQL query while (rset.next()) Index: C:/workspace/x7 L2_GameServer/java/com/l2jserver/Config.java===================================================================--- C:/workspace/x7 L2_GameServer/java/com/l2jserver/Config.java (revision 4004)+++ C:/workspace/x7 L2_GameServer/java/com/l2jserver/Config.java (working copy)@@ -103,6 +103,7 @@ public static int PLAYER_FAKEDEATH_UP_PROTECTION; public static boolean STORE_SKILL_COOLTIME; public static boolean SUBCLASS_STORE_SKILL_COOLTIME;+ public static boolean ACUMULATIVE_SUBCLASS_SKILLS; public static boolean ALT_GAME_SHIELD_BLOCKS; public static int ALT_PERFECT_SHLD_BLOCK; public static boolean ALLOW_CLASS_MASTERS; @@ -1330,6 +1360,7 @@ PLAYER_FAKEDEATH_UP_PROTECTION = Integer.parseInt(Character.getProperty("PlayerFakeDeathUpProtection", "0")); STORE_SKILL_COOLTIME = Boolean.parseBoolean(Character.getProperty("StoreSkillCooltime", "true")); SUBCLASS_STORE_SKILL_COOLTIME = Boolean.parseBoolean(Character.getProperty("SubclassStoreSkillCooltime", "false"));+ ACUMULATIVE_SUBCLASS_SKILLS = Boolean.parseBoolean(Character.getProperty("AltSubClassSkills", "False")); ALT_GAME_SHIELD_BLOCKS = Boolean.parseBoolean(Character.getProperty("AltShieldBlocks", "false")); ALT_PERFECT_SHLD_BLOCK = Integer.parseInt(Character.getProperty("AltPerfectShieldBlockRate", "10")); ALLOW_CLASS_MASTERS = Boolean.parseBoolean(Character.getProperty("AllowClassMasters", "False"));