mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-10-16 06:13:45 -04:00
Fixed issue where non-player couldn't be buffed.
This commit is contained in:
@@ -981,20 +981,10 @@ public class CreatureObject extends TangibleObject implements IPersistent {
|
||||
}
|
||||
|
||||
public void addBuff(Buff buff) {
|
||||
if (buff == null) {
|
||||
System.err.println("CreatureObject:addBuff(): Attempting to add a null Buff object. Something is wrong in BuffService!");
|
||||
}
|
||||
|
||||
synchronized(objectMutex) {
|
||||
PlayerObject player = (PlayerObject) getSlottedObject("ghost");
|
||||
buff.setTotalPlayTime((int) (player.getTotalPlayTime() + (System.currentTimeMillis() - player.getLastPlayTimeUpdate()) / 1000));
|
||||
}
|
||||
|
||||
PlayerObject player = (PlayerObject) getSlottedObject("ghost");
|
||||
buff.setTotalPlayTime((player == null) ? 0 : (int) (player.getTotalPlayTime() + (System.currentTimeMillis() - player.getLastPlayTimeUpdate()) / 1000));
|
||||
buff.setStartTime();
|
||||
getBuffList().put(CRC.StringtoCRC(buff.getBuffName().toLowerCase()), buff);
|
||||
|
||||
synchronized(objectMutex) {
|
||||
buff.setStartTime();
|
||||
}
|
||||
}
|
||||
|
||||
public void removeBuff(Buff buff) {
|
||||
|
||||
Reference in New Issue
Block a user