[Help] With SubClass Stack Only Active Skills

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
joelf
Posts: 53
Joined: Tue Nov 03, 2009 3:13 am

[Help] With SubClass Stack Only Active Skills

Post by joelf »

If you want to receive support we need this info to help you properly.
» 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"));     
Sorry if this post is in wrong place
L2jServer Rulez!
joelf
Posts: 53
Joined: Tue Nov 03, 2009 3:13 am

Re: [Help] With SubClass Stack Only Active Skills

Post by joelf »

any can help plz? is very important for my
L2jServer Rulez!
Marianowo
Posts: 12
Joined: Fri Sep 11, 2009 9:36 pm

Re: [Help] With SubClass Stack Only Active Skills

Post by Marianowo »

Have you already put cumulative subclasses?
I want to startup my own server but I don't know how can I do it.
Thanks
joelf
Posts: 53
Joined: Tue Nov 03, 2009 3:13 am

Re: [Help] With SubClass Stack Only Active Skills

Post by joelf »

yes the patch is in the first post.

any can help me with no stack passive?
L2jServer Rulez!
alehawk
Posts: 50
Joined: Wed Mar 24, 2010 10:42 pm

Re: [Help] With SubClass Stack Only Active Skills

Post by alehawk »

L2_GameServer/java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java

I dont have that file, where do I get it?
Tnx
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: [Help] With SubClass Stack Only Active Skills

Post by janiii »

alehawk wrote:L2_GameServer/java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java

I dont have that file, where do I get it?
Tnx
check Option 3 at:
http://www.l2jserver.com/download/

or check wiki:
http://www.l2jserver.com/wiki/Setup_Eclipse_and_SVN
http://www.l2jserver.com/wiki/Setup_Server
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
User avatar
Bebop
Posts: 25
Joined: Mon Feb 21, 2011 11:27 pm

Re: [Help] With SubClass Stack Only Active Skills

Post by Bebop »

hey thanks for the code it works! but do you know how to restrict forgotten skills so they don't accumulate? i want the characters to have only forgoten skills of their respective classes :roll:
Post Reply