L2JMobius

Classic Interlude Stats not updating

veriongt · 5 · 212

Online veriongt

  • Heir
  • **
    • Posts: 15
  • A.K.A Capitaliz3d
    • L2Infinity
I wish to bring to your attention an issue regarding the updating of  player statistics upon entering world.
It has come to my notice that there is a discrepancy wherein the player statistics fail to update accurately in accordance with the items equipped.
The statistics fail to reflect the changes until a manual process of unequipping and re-equipping the weapon or shirt is performed.
Anyone has any idea why?
Dedicated to refining Lineage 2 through meticulous development | Embracing challenges to elevate user experience | Together, we build greatness! 🌟


Online veriongt

  • Heir
  • **
    • Posts: 15
  • A.K.A Capitaliz3d
    • L2Infinity
Found the solution about the problem not updating the stats on enter world mainly for weapon passive and jews e.t.c on items.java

Link with the patch : https://mega.nz/file/gUdQwbia#Zv7fBU_E6-Hn7ePbMqDPMpasOTOOrafqUrTvKgPsz08
Dedicated to refining Lineage 2 through meticulous development | Embracing challenges to elevate user experience | Together, we build greatness! 🌟


Online Mobius

  • Distinguished King
  • *****
    • Posts: 16085
This part is a packet spam hazard.
Code: [Select]
player.sendPacket(new SkillCoolTime(player));Did you test without it? SkillCoolTime is already sent with EnterWorld packet.

hasPassiveSkills must be called before getActingPlayer.


Code: [Select]
Index: java/org/l2jmobius/gameserver/model/item/instance/Item.java
===================================================================
--- java/org/l2jmobius/gameserver/model/item/instance/Item.java (revision 13723)
+++ java/org/l2jmobius/gameserver/model/item/instance/Item.java (working copy)
@@ -2049,23 +2049,36 @@
 
  public void giveSkillsToOwner()
  {
- if (!hasPassiveSkills())
+ if (!isEquipped() && !hasPassiveSkills())
  {
  return;
  }
 
  final Player player = getActingPlayer();
- if (player != null)
+ if (player == null)
  {
- _itemTemplate.forEachSkill(ItemSkillType.NORMAL, holder ->
+ return;
+ }
+
+ _itemTemplate.forEachSkill(ItemSkillType.NORMAL, holder ->
+ {
+ final Skill skill = holder.getSkill();
+ if (skill.isPassive())
  {
- final Skill skill = holder.getSkill();
- if (skill.isPassive())
- {
- player.addSkill(skill, false);
- }
- });
- }
+ player.addSkill(skill, false);
+ }
+ });
+
+ _itemTemplate.forEachSkill(ItemSkillType.ON_ENCHANT, holder ->
+ {
+ final Skill skill = holder.getSkill();
+ if (skill.isPassive() && (getEnchantLevel() >= holder.getValue()))
+ {
+ player.addSkill(skill, false);
+ }
+ });
+
+ // player.sendPacket(new SkillCoolTime(player));
  }
 
  public void removeSkillsFromOwner()


Online veriongt

  • Heir
  • **
    • Posts: 15
  • A.K.A Capitaliz3d
    • L2Infinity
Worked as intended thanks for the correction
Dedicated to refining Lineage 2 through meticulous development | Embracing challenges to elevate user experience | Together, we build greatness! 🌟