Changed addExpAndSp methods to synchronized.

This commit is contained in:
MobiusDevelopment
2022-05-23 21:55:33 +00:00
parent 42039fadd5
commit 9d7d7f4db3
89 changed files with 115 additions and 115 deletions

View File

@@ -3771,7 +3771,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
* @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)
}

View File

@@ -10781,12 +10781,12 @@ public class Player extends Playable
}
@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);
}

View File

@@ -1177,7 +1177,7 @@ public class Pet extends Summon
}
@Override
public void addExpAndSp(double addToExp, double addToSp)
public synchronized void addExpAndSp(double addToExp, double addToSp)
{
if (getId() == 12564) // TODO: Remove this stupid hardcode.
{