Update skill shortcuts when autolearn is enabled.

This commit is contained in:
MobiusDevelopment
2021-11-22 02:30:19 +00:00
parent 03702eb60b
commit 24d326dbae
46 changed files with 296 additions and 80 deletions

View File

@ -2711,12 +2711,21 @@ public class Player extends Playable
addSkill(skill, false);
skillsForStore.add(skill);
if (Config.AUTO_LEARN_SKILLS)
{
updateShortCuts(skill.getId(), skill.getLevel(), skill.getSubLevel());
}
}
storeSkills(skillsForStore, -1);
if (Config.AUTO_LEARN_SKILLS && (skillCounter > 0))
{
sendPacket(new ShortCutInit(this));
sendMessage("You have learned " + skillCounter + " new skills.");
}
return skillCounter;
}

View File

@ -644,11 +644,10 @@ public class RequestAcquireSkill implements IClientIncomingPacket
player.addSkill(skill, store);
player.sendItemList();
player.updateShortCuts(_id, _level, 0);
player.sendPacket(new ShortCutInit(player));
player.sendPacket(new ExBasicActionList(ExBasicActionList.DEFAULT_ACTION_LIST));
player.sendSkillList(skill.getId());
player.updateShortCuts(_id, _level, 0);
showSkillList(trainer, player);
// If skill is expand type then sends packet: