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

    • Dear partners! At the moment we are in great need of the following positions: — Snapchat old and new accounts | With snapscores | Geo: Europe/USA | Full access via email/phone number — Reddit old (brute or hacked origin, self-registered) accounts with post and comment karma from 100 to 100,000+ | Full email access included — LinkedIn old accounts with real connections | Geo: Europe/USA | Full email access + active 2FA password — Instagram old accounts (2010–2023) | Full email access (possibly with active 2FA password) — Facebook old accounts (2010–2023) | Full email access (possibly with active 2FA password) | With friends or without friends | Geo: Europe/USA/Asia — Threads accounts | Full email access (possibly with active 2FA password) — TikTok/Facebook/Google ADS Agency advertising accounts — Email accounts: mail.ru, yahoo.com, gazeta.pl, gmx.ch / gmx.de / gmx.net (BUT NOT gmx.com) — Google ADS Manual Farm accounts (verified via email and phone number) | GEO: USA/Europe, mostly USA. — WhatsApp OLD Accounts — Twitter accounts with followers and posts (old accounts) Contact us via the details below. We will be glad to cooperate! We are also ready to consider other partnership and collaboration options. Active links to our projects: Digital goods store (Website): Go to Store Telegram bot: Go to – convenient access to the store via the Telegram messenger. Virtual numbers service: Go to Telegram bot for purchasing Telegram Stars: Go to – fast and profitable purchase of Stars in Telegram. SMM Panel: Go to – promotion of your social media accounts. Contacts and support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Dear partners! At the moment we are in great need of the following positions: — Snapchat old and new accounts | With snapscores | Geo: Europe/USA | Full access via email/phone number — Reddit old (brute or hacked origin, self-registered) accounts with post and comment karma from 100 to 100,000+ | Full email access included — LinkedIn old accounts with real connections | Geo: Europe/USA | Full email access + active 2FA password — Instagram old accounts (2010–2023) | Full email access (possibly with active 2FA password) — Facebook old accounts (2010–2023) | Full email access (possibly with active 2FA password) | With friends or without friends | Geo: Europe/USA/Asia — Threads accounts | Full email access (possibly with active 2FA password) — TikTok/Facebook/Google ADS Agency advertising accounts — Email accounts: mail.ru, yahoo.com, gazeta.pl, gmx.ch / gmx.de / gmx.net (BUT NOT gmx.com) — Google ADS Manual Farm accounts (verified via email and phone number) | GEO: USA/Europe, mostly USA. — WhatsApp OLD Accounts — Twitter accounts with followers and posts (old accounts) Contact us via the details below. We will be glad to cooperate! We are also ready to consider other partnership and collaboration options. Active links to our projects: Digital goods store (Website): Go to Store Telegram bot: Go to – convenient access to the store via the Telegram messenger. Virtual numbers service: Go to Telegram bot for purchasing Telegram Stars: Go to – fast and profitable purchase of Stars in Telegram. SMM Panel: Go to – promotion of your social media accounts. Contacts and support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • 冬天是享受优惠、省钱的好时机。 首次下单时使用促销码 SOCNET 即可获得 15% 折扣 ,适用于全场商品! 前往商店(网站) 前往商店(Telegram 机器人)
    • Winter is the time to save with benefits. Activate the promo code SOCNET on your first order and get a 15% discount on the entire assortment! Go to the store (website) Go to the store (Telegram bot)
    • Winter is the time to save with benefits. Activate the promo code SOCNET on your first order and get a 15% discount on the entire assortment! Go to the store (website) Go to the store (Telegram bot)
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock