Fixed skill learn after class change.
Thanks Sdw for the pointers.
This commit is contained in:
@@ -155,14 +155,6 @@ EnchantSkillSpBookNeeded = True
|
||||
# Default: True
|
||||
DivineInspirationSpBookNeeded = True
|
||||
|
||||
# When enabled, the following will be true:
|
||||
# All classes can learn all skills.
|
||||
# Skills of another class costs x2 SP to learn.
|
||||
# Skills of another race costs x2 SP to learn.
|
||||
# Skills of fighters/mages costs x3 SP to learn.
|
||||
# Default: False
|
||||
AltGameSkillLearn = False
|
||||
|
||||
# Allow player to sub-class without checking for unique quest items.
|
||||
# Default: False
|
||||
AltSubClassWithoutQuests = False
|
||||
|
@@ -32,9 +32,12 @@ import com.l2jmobius.commons.util.IGameXmlReader;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.CategoryData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.ClassListData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SkillTreesData;
|
||||
import com.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import com.l2jmobius.gameserver.enums.CategoryType;
|
||||
import com.l2jmobius.gameserver.enums.Race;
|
||||
import com.l2jmobius.gameserver.model.L2SkillLearn;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.base.ClassId;
|
||||
@@ -49,7 +52,6 @@ import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerPress
|
||||
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerProfessionChange;
|
||||
import com.l2jmobius.gameserver.model.holders.ItemChanceHolder;
|
||||
import com.l2jmobius.gameserver.model.spawns.SpawnTemplate;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.AcquireSkillList;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.PlaySound;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.TutorialCloseHtml;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.TutorialShowQuestionMark;
|
||||
@@ -409,10 +411,18 @@ public final class ClassMaster extends AbstractNpcAI implements IGameXmlReader
|
||||
{
|
||||
player.setBaseClass(player.getActiveClass());
|
||||
}
|
||||
player.sendPacket(new PlaySound("ItemSound.quest_fanfare_2"));
|
||||
player.broadcastUserInfo();
|
||||
player.sendPacket(new AcquireSkillList(player));
|
||||
if (player.isInCategory(CategoryType.AWAKEN_GROUP))
|
||||
{
|
||||
SkillTreesData.getInstance().cleanSkillUponAwakening(player);
|
||||
for (L2SkillLearn skill : SkillTreesData.getInstance().getRaceSkillTree(player.getRace()))
|
||||
{
|
||||
player.addSkill(SkillData.getInstance().getSkill(skill.getSkillId(), skill.getSkillLevel()), 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();
|
||||
player.sendSkillList();
|
||||
player.sendPacket(new PlaySound("ItemSound.quest_fanfare_2"));
|
||||
return "test_server_helper021.html";
|
||||
}
|
||||
break;
|
||||
@@ -779,7 +789,7 @@ public final class ClassMaster extends AbstractNpcAI implements IGameXmlReader
|
||||
{
|
||||
player.setBaseClass(player.getActiveClass());
|
||||
}
|
||||
player.sendPacket(new AcquireSkillList(player));
|
||||
player.sendSkillList();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@@ -32,12 +32,14 @@ import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.CharNameTable;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.ClassListData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SkillTreesData;
|
||||
import com.l2jmobius.gameserver.enums.CategoryType;
|
||||
import com.l2jmobius.gameserver.enums.Race;
|
||||
import com.l2jmobius.gameserver.enums.SubclassInfoType;
|
||||
import com.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.L2SkillLearn;
|
||||
import com.l2jmobius.gameserver.model.L2World;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Playable;
|
||||
@@ -50,7 +52,6 @@ import com.l2jmobius.gameserver.model.html.PageResult;
|
||||
import com.l2jmobius.gameserver.model.stats.Stats;
|
||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import com.l2jmobius.gameserver.network.client.L2GameClient;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.AcquireSkillList;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExSubjobInfo;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExUserInfoInvenWeight;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExVoteSystemInfo;
|
||||
@@ -411,16 +412,20 @@ public class AdminEditChar implements IAdminCommandHandler
|
||||
}
|
||||
|
||||
final String newclass = ClassListData.getInstance().getClass(player.getClassId()).getClassName();
|
||||
player.storeMe();
|
||||
player.sendMessage("A GM changed your class to " + newclass + ".");
|
||||
player.broadcastUserInfo();
|
||||
if (player.isInCategory(CategoryType.AWAKEN_GROUP))
|
||||
{
|
||||
SkillTreesData.getInstance().cleanSkillUponAwakening(player);
|
||||
for (L2SkillLearn skill : SkillTreesData.getInstance().getRaceSkillTree(player.getRace()))
|
||||
{
|
||||
player.addSkill(SkillData.getInstance().getSkill(skill.getSkillId(), skill.getSkillLevel()), true);
|
||||
}
|
||||
}
|
||||
player.store(false);
|
||||
player.broadcastUserInfo();
|
||||
player.sendSkillList();
|
||||
player.sendPacket(new ExSubjobInfo(player, SubclassInfoType.CLASS_CHANGED));
|
||||
player.sendPacket(new ExUserInfoInvenWeight(player));
|
||||
player.sendPacket(new AcquireSkillList(player));
|
||||
player.sendMessage("A GM changed your class to " + newclass + ".");
|
||||
activeChar.sendMessage(player.getName() + " is a " + newclass + ".");
|
||||
}
|
||||
else
|
||||
|
@@ -16,19 +16,11 @@
|
||||
*/
|
||||
package handlers.bypasshandlers;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SkillTreesData;
|
||||
import com.l2jmobius.gameserver.handler.IBypassHandler;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.base.ClassId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
|
||||
public class SkillList implements IBypassHandler
|
||||
{
|
||||
@@ -44,88 +36,7 @@ public class SkillList implements IBypassHandler
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Config.ALT_GAME_SKILL_LEARN)
|
||||
{
|
||||
try
|
||||
{
|
||||
final String id = command.substring(9).trim();
|
||||
if (id.length() != 0)
|
||||
{
|
||||
L2NpcInstance.showSkillList(activeChar, (L2Npc) target, ClassId.getClassId(Integer.parseInt(id)));
|
||||
}
|
||||
else
|
||||
{
|
||||
boolean own_class = false;
|
||||
|
||||
final List<ClassId> classesToTeach = ((L2NpcInstance) target).getClassesToTeach();
|
||||
for (ClassId cid : classesToTeach)
|
||||
{
|
||||
if (cid.equalsOrChildOf(activeChar.getClassId()))
|
||||
{
|
||||
own_class = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
String text = "<html><body><center>Skill learning:</center><br>";
|
||||
|
||||
if (!own_class)
|
||||
{
|
||||
final String charType = activeChar.getClassId().isMage() ? "fighter" : "mage";
|
||||
text += "Skills of your class are the easiest to learn.<br>Skills of another class of your race are a little harder.<br>Skills for classes of another race are extremely difficult.<br>But the hardest of all to learn are the " + charType + "skills!<br>";
|
||||
}
|
||||
|
||||
// make a list of classes
|
||||
if (!classesToTeach.isEmpty())
|
||||
{
|
||||
int count = 0;
|
||||
ClassId classCheck = activeChar.getClassId();
|
||||
|
||||
while ((count == 0) && (classCheck != null))
|
||||
{
|
||||
for (ClassId cid : classesToTeach)
|
||||
{
|
||||
if (cid.level() > classCheck.level())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (SkillTreesData.getInstance().getAvailableSkills(activeChar, cid, false, false).isEmpty())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
text += "<a action=\"bypass -h npc_%objectId%_SkillList " + cid.getId() + "\">Learn " + cid + "'s class Skills</a><br>\n";
|
||||
count++;
|
||||
}
|
||||
classCheck = classCheck.getParent();
|
||||
}
|
||||
classCheck = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
text += "No Skills.<br>";
|
||||
}
|
||||
text += "</body></html>";
|
||||
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(target.getObjectId());
|
||||
html.setHtml(text);
|
||||
html.replace("%objectId%", String.valueOf(target.getObjectId()));
|
||||
activeChar.sendPacket(html);
|
||||
|
||||
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_log.log(Level.WARNING, "Exception in " + getClass().getSimpleName(), e);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
L2NpcInstance.showSkillList(activeChar, (L2Npc) target, activeChar.getClassId());
|
||||
}
|
||||
L2NpcInstance.showSkillList(activeChar, (L2Npc) target, activeChar.getClassId());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -303,7 +303,9 @@ public final class Q10331_StartOfFate extends Quest
|
||||
}
|
||||
player.setBaseClass(newClassId);
|
||||
player.setClassId(newClassId.getId());
|
||||
player.store(false);
|
||||
player.broadcastUserInfo();
|
||||
player.sendSkillList();
|
||||
giveAdena(player, 80000, true);
|
||||
giveItems(player, PROOF_OF_COURAGE, 40);
|
||||
addExpAndSp(player, 200000, 48);
|
||||
|
@@ -212,6 +212,7 @@ public final class Q10360_CertificationOfFate extends Quest
|
||||
player.setBaseClass(newClassId);
|
||||
player.setClassId(newClassId.getId());
|
||||
player.broadcastUserInfo();
|
||||
player.sendSkillList();
|
||||
giveAdena(player, 110000, true);
|
||||
giveItems(player, PROOF_OF_JUSTICE, 40);
|
||||
addExpAndSp(player, 2700000, 648);
|
||||
|
@@ -209,6 +209,7 @@ public final class Q10751_WindsOfFateEncounters extends Quest
|
||||
player.setBaseClass(newClass);
|
||||
player.setClassId(newClass.getId());
|
||||
player.broadcastUserInfo();
|
||||
player.sendSkillList();
|
||||
player.sendPacket(new SocialAction(player.getObjectId(), 23));
|
||||
giveAdena(player, 11000, false);
|
||||
giveItems(player, NAVARI_SUPPORT_BOX_MAGE, 1);
|
||||
@@ -225,6 +226,7 @@ public final class Q10751_WindsOfFateEncounters extends Quest
|
||||
player.setBaseClass(newClass);
|
||||
player.setClassId(newClass.getId());
|
||||
player.broadcastUserInfo();
|
||||
player.sendSkillList();
|
||||
player.sendPacket(new SocialAction(player.getObjectId(), 23));
|
||||
giveAdena(player, 11000, false);
|
||||
giveItems(player, NAVARI_SUPPORT_BOX_FIGHTER, 1);
|
||||
|
@@ -215,6 +215,7 @@ public final class Q10752_WindsOfFateAPromise extends Quest
|
||||
player.setBaseClass(newClass);
|
||||
player.setClassId(newClass.getId());
|
||||
player.broadcastUserInfo();
|
||||
player.sendSkillList();
|
||||
player.sendPacket(new SocialAction(player.getObjectId(), 24));
|
||||
giveAdena(player, 5_000_000, false);
|
||||
giveItems(player, SOUL_SHOT_PACK, 1);
|
||||
@@ -233,6 +234,7 @@ public final class Q10752_WindsOfFateAPromise extends Quest
|
||||
player.setBaseClass(newClass);
|
||||
player.setClassId(newClass.getId());
|
||||
player.broadcastUserInfo();
|
||||
player.sendSkillList();
|
||||
player.sendPacket(new SocialAction(player.getObjectId(), 24));
|
||||
giveAdena(player, 5_000_000, false);
|
||||
giveItems(player, SOUL_SHOT_PACK, 1);
|
||||
|
@@ -321,6 +321,7 @@ public final class Q10753_WindsOfFateChoices extends Quest
|
||||
player.setBaseClass(newClass);
|
||||
player.setClassId(newClass.getId());
|
||||
player.broadcastUserInfo();
|
||||
player.sendSkillList();
|
||||
player.sendPacket(new SocialAction(player.getObjectId(), 24));
|
||||
showOnScreenMsg(player, NpcStringId.CONGRATULATIONS_YOU_WILL_NOW_GRADUATE_FROM_THE_CLAN_ACADEMY_AND_LEAVE_YOUR_CURRENT_CLAN_YOU_CAN_NOW_JOIN_A_CLAN_AS_A_REGULAR_MEMBER_WITHOUT_BEING_SUBJECT_TO_ANY_PENALTIES, ExShowScreenMessage.TOP_CENTER, 10000);
|
||||
giveStoryQuestReward(player, 400);
|
||||
@@ -339,6 +340,7 @@ public final class Q10753_WindsOfFateChoices extends Quest
|
||||
player.setBaseClass(newClass);
|
||||
player.setClassId(newClass.getId());
|
||||
player.broadcastUserInfo();
|
||||
player.sendSkillList();
|
||||
player.sendPacket(new SocialAction(player.getObjectId(), 24));
|
||||
showOnScreenMsg(player, NpcStringId.CONGRATULATIONS_YOU_WILL_NOW_GRADUATE_FROM_THE_CLAN_ACADEMY_AND_LEAVE_YOUR_CURRENT_CLAN_YOU_CAN_NOW_JOIN_A_CLAN_AS_A_REGULAR_MEMBER_WITHOUT_BEING_SUBJECT_TO_ANY_PENALTIES, ExShowScreenMessage.TOP_CENTER, 10000);
|
||||
giveStoryQuestReward(player, 400);
|
||||
|
@@ -238,6 +238,7 @@ public abstract class ThirdClassTransferQuest extends Quest
|
||||
player.setBaseClass(newClassId);
|
||||
player.setClassId(newClassId.getId());
|
||||
player.broadcastUserInfo();
|
||||
player.sendSkillList();
|
||||
giveItems(player, SOUL_SHOT_PACK, 1);
|
||||
giveItems(player, SPIRIT_SHOT_PACK, 1);
|
||||
giveItems(player, STEEL_DOOR_COIN, 87);
|
||||
|
@@ -144,7 +144,6 @@ public final class Config
|
||||
public static boolean LIFE_CRYSTAL_NEEDED;
|
||||
public static boolean ES_SP_BOOK_NEEDED;
|
||||
public static boolean DIVINE_SP_BOOK_NEEDED;
|
||||
public static boolean ALT_GAME_SKILL_LEARN;
|
||||
public static boolean ALT_GAME_SUBCLASS_WITHOUT_QUESTS;
|
||||
public static boolean ALLOW_TRANSFORM_WITHOUT_QUEST;
|
||||
public static int FEE_DELETE_TRANSFER_SKILLS;
|
||||
@@ -1330,7 +1329,6 @@ public final class Config
|
||||
LIFE_CRYSTAL_NEEDED = Character.getBoolean("LifeCrystalNeeded", true);
|
||||
ES_SP_BOOK_NEEDED = Character.getBoolean("EnchantSkillSpBookNeeded", true);
|
||||
DIVINE_SP_BOOK_NEEDED = Character.getBoolean("DivineInspirationSpBookNeeded", true);
|
||||
ALT_GAME_SKILL_LEARN = Character.getBoolean("AltGameSkillLearn", false);
|
||||
ALT_GAME_SUBCLASS_WITHOUT_QUESTS = Character.getBoolean("AltSubClassWithoutQuests", false);
|
||||
RESTORE_SERVITOR_ON_RECONNECT = Character.getBoolean("RestoreServitorOnReconnect", true);
|
||||
RESTORE_PET_ON_RECONNECT = Character.getBoolean("RestorePetOnReconnect", true);
|
||||
|
@@ -1171,7 +1171,7 @@ public final class SkillTreesData implements IGameXmlReader
|
||||
switch (skillType)
|
||||
{
|
||||
case CLASS:
|
||||
sl = getClassSkill(id, lvl, player.getLearningClass());
|
||||
sl = getClassSkill(id, lvl, player.getClassId());
|
||||
break;
|
||||
case TRANSFORM:
|
||||
sl = getTransformSkill(id, lvl);
|
||||
|
@@ -21,10 +21,8 @@ import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
|
||||
import com.l2jmobius.gameserver.enums.Race;
|
||||
import com.l2jmobius.gameserver.model.base.ClassId;
|
||||
import com.l2jmobius.gameserver.model.base.SocialClass;
|
||||
import com.l2jmobius.gameserver.model.holders.ItemHolder;
|
||||
import com.l2jmobius.gameserver.model.holders.SkillHolder;
|
||||
@@ -276,38 +274,6 @@ public final class L2SkillLearn
|
||||
return _pointsRequired;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used for AltGameSkillLearn mod.<br>
|
||||
* If the alternative skill learn system is enabled and the player is learning a skill from a different class apply a fee.<br>
|
||||
* If the player is learning a skill from other class type (mage learning warrior skills or vice versa) the fee is higher.
|
||||
* @param playerClass the player class Id.
|
||||
* @param learningClass the skill learning player class Id.
|
||||
* @return the amount of SP required to acquire this skill, by calculating the cost for the alternative skill learn system.
|
||||
*/
|
||||
public int getCalculatedLevelUpSp(ClassId playerClass, ClassId learningClass)
|
||||
{
|
||||
if ((playerClass == null) || (learningClass == null))
|
||||
{
|
||||
return _levelUpSp;
|
||||
}
|
||||
|
||||
int levelUpSp = _levelUpSp;
|
||||
// If the alternative skill learn system is enabled and the player is learning a skill from a different class apply a fee.
|
||||
if (Config.ALT_GAME_SKILL_LEARN && (playerClass != learningClass))
|
||||
{
|
||||
// If the player is learning a skill from other class type (mage learning warrior skills or vice versa) the fee is higher.
|
||||
if (playerClass.isMage() != learningClass.isMage())
|
||||
{
|
||||
levelUpSp *= 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
levelUpSp *= 2;
|
||||
}
|
||||
}
|
||||
return levelUpSp;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
|
@@ -134,8 +134,6 @@ public class L2NpcInstance extends L2Npc
|
||||
|
||||
// Normal skills, No LearnedByFS, no AutoGet skills.
|
||||
final List<L2SkillLearn> skills = SkillTreesData.getInstance().getAvailableSkills(player, classId, false, false);
|
||||
player.setLearningClass(classId);
|
||||
|
||||
if (skills.isEmpty())
|
||||
{
|
||||
final Map<Long, L2SkillLearn> skillTree = SkillTreesData.getInstance().getCompleteClassSkillTree(classId);
|
||||
|
@@ -2384,27 +2384,6 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Used for AltGameSkillLearn to set a custom skill learning class Id.
|
||||
*/
|
||||
private ClassId _learningClass = getClassId();
|
||||
|
||||
/**
|
||||
* @return the custom skill learning class Id.
|
||||
*/
|
||||
public ClassId getLearningClass()
|
||||
{
|
||||
return _learningClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param learningClass the custom skill learning class Id to set.
|
||||
*/
|
||||
public void setLearningClass(ClassId learningClass)
|
||||
{
|
||||
_learningClass = learningClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the Experience of the L2PcInstance.
|
||||
*/
|
||||
@@ -9636,8 +9615,6 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
_classIndex = classIndex;
|
||||
|
||||
setLearningClass(getClassId());
|
||||
|
||||
if (isInParty())
|
||||
{
|
||||
getParty().recalculatePartyLevel();
|
||||
|
@@ -575,7 +575,7 @@ public final class RequestAcquireSkill implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// First it checks that the skill require SP and the player has enough SP to learn it.
|
||||
final int levelUpSp = skillLearn.getCalculatedLevelUpSp(player.getClassId(), player.getLearningClass());
|
||||
final int levelUpSp = skillLearn.getLevelUpSp();
|
||||
if ((levelUpSp > 0) && (levelUpSp > player.getSp()))
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_ENOUGH_SP_TO_LEARN_THIS_SKILL);
|
||||
|
@@ -118,8 +118,7 @@ public final class RequestAcquireSkillInfo implements IClientIncomingPacket
|
||||
}
|
||||
case CLASS:
|
||||
{
|
||||
final int customSp = s.getCalculatedLevelUpSp(activeChar.getClassId(), activeChar.getLearningClass());
|
||||
client.sendPacket(new ExAcquireSkillInfo(activeChar, s, customSp));
|
||||
client.sendPacket(new ExAcquireSkillInfo(activeChar, s));
|
||||
break;
|
||||
}
|
||||
case PLEDGE:
|
||||
|
@@ -45,14 +45,13 @@ public class ExAcquireSkillInfo implements IClientOutgoingPacket
|
||||
* Sets a custom amount of SP.
|
||||
* @param player
|
||||
* @param skillLearn the skill learn.
|
||||
* @param sp the custom SP amount.
|
||||
*/
|
||||
public ExAcquireSkillInfo(L2PcInstance player, L2SkillLearn skillLearn, int sp)
|
||||
public ExAcquireSkillInfo(L2PcInstance player, L2SkillLearn skillLearn)
|
||||
{
|
||||
_id = skillLearn.getSkillId();
|
||||
_level = skillLearn.getSkillLevel();
|
||||
_dualClassLevel = skillLearn.getDualClassLevel();
|
||||
_spCost = sp;
|
||||
_spCost = skillLearn.getLevelUpSp();
|
||||
_minLevel = skillLearn.getGetLevel();
|
||||
_itemReq = skillLearn.getRequiredItems();
|
||||
_skillRem = skillLearn.getRemoveSkills().stream().map(player::getKnownSkill).filter(Objects::nonNull).collect(Collectors.toList());
|
||||
|
Reference in New Issue
Block a user