Jump to content
  • 0

[HELP] Subclass stack


Question

Posted

hi there guys I manage to add this to my server but want to change the subclass... When you do subclass it will only stack the active skill not the passive skill.... I know you'll edit somewhere in the code.. Please help..

 

=========================================

 

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();

 

============================================================

 

 

maybe you have some idea where to edit to make the stack subclass work only for active skill not the passive skill... THANKS GUYS

8 answers to this question

Recommended Posts

  • 0
Posted

change

+ 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";

to

+ private static final String ACUMULATE_SKILLS_FOR_CHAR_SUB = "SELECT skill_id,skill_level,class_index FROM character_skills WHERE charId=? ORDER BY class_index ,skill_id , skill_level ASC";

and

		while (rset.next())
		{
			int id = rset.getInt("skill_id");
			int level = rset.getInt("skill_level");

			if (id > 9000 && id < 9007)
				continue; // fake skills for base stats

			// Create a L2Skill object for each record
			L2Skill skill = SkillTable.getInstance().getInfo(id, level);

			// Add the L2Skill object to the L2Character _skills and its Func objects to the calculator set of the L2Character
			super.addSkill(skill);
		}

to

		while (rset.next())
		{
			int id = rset.getInt("skill_id");
			int level = rset.getInt("skill_level");
                                int classindex = rset.getInt("class_index");

			if (id > 9000 && id < 9007)
				continue; // fake skills for base stats

			// Create a L2Skill object for each record
			L2Skill skill = SkillTable.getInstance().getInfo(id, level);

                                //check if it is passive and now of our class
                                if (skill.isPassive() && classindex != getClassIndex() )
                                          continue;

			// Add the L2Skill object to the L2Character _skills and its Func objects to the calculator set of the L2Character
			super.addSkill(skill);
		}

 

im not completely sure of this (ACUMULATE_SKILLS_FOR_CHAR_SUB most of all) but maybe it will work :)

  • 0
Posted

take this it works

 

Index: /Server/SkyLanceR's_IL_GS/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- /Server/SkyLanceR's_IL_GS/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 345)
+++ /Server/SkyLanceR's_IL_GS/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 346)
@@ -8425,4 +8425,6 @@
     public boolean addSubClass(int classId, int classIndex)
     {
     	if (getTotalSubClasses() == 3 || classIndex == 0)
     		return false;
@@ -8430,4 +8432,8 @@
     	if (getSubClasses().containsKey(classIndex))
     		return false;
+    	
+    	startAbnormalEffect(L2Character.ABNORMAL_EFFECT_HOLD_1);
+    	setIsParalyzed(true);
+    	sendMessage("You are paralized untill your subclass load.");

     	// Note: Never change _classIndex in any method other than setActiveClass().
@@ -8492,4 +8498,8 @@
         if (Config.DEBUG)
             _log.info(getName() + " was given " + getAllSkills().length + " skills for their new sub class.");
+        
+        setIsParalyzed(false);
+        stopAbnormalEffect(L2Character.ABNORMAL_EFFECT_HOLD_1);
+        sendMessage("You are unparalized.");

         return true;

 

freezes players when changing sub in order to prevent stuck

  • 0
Posted

maybe you have some idea where to edit to make the stack subclass work only for active skill not the passive skill

 

freezes players when changing sub in order to prevent stuck

 

Guest
This topic is now closed to further replies.


  • Posts

    • Hello friends, good morning, good afternoon or good evening, depending on the time you are seeing this! I have been trying to decompile and compile again with only the classes that I want LineageEffect.u for a few days now, but I have not been successful. Could someone help me by clearing up some doubts about how I can do this work and be successful?!
    • **INTERLUDE REMASTERED** Moonland is a server that's been running for about three years without wipe, and they don't plan on wiping it anytime soon. I'm selling my items or even the account due to not having much time to play anymore. I'm selling only for $$$. Not going to disclose my nickname in the server, but here are some of the items: Lvl 5 equipment for both mage and fighter +100 mage pvp set 2mastery jewels for fighter, 2 for mage, blessed antharas, blessed queen ant, ring of fallen angel, earring of fafurion. 1k + col, VIP cosmetics for armor, agathion and weapons(duals + mage wep)   I'm only selling for real money via paypal or cs2 skins so don't offer me anything else.
    • ➡ Discount for your purchase: MAY2025 (10% discount) ➡ Our Online Shop: https://socnet.store  ➡ Our SMM-Boosting Panel: https://socnet.pro  ➡ Telegram Shop Bot: https://socnet.shop  ➡ Telegram Support: https://t.me/solomon_bog  ➡ Telegram Channel: https://t.me/accsforyou_shop  ➡ Discord Support: @AllSocialNetworksShop  ➡ Discord Server: https://discord.gg/y9AStFFsrh  ➡ WhatsApp Support: https://wa.me/79051904467 ➡ WhatsApp Channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n  ➡ Email Support: solomonbog@socnet.store 
    • ➡ Discount for your purchase: MAY2025 (10% discount) ➡ Our Online Shop: https://socnet.store  ➡ Our SMM-Boosting Panel: https://socnet.pro  ➡ Telegram Shop Bot: https://socnet.shop  ➡ Telegram Support: https://t.me/solomon_bog  ➡ Telegram Channel: https://t.me/accsforyou_shop  ➡ Discord Support: @AllSocialNetworksShop  ➡ Discord Server: https://discord.gg/y9AStFFsrh  ➡ WhatsApp Support: https://wa.me/79051904467 ➡ WhatsApp Channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n  ➡ Email Support: solomonbog@socnet.store 
  • Topics

×
×
  • Create New...