L2JMobius

High Five player returns to level 1 again

kinghanker · 5 · 2112

Offline kinghanker

  • Knight
  • ***
    • Posts: 64
I tested several tests and found specific situations where they cause this problem:
Irrelevant situations:
- Being alone or in a group
- Have a residence or not
- Have enchanted skills or not
- A Config Delevel = false

Situations in which the player does NOT go back the levels:
- The use of single-targeted weapons
- hunt 1 monster at a time

- Any situation where the player receives experience from multiple targets simultaneously. If alone using a spear when in a group where several players attack different targets and they die at the same time, if they die at a different time, the problem does not occur



Online Mobius

  • Distinguished King
  • *****
    • Posts: 16005
PlayerInstance?

Try this.
Code: [Select]
Index: java/org/l2jmobius/gameserver/model/actor/Creature.java
===================================================================
--- java/org/l2jmobius/gameserver/model/actor/Creature.java (revision 10205)
+++ java/org/l2jmobius/gameserver/model/actor/Creature.java (working copy)
@@ -4744,7 +4744,7 @@
  * @param addToExp
  * @param addToSp
  */
- public void addExpAndSp(double addToExp, double addToSp)
+ public synchronized void addExpAndSp(double addToExp, double addToSp)
  {
  // Dummy method (overridden by players and pets)
  }
Index: java/org/l2jmobius/gameserver/model/actor/Player.java
===================================================================
--- java/org/l2jmobius/gameserver/model/actor/Player.java (revision 10203)
+++ java/org/l2jmobius/gameserver/model/actor/Player.java (working copy)
@@ -10825,12 +10825,12 @@
  }
 
  @Override
- public void addExpAndSp(double addToExp, double addToSp)
+ public synchronized void addExpAndSp(double addToExp, double addToSp)
  {
  getStat().addExpAndSp(addToExp, addToSp, false);
  }
 
- public void addExpAndSp(double addToExp, double addToSp, boolean useVitality)
+ public synchronized void addExpAndSp(double addToExp, double addToSp, boolean useVitality)
  {
  getStat().addExpAndSp(addToExp, addToSp, useVitality);
  }
Index: java/org/l2jmobius/gameserver/model/actor/instance/Pet.java
===================================================================
--- java/org/l2jmobius/gameserver/model/actor/instance/Pet.java (revision 10203)
+++ java/org/l2jmobius/gameserver/model/actor/instance/Pet.java (working copy)
@@ -1141,7 +1141,7 @@
  }
 
  @Override
- public void addExpAndSp(double addToExp, double addToSp)
+ public synchronized void addExpAndSp(double addToExp, double addToSp)
  {
  if (getId() == 12564)
  {


Offline kinghanker

  • Knight
  • ***
    • Posts: 64
PlayerInstance?

Yes, I'm using the rev from a year ago but I follow the updates that have fix, so I haven't synced the projects yet because of the tvt that the team preferred the old one.
There are few things that differ if you compare the codes.

I applied the changes, it's already in testing