Fixed callback buffs for buffs

This commit is contained in:
Mads Boddum
2016-10-19 10:50:48 +02:00
parent 47bc9d4e9a
commit 0a3ebe53a5
5 changed files with 11 additions and 14 deletions
@@ -33,6 +33,7 @@ import java.util.Set;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import network.packets.swg.zone.UpdatePostureMessage;
@@ -62,9 +63,6 @@ import utilities.Encoder.StringType;
public class CreatureObject extends TangibleObject {
private static final long serialVersionUID = 3L;
private transient GroupInviterData inviterData = new GroupInviterData(0, null, "", 0);
private transient long lastReserveOperation = 0;
private final CreatureObjectClientServerNP creo4 = new CreatureObjectClientServerNP();
@@ -602,6 +600,10 @@ public class CreatureObject extends TangibleObject {
creo6.removeBuff(buffCrc, this);
}
public boolean hasBuff(String buffName) {
return getBuffByCrc(new CRC(buffName.toLowerCase(Locale.ENGLISH))) != null;
}
public Buff getBuffByCrc(CRC buffCrc) {
return creo6.getBuffByCrc(buffCrc);
}
@@ -90,10 +90,6 @@ public class PlayerObject extends IntangibleObject {
sendDelta(3, 7, title, StringType.ASCII);
}
/**
* Calling this method will update the playTime field.
* @return the amount of time this PlayerObject has played.
*/
public int getPlayTime() {
return play3.getPlayTime();
}
@@ -103,7 +99,7 @@ public class PlayerObject extends IntangibleObject {
play3.setPlayTime(playTime);
sendDelta(3, 9, playTime);
}
public int getGcwPoints() {
return play3.getGcwPoints();
}