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

@ -5755,7 +5755,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
* @param addToExp the add to exp
* @param addToSp the add to sp
*/
public void addExpAndSp(long addToExp, int addToSp)
public synchronized void addExpAndSp(long addToExp, int addToSp)
{
// Dummy method (overridden by players and pets)
}

View File

@ -12680,7 +12680,7 @@ public class Player extends Playable
}
@Override
public void addExpAndSp(long addToExp, int addToSp)
public synchronized void addExpAndSp(long addToExp, int addToSp)
{
getStat().addExpAndSp(addToExp, addToSp);
}

View File

@ -1012,7 +1012,7 @@ public class Pet extends Summon
}
@Override
public void addExpAndSp(long addToExp, int addToSp)
public synchronized void addExpAndSp(long addToExp, int addToSp)
{
if (getNpcId() == 12564)
{

View File

@ -170,7 +170,7 @@ public class Servitor extends Summon
_timeRemaining -= value;
}
public void addExpAndSp(int addToExp, int addToSp)
public synchronized void addExpAndSp(int addToExp, int addToSp)
{
getOwner().addExpAndSp(addToExp, addToSp);
}