mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-07-31 01:15:57 -04:00
Merge branch 'master' into darkk_ent
Conflicts: src/resources/objects/creature/CreatureMessageBuilder.java src/resources/objects/creature/CreatureObject.java
This commit is contained in:
@@ -45,7 +45,6 @@ import engine.clients.Client;
|
||||
import resources.objects.Buff;
|
||||
import resources.objects.DamageOverTime;
|
||||
import resources.objects.SWGList;
|
||||
import engine.resources.common.CRC;
|
||||
import engine.resources.objects.IPersistent;
|
||||
import engine.resources.objects.MissionCriticalObject;
|
||||
import engine.resources.objects.SWGObject;
|
||||
@@ -56,7 +55,6 @@ import engine.resources.scene.Quaternion;
|
||||
import resources.objects.tangible.TangibleObject;
|
||||
import resources.objects.weapon.WeaponObject;
|
||||
|
||||
|
||||
@Entity(version=5)
|
||||
public class CreatureObject extends TangibleObject implements IPersistent {
|
||||
|
||||
@@ -139,6 +137,7 @@ public class CreatureObject extends TangibleObject implements IPersistent {
|
||||
private SWGList<Buff> buffList = new SWGList<Buff>();
|
||||
@NotPersistent
|
||||
private int buffListUpdateCounter = 0;
|
||||
private byte difficulty = 0;
|
||||
private SWGList<SWGObject> appearanceEquipmentList;
|
||||
@NotPersistent
|
||||
private int appearanceEquipmentListUpdateCounter = 0;
|
||||
@@ -151,7 +150,7 @@ public class CreatureObject extends TangibleObject implements IPersistent {
|
||||
private SWGList<DamageOverTime> dotList = new SWGList<DamageOverTime>();
|
||||
@NotPersistent
|
||||
private ScheduledFuture<?> incapTask;
|
||||
|
||||
|
||||
private boolean staticNPC = false; // temp
|
||||
|
||||
public CreatureObject(long objectID, Planet planet, Point3D position, Quaternion orientation, String Template) {
|
||||
@@ -286,12 +285,24 @@ public class CreatureObject extends TangibleObject implements IPersistent {
|
||||
|
||||
}
|
||||
|
||||
public void setOptions(int options, boolean add) {
|
||||
synchronized(objectMutex) {
|
||||
if (options != 0) {
|
||||
if (add) {
|
||||
addOption(options);
|
||||
} else {
|
||||
removeOption(options);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void addOption(int option) {
|
||||
setOptionsBitmask(getOptionsBitmask() & option);
|
||||
setOptionsBitmask(getOptionsBitmask() | option);
|
||||
}
|
||||
|
||||
public void removeOption(int option) {
|
||||
setOptionsBitmask(getOptionsBitmask() |~ option);
|
||||
setOptionsBitmask(getOptionsBitmask() & ~option);
|
||||
}
|
||||
|
||||
public byte getPosture() {
|
||||
@@ -1402,4 +1413,18 @@ public class CreatureObject extends TangibleObject implements IPersistent {
|
||||
notifyObservers(new UpdatePVPStatusMessage(getObjectID(), getPvPBitmask(), getFaction()), false);
|
||||
}
|
||||
|
||||
public byte getDifficulty() {
|
||||
synchronized(objectMutex) {
|
||||
return difficulty;
|
||||
}
|
||||
}
|
||||
|
||||
public void setDifficulty(byte difficulty) {
|
||||
synchronized(objectMutex) {
|
||||
this.difficulty = difficulty;
|
||||
}
|
||||
|
||||
notifyObservers(messageBuilder.buildDifficultyDelta(difficulty), true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user