Moved duel checks from DuelPlayerService to their script.

This commit is contained in:
Iosnowore
2017-04-02 14:10:02 -07:00
parent 38634ab65f
commit 42f24d8ee4
4 changed files with 16 additions and 13 deletions
@@ -87,7 +87,7 @@ public class CreatureObject extends TangibleObject {
private List<CreatureObject> activeDuels = new SynchronizedList<CreatureObject>();
private List<CreatureObject> sentDuels = new SynchronizedList<CreatureObject>();
private List<CreatureObject> sentDuels = new SynchronizedList<CreatureObject>();
public CreatureObject(long objectId) {
super(objectId, BaselineType.CREO);
@@ -804,6 +804,10 @@ public class CreatureObject extends TangibleObject {
return isEnemy(otherObject) && otherPosture != Posture.INCAPACITATED && otherPosture != Posture.DEAD;
}
public boolean sentDuelRequestToPlayer(CreatureObject player) {
return sentDuels.contains(player);
}
public List<CreatureObject> getActiveDuels() {
return activeDuels;
}