Configuration for auto learning Forgotten Power skills.
This commit is contained in:
@@ -432,7 +432,7 @@ public final class ClassMaster extends AbstractNpcAI implements IGameXmlReader
|
||||
}
|
||||
if (Config.AUTO_LEARN_SKILLS)
|
||||
{
|
||||
player.giveAvailableSkills(Config.AUTO_LEARN_FS_SKILLS, true);
|
||||
player.giveAvailableSkills(Config.AUTO_LEARN_FS_SKILLS, Config.AUTO_LEARN_FP_SKILLS, true);
|
||||
}
|
||||
player.store(false); // Save player cause if server crashes before this char is saved, he will lose class and the money payed for class change.
|
||||
player.broadcastUserInfo();
|
||||
@@ -456,7 +456,7 @@ public final class ClassMaster extends AbstractNpcAI implements IGameXmlReader
|
||||
}
|
||||
else
|
||||
{
|
||||
player.giveAvailableSkills(true, true);
|
||||
player.giveAvailableSkills(true, true, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -863,7 +863,7 @@ public final class ClassMaster extends AbstractNpcAI implements IGameXmlReader
|
||||
}
|
||||
if (Config.AUTO_LEARN_SKILLS)
|
||||
{
|
||||
player.giveAvailableSkills(Config.AUTO_LEARN_FS_SKILLS, true);
|
||||
player.giveAvailableSkills(Config.AUTO_LEARN_FS_SKILLS, Config.AUTO_LEARN_FP_SKILLS, true);
|
||||
}
|
||||
player.store(false); // Save player cause if server crashes before this char is saved, he will lose class and the money payed for class change.
|
||||
player.broadcastUserInfo();
|
||||
|
||||
@@ -153,11 +153,11 @@ public class AdminSkill implements IAdminCommandHandler
|
||||
}
|
||||
else if (command.equals("admin_give_all_skills"))
|
||||
{
|
||||
adminGiveAllSkills(activeChar, false);
|
||||
adminGiveAllSkills(activeChar, false, false);
|
||||
}
|
||||
else if (command.equals("admin_give_all_skills_fs"))
|
||||
{
|
||||
adminGiveAllSkills(activeChar, true);
|
||||
adminGiveAllSkills(activeChar, true, true);
|
||||
}
|
||||
else if (command.equals("admin_give_clan_skills"))
|
||||
{
|
||||
@@ -275,8 +275,9 @@ public class AdminSkill implements IAdminCommandHandler
|
||||
* This function will give all the skills that the target can learn at his/her level
|
||||
* @param activeChar the active char
|
||||
* @param includedByFs if {@code true} Forgotten Scroll skills will be delivered.
|
||||
* @param includedByFp if {@code true} Forgotten Power skills will be delivered.
|
||||
*/
|
||||
private void adminGiveAllSkills(L2PcInstance activeChar, boolean includedByFs)
|
||||
private void adminGiveAllSkills(L2PcInstance activeChar, boolean includedByFs, boolean includedByFp)
|
||||
{
|
||||
final L2Object target = activeChar.getTarget();
|
||||
if ((target == null) || !target.isPlayer())
|
||||
@@ -286,7 +287,7 @@ public class AdminSkill implements IAdminCommandHandler
|
||||
}
|
||||
final L2PcInstance player = target.getActingPlayer();
|
||||
// Notify player and admin
|
||||
BuilderUtil.sendSysMessage(activeChar, "You gave " + player.giveAvailableSkills(includedByFs, true) + " skills to " + player.getName());
|
||||
BuilderUtil.sendSysMessage(activeChar, "You gave " + player.giveAvailableSkills(includedByFs, includedByFp, true) + " skills to " + player.getName());
|
||||
player.sendSkillList();
|
||||
player.sendPacket(new AcquireSkillList(player));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user