L2JMobius

C6 a problem with the stacksub system

Reanimation · 4 · 2163

Online Reanimation

  • Knight
  • ***
    • Posts: 62
Hi everyone. I don't know if this is a bug or just a problem, or that I'm just making something wrong.

Quote
I'm using the free version of l2jmobius-c6-interlude - latest version 2021-08-12.

Activate the stacksub option found
Quote
game / config / custom / other.ini

on the lines:
Code: [Select]
# When True, this will allow a person who changes subclasses to keep the skills of the previous class.
# When False, this will remove all skills of the previous subclass and only award skills of the current class.
# Retail: False
KeepSubClassSkills = True

What is happening to me is that when I go to an npc master to do the sub classes, the character with access level of gm or admin the skills of the previous subclass keep the skills. On the other hand, if the character does not have acclvl of any rank, she is only a common and normal character like any other when he makes the subclass, he does not maintain the skills of the previous class.

I thought it was something to only relogue the pj, change back to the previous class, I even restarted the server, even reinstalled the entire database, I was in turn checking if it was not the Flood Protect
Quote
/ game / config / protected / Flood.ini
Code: [Select]
# Subclass - subclass flooding
So far I have not been able to understand the problem or even a solution, if someone is so kind to guide me, give me help, advice or whatever, I would be very grateful.


Offline pipipopo

  • Knight
  • ***
    • Posts: 80
Have you tried searching for "KeepSubClassSkills" in Eclipse?

I don't have any experience with interlude however check this out in PlayerInstance.java
Code: [Select]
// Check player skills
if (Config.CHECK_SKILLS_ON_ENTER && !Config.ALT_GAME_SKILL_LEARN)
{
     checkAllowedSkills();
}

And also checkAllowedSkills function. Most likely it automatically removes skills that class isn't supposed to have unless character is gm. Simply comment out checkAllowedSkills(); by adding // in front, compile and test again. Don't forget to save and replace your config/edited files beforehand though.


Online Reanimation

  • Knight
  • ***
    • Posts: 62
looking for KeepSubClassSkills, I managed to find this:

Code: [Select]
public synchronized void restoreSkills()
{
try (Connection con = DatabaseFactory.getConnection())
{
if (!Config.KEEP_SUBCLASS_SKILLS)
{
final PreparedStatement statement = con.prepareStatement(RESTORE_SKILLS_FOR_CHAR);
statement.setInt(1, getObjectId());
statement.setInt(2, getClassIndex());
final ResultSet rset = statement.executeQuery();

// Go though the recordset of this SQL query
while (rset.next())
{
final int id = rset.getInt("skill_id");
final int level = rset.getInt("skill_level");
if (id > 9000)
{
continue; // fake skills for base stats
}

// Create a Skill object for each record
final Skill skill = SkillTable.getInstance().getSkill(id, level);

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

rset.close();
statement.close();
}
else
{
final PreparedStatement statement = con.prepareStatement(RESTORE_SKILLS_FOR_CHAR_ALT_SUBCLASS);
statement.setInt(1, getObjectId());
final ResultSet rset = statement.executeQuery();

// Go though the recordset of this SQL query
while (rset.next())
{
final int id = rset.getInt("skill_id");
final int level = rset.getInt("skill_level");
if (id > 9000)
{
continue; // fake skills for base stats
}

// Create a Skill object for each record
final Skill skill = SkillTable.getInstance().getSkill(id, level);

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

rset.close();
statement.close();
}
}
catch (Exception e)
{
LOGGER.warning("Could not restore character skills: " + e);
}
}



Offline l2retro

  • Heir
  • **
    • Posts: 10
Just go into  game\config\protected\Other.ini and set CheckSkillsOnEnter = False