Вы используете устаревший браузер. Этот и другие сайты могут отображаться в нём некорректно. Вам необходимо обновить браузер или попробовать использовать другой.
/**
* Method used by admin commands, Config.AUTO_LEARN_SKILLS or class master.<br>
* Reward the {@link Player} with all available skills, being autoGet or general skills.
*/
public void rewardSkills()
{
// Check if 3rd class skills are auto-learned
if (!Config.AUTO_LEARN_3RD_SKILLS && (getClassId().getLevel() == 3))
{
return;
}
// We reward all skills to the players, but don't store autoGet skills on the database.
for (final GeneralSkillNode skill : getAllAvailableSkills())
addSkill(skill.getSkill()...
Load your project in IntelliJ, since it indexes your entire project, making it easier to search everywhere.
Then, you can either go to EDIT->FIND->FIND IN FILES, or press Ctrl+Shift+F and type in AutoLearnSkills.
In my case, there are 3 hits - 2 in player.properties (which is a txt file in the configs) and 1 in Config.java.
Now, your code has a config that is not present on my source, namely Auto_learn_3rd_skills. This means, that you have to create this manually in the Config.java and also take it out in the player.properties near the line with AutoLearnSkills = True/False. I won't be explaining how to do that for obvious reasons.
Then, you go back to IntelliJ and do a second search for Auto_Learn_Skills. You will have several hits, but you open the first in the Config.java.
There, you can CTRL+CLICK on the AUTO_LEARN_SKILLS, and it will show you all the functions that use it, like so:
As we can notice, two of these are in Player.java. Here, we have two options:
1 - add to these two function our check for whether the 3rd class config is set to TRUE or FALSE and whatever else you might need to add as a check.
2 - (the first one is superior/better in my opinion) Both of the uses in the Player.java use a function called RewardSkills(). As such, we can just add your code within that particular function and be done with it.
Есть беда, после взятие 3 профы удаляются пассивные скиллы(не все)
Кусок кода
Java:
/**
* Method used by admin commands, Config.AUTO_LEARN_SKILLS or class master.<br>
* Reward the {@link Player} with all available skills, being autoGet or general skills.
*/
public void rewardSkills()
{
// Check if 3rd class skills are auto-learned
if (!Config.AUTO_LEARN_3RD_SKILLS && (getClassId().getLevel() == 3))
{
return;
}
// We reward all skills to the players, but don't store autoGet skills on the database.
for (final GeneralSkillNode skill : getAllAvailableSkills())
addSkill(skill.getSkill(), skill.getCost() != 0);
// Remove the Lucky skill if level superior to 10.
if (getStatus().getLevel() >= 10 && hasSkill(L2Skill.SKILL_LUCKY))
removeSkill(L2Skill.SKILL_LUCKY, false);
// Remove invalid skills.
removeInvalidSkills();
sendSkillList();
}
/**
* Method used by admin commands, Config.AUTO_LEARN_SKILLS or class master.<br>
* Reward the {@link Player} with all available skills, being autoGet or general skills.
*/
public void rewardSkills()
{
// Check if 3rd class skills are auto-learned
if (!Config.AUTO_LEARN_3RD_SKILLS && (getClassId().getLevel() == 3))
{
return;
}
// We reward all skills to the players, but don't store autoGet skills on the database.
for (final GeneralSkillNode skill : getAllAvailableSkills())
addSkill(skill.getSkill(), skill.getCost() != 0);
// Remove the Lucky skill if level superior to 10.
if (getStatus().getLevel() >= 10 && hasSkill(L2Skill.SKILL_LUCKY))
removeSkill(L2Skill.SKILL_LUCKY, false);
// Remove invalid skills.
removeInvalidSkills();
sendSkillList();
}
public void rewardSkills()
{
boolean auto = Config.AUTO_LEARN_3RD_SKILLS || (getClassId().getLevel() < 3);
// We reward all skills to the players, but don't store autoGet skills on the database.
for (final GeneralSkillNode skill : auto ? getAllAvailableSkills() : getAvailableAutoGetSkills())
addSkill(skill.getSkill(), (auto && skill.getCost() != 0));
// Remove the Lucky skill if level superior to 10.
if (getStatus().getLevel() >= 10 && hasSkill(L2Skill.SKILL_LUCKY))
removeSkill(L2Skill.SKILL_LUCKY, false);
// Remove invalid skills.
removeInvalidSkills();
sendSkillList();
}
public void rewardSkills()
{
boolean auto = Config.AUTO_LEARN_3RD_SKILLS || (getClassId().getLevel() < 3);
// We reward all skills to the players, but don't store autoGet skills on the database.
for (final GeneralSkillNode skill : auto ? getAllAvailableSkills() : getAvailableAutoGetSkills())
addSkill(skill.getSkill(), (auto && skill.getCost() != 0));
// Remove the Lucky skill if level superior to 10.
if (getStatus().getLevel() >= 10 && hasSkill(L2Skill.SKILL_LUCKY))
removeSkill(L2Skill.SKILL_LUCKY, false);
// Remove invalid skills.
removeInvalidSkills();
sendSkillList();
}
На данном сайте используются файлы cookie, чтобы персонализировать содержимое и сохранить Ваш вход в систему, если Вы зарегистрируетесь.
Продолжая использовать этот сайт, Вы соглашаетесь на использование наших файлов cookie.