mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-10-02 17:12:58 -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:
@@ -370,8 +370,9 @@ public class CreatureMessageBuilder extends ObjectMessageBuilder {
|
||||
buffer.putInt(1);
|
||||
|
||||
}
|
||||
|
||||
buffer.putShort((short) 0);
|
||||
|
||||
buffer.put((byte) 0);
|
||||
buffer.put(creature.getDifficulty());
|
||||
buffer.putInt(0xFFFFFFFF);
|
||||
buffer.put((byte) 1);
|
||||
buffer.putShort((short) 0);
|
||||
@@ -1023,6 +1024,15 @@ public class CreatureMessageBuilder extends ObjectMessageBuilder {
|
||||
}
|
||||
|
||||
|
||||
public IoBuffer buildDifficultyDelta(byte difficulty) {
|
||||
IoBuffer buffer = bufferPool.allocate(1, false).order(ByteOrder.LITTLE_ENDIAN);
|
||||
buffer.put(difficulty);
|
||||
int size = buffer.position();
|
||||
buffer.flip();
|
||||
buffer = createDelta("CREO", (byte) 6, (short) 1, (short) 0x1C, buffer, size + 4);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendListDelta(byte viewType, short updateType, IoBuffer buffer) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -21,6 +21,311 @@
|
||||
******************************************************************************/
|
||||
package resources.objects.mission;
|
||||
|
||||
public class MissionMessageBuilder {
|
||||
import java.nio.ByteOrder;
|
||||
|
||||
import org.apache.mina.core.buffer.IoBuffer;
|
||||
|
||||
import engine.resources.common.CRC;
|
||||
import resources.objects.ObjectMessageBuilder;
|
||||
import resources.objects.waypoint.WaypointObject;
|
||||
|
||||
public class MissionMessageBuilder extends ObjectMessageBuilder {
|
||||
|
||||
public MissionMessageBuilder(MissionObject missionObject) {
|
||||
setObject(missionObject);
|
||||
}
|
||||
|
||||
public IoBuffer buildBaseline3() {
|
||||
MissionObject mission = (MissionObject) object;
|
||||
IoBuffer buffer = IoBuffer.allocate(100, false).order(ByteOrder.LITTLE_ENDIAN);
|
||||
buffer.setAutoExpand(true);
|
||||
|
||||
buffer.putShort((short) 11);
|
||||
|
||||
buffer.putFloat(1); // mission complexity ??
|
||||
buffer.put(getAsciiString(mission.getStfFilename()));
|
||||
buffer.putInt(0);
|
||||
buffer.put(getAsciiString(mission.getStfName()));
|
||||
|
||||
if (mission.getCustomName() == null) { buffer.put(getUnicodeString("")); }
|
||||
else { buffer.put(getUnicodeString(mission.getCustomName())); }
|
||||
|
||||
buffer.putInt(mission.getVolume());
|
||||
buffer.putInt(0); // unused
|
||||
buffer.putInt(mission.getMissionLevel());
|
||||
|
||||
buffer.putFloat(mission.getMissionStartX());
|
||||
buffer.putFloat(0); // missionStartZ
|
||||
buffer.putFloat(mission.getMissionStartY());
|
||||
|
||||
buffer.putLong(0); // ??
|
||||
|
||||
buffer.putInt(CRC.StringtoCRC(mission.getMissionStartPlanet()));
|
||||
|
||||
buffer.put(getUnicodeString(mission.getMissionCreator()));
|
||||
buffer.putInt(mission.getMissionCredits());
|
||||
|
||||
buffer.putFloat(mission.getMissionDestinationX());
|
||||
buffer.putFloat(0); // missionDestinationZ
|
||||
buffer.putFloat(mission.getMissionDestinationY());
|
||||
|
||||
buffer.putLong(0); // ??
|
||||
|
||||
buffer.putInt(CRC.StringtoCRC(mission.getMissionDestinationPlanet()));
|
||||
|
||||
buffer.putInt(CRC.StringtoCRC(mission.getMissionTemplateObject()));
|
||||
|
||||
buffer.put(getAsciiString(mission.getMissionDescription()));
|
||||
buffer.putInt(0);
|
||||
buffer.put(getAsciiString(mission.getMissionDescId()));
|
||||
|
||||
buffer.put(getAsciiString(mission.getMissionTitle()));
|
||||
buffer.putInt(0);
|
||||
buffer.put(getAsciiString(mission.getMissionTitleId()));
|
||||
|
||||
buffer.putInt(0); // refresh counter
|
||||
|
||||
buffer.putInt(CRC.StringtoCRC(mission.getMissionType()));
|
||||
|
||||
buffer.put(getAsciiString(mission.getMissionTargetName()));
|
||||
|
||||
WaypointObject wp = mission.getMissionAttachedWaypoint();
|
||||
|
||||
if (wp == null) {
|
||||
buffer.putInt(0);
|
||||
buffer.putFloat(0); // x
|
||||
buffer.putFloat(0); // z
|
||||
buffer.putFloat(0); // y
|
||||
buffer.putLong(0); // target id
|
||||
buffer.putInt(0); // planet crc
|
||||
buffer.put(getUnicodeString(""));
|
||||
buffer.putLong(0); // waypoint id
|
||||
buffer.put((byte) 0); // color
|
||||
buffer.put((byte) 0x01); //active
|
||||
} else {
|
||||
buffer.putInt(wp.getCellId());
|
||||
buffer.putFloat(wp.getPosition().x);
|
||||
buffer.putFloat(wp.getPosition().z);
|
||||
buffer.putFloat(wp.getPosition().y);
|
||||
buffer.putLong(0);
|
||||
buffer.putInt(CRC.StringtoCRC(wp.getPlanet().name));
|
||||
}
|
||||
int size = buffer.position();
|
||||
buffer = bufferPool.allocate(size, false).put(buffer.array(), 0, size);
|
||||
|
||||
buffer.flip();
|
||||
buffer = createBaseline("MISO", (byte) 3, buffer, size);
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public IoBuffer buildBaseline6() {
|
||||
|
||||
IoBuffer buffer = IoBuffer.allocate(4, false).order(ByteOrder.LITTLE_ENDIAN);
|
||||
|
||||
buffer.putInt(121); // unk
|
||||
|
||||
int size = buffer.position();
|
||||
buffer.flip();
|
||||
buffer = createBaseline("MISO", (byte) 6, buffer, size);
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public IoBuffer buildStfDelta() {
|
||||
MissionObject mission = (MissionObject) object;
|
||||
|
||||
IoBuffer buffer = IoBuffer.allocate(4 + mission.getStfFilename().length() + mission.getStfName().length(), false).order(ByteOrder.LITTLE_ENDIAN);
|
||||
|
||||
buffer.put(getAsciiString(mission.getStfFilename()));
|
||||
buffer.putInt(0);
|
||||
buffer.put(getAsciiString(mission.getStfName()));
|
||||
|
||||
int size = buffer.position();
|
||||
buffer.flip();
|
||||
buffer = createDelta("MISO", (byte) 3, (short) 1, (short) 0x01, buffer, size + 4);
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public IoBuffer buildDifficultyLevelDelta() {
|
||||
MissionObject mission = (MissionObject) object;
|
||||
|
||||
IoBuffer buffer = IoBuffer.allocate(4, false).order(ByteOrder.LITTLE_ENDIAN);
|
||||
|
||||
buffer.putInt(mission.getMissionLevel());
|
||||
|
||||
int size = buffer.position();
|
||||
buffer.flip();
|
||||
buffer = createDelta("MISO", (byte) 3, (short) 1, (short) 0x05, buffer, size + 4);
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public IoBuffer buildStartLocationDelta() {
|
||||
MissionObject mission = (MissionObject) object;
|
||||
|
||||
IoBuffer buffer = IoBuffer.allocate(24, false).order(ByteOrder.LITTLE_ENDIAN);
|
||||
|
||||
buffer.putFloat(mission.getMissionStartX());
|
||||
buffer.putFloat(mission.getMissionStartZ());
|
||||
buffer.putFloat(mission.getMissionStartY());
|
||||
|
||||
buffer.putLong(0);
|
||||
|
||||
buffer.putInt(CRC.StringtoCRC(mission.getMissionStartPlanet()));
|
||||
|
||||
int size = buffer.position();
|
||||
buffer.flip();
|
||||
buffer = createDelta("MISO", (byte) 3, (short) 1, (short) 0x06, buffer, size + 4);
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public IoBuffer buildCreatorNameDelta() {
|
||||
MissionObject mission = (MissionObject) object;
|
||||
|
||||
IoBuffer buffer = IoBuffer.allocate(4 + mission.getMissionCreator().length(), false).order(ByteOrder.LITTLE_ENDIAN);
|
||||
|
||||
buffer.put(getAsciiString(mission.getMissionCreator()));
|
||||
|
||||
int size = buffer.position();
|
||||
buffer.flip();
|
||||
buffer = createDelta("MISO", (byte) 3, (short) 1, (short) 0x07, buffer, size + 4);
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public IoBuffer buildCreditsRewardDelta() {
|
||||
MissionObject mission = (MissionObject) object;
|
||||
|
||||
IoBuffer buffer = IoBuffer.allocate(4, false).order(ByteOrder.LITTLE_ENDIAN);
|
||||
|
||||
buffer.putInt(mission.getMissionCredits());
|
||||
|
||||
int size = buffer.position();
|
||||
buffer.flip();
|
||||
buffer = createDelta("MISO", (byte) 3, (short) 1, (short) 0x08, buffer, size + 4);
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public IoBuffer buildDestinationDelta() {
|
||||
MissionObject mission = (MissionObject) object;
|
||||
|
||||
IoBuffer buffer = IoBuffer.allocate(24, false).order(ByteOrder.LITTLE_ENDIAN);
|
||||
|
||||
buffer.putFloat(mission.getMissionDestinationX());
|
||||
buffer.putFloat(mission.getMissionDestinationZ());
|
||||
buffer.putFloat(mission.getMissionDestinationY());
|
||||
|
||||
buffer.putLong(0); // Destination Object ID
|
||||
|
||||
buffer.putInt(CRC.StringtoCRC(mission.getMissionDestinationPlanet()));
|
||||
|
||||
int size = buffer.position();
|
||||
buffer.flip();
|
||||
buffer = createDelta("MISO", (byte) 3, (short) 1, (short) 0x09, buffer, size + 4);
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public IoBuffer buildTargetObjectIffDelta() {
|
||||
MissionObject mission = (MissionObject) object;
|
||||
|
||||
IoBuffer buffer = IoBuffer.allocate(4, false).order(ByteOrder.LITTLE_ENDIAN);
|
||||
|
||||
buffer.putInt(CRC.StringtoCRC(mission.getMissionTemplateObject()));
|
||||
|
||||
int size = buffer.position();
|
||||
buffer.flip();
|
||||
buffer = createDelta("MISO", (byte) 3, (short) 1, (short) 0x0A, buffer, size + 4);
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public IoBuffer buildMissionDescriptionDelta() {
|
||||
MissionObject mission = (MissionObject) object;
|
||||
|
||||
IoBuffer buffer = IoBuffer.allocate(4 + mission.getMissionDescription().length() + mission.getMissionDescId().length(), false).order(ByteOrder.LITTLE_ENDIAN);
|
||||
|
||||
buffer.put(getAsciiString(mission.getMissionDescription()));
|
||||
buffer.putInt(0);
|
||||
buffer.put(getAsciiString(mission.getMissionDescId()));
|
||||
|
||||
int size = buffer.position();
|
||||
buffer.flip();
|
||||
buffer = createDelta("MISO", (byte) 3, (short) 1, (short) 0x0B, buffer, size + 4);
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public IoBuffer buildMissionTitleDelta() {
|
||||
MissionObject mission = (MissionObject) object;
|
||||
|
||||
IoBuffer buffer = IoBuffer.allocate(4 + mission.getMissionTitle().length() + mission.getMissionTitleId().length(), false).order(ByteOrder.LITTLE_ENDIAN);
|
||||
|
||||
buffer.put(getAsciiString(mission.getMissionTitle()));
|
||||
buffer.putInt(0);
|
||||
buffer.put(getAsciiString(mission.getMissionTitleId()));
|
||||
|
||||
int size = buffer.position();
|
||||
buffer.flip();
|
||||
buffer = createDelta("MISO", (byte) 3, (short) 1, (short) 0x0C, buffer, size + 4);
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public IoBuffer buildRepeatCounterDelta() {
|
||||
MissionObject mission = (MissionObject) object;
|
||||
|
||||
IoBuffer buffer = IoBuffer.allocate(4, false).order(ByteOrder.LITTLE_ENDIAN);
|
||||
|
||||
buffer.putInt(mission.getMissionRepeatCounter());
|
||||
|
||||
int size = buffer.position();
|
||||
buffer.flip();
|
||||
buffer = createDelta("MISO", (byte) 3, (short) 1, (short) 0x0D, buffer, size + 4);
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public IoBuffer buildMissionTypeDelta() {
|
||||
MissionObject mission = (MissionObject) object;
|
||||
|
||||
IoBuffer buffer = IoBuffer.allocate(4, false).order(ByteOrder.LITTLE_ENDIAN);
|
||||
|
||||
buffer.putInt(CRC.StringtoCRC(mission.getMissionType()));
|
||||
|
||||
int size = buffer.position();
|
||||
buffer.flip();
|
||||
buffer = createDelta("MISO", (byte) 3, (short) 1, (short) 0x0E, buffer, size + 4);
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public IoBuffer buildTargetNameDelta() {
|
||||
MissionObject mission = (MissionObject) object;
|
||||
|
||||
IoBuffer buffer = IoBuffer.allocate(4 + mission.getMissionTargetName().length(), false).order(ByteOrder.LITTLE_ENDIAN);
|
||||
|
||||
buffer.put(getAsciiString(mission.getMissionTargetName()));
|
||||
|
||||
int size = buffer.position();
|
||||
buffer.flip();
|
||||
buffer = createDelta("MISO", (byte) 3, (short) 1, (short) 0x0F, buffer, size + 4);
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendListDelta(byte viewType, short updateType, IoBuffer buffer) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendBaselines() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -21,6 +21,220 @@
|
||||
******************************************************************************/
|
||||
package resources.objects.mission;
|
||||
|
||||
public class MissionObject {
|
||||
import com.sleepycat.je.Environment;
|
||||
import com.sleepycat.je.Transaction;
|
||||
import com.sleepycat.persist.model.NotPersistent;
|
||||
|
||||
import resources.objects.tangible.TangibleObject;
|
||||
import resources.objects.waypoint.WaypointObject;
|
||||
import engine.clients.Client;
|
||||
import engine.resources.objects.IPersistent;
|
||||
import engine.resources.objects.SWGObject;
|
||||
import engine.resources.scene.Planet;
|
||||
import engine.resources.scene.Point3D;
|
||||
import engine.resources.scene.Quaternion;
|
||||
|
||||
public class MissionObject extends SWGObject implements IPersistent {
|
||||
|
||||
private float missionDestinationX;
|
||||
private float missionDestinationY;
|
||||
private float missionDestinationZ;
|
||||
private float missionStartX;
|
||||
private float missionStartY;
|
||||
private float missionStartZ;
|
||||
private String missionStartPlanet;
|
||||
private int missionLevel; // Difficulty level displayed in details
|
||||
private String missionDestinationPlanet;
|
||||
private int missionRepeatCounter; // increases for each player using the mission; used for redisplaying on mission term too
|
||||
private int missionCredits;
|
||||
private String missionCreator;
|
||||
private String missionDescription;
|
||||
private String missionTitle;
|
||||
private String missionTargetName; // target/destination
|
||||
private String missionDescId;
|
||||
private String missionTitleId;
|
||||
private String missionType;
|
||||
private WaypointObject missionAttachedWaypoint;
|
||||
|
||||
private String missionTemplateObject;
|
||||
|
||||
@NotPersistent
|
||||
MissionMessageBuilder messageBuilder = new MissionMessageBuilder(this);
|
||||
|
||||
@NotPersistent
|
||||
private Transaction txn;
|
||||
|
||||
|
||||
public MissionObject(long objectID, Planet planet, String template) {
|
||||
super(objectID, planet, new Point3D(0, 0, 0), new Quaternion(1, 0, 0, 0), template);
|
||||
}
|
||||
|
||||
public float getMissionStartX() {
|
||||
return missionStartX;
|
||||
}
|
||||
|
||||
public float getMissionStartY() {
|
||||
return missionStartY;
|
||||
}
|
||||
|
||||
public float getMissionStartZ() {
|
||||
return missionStartZ;
|
||||
}
|
||||
|
||||
public void setMissionStart(float x, float y, float z) {
|
||||
this.missionStartZ = z;
|
||||
this.missionStartX = x;
|
||||
this.missionStartY = y;
|
||||
}
|
||||
|
||||
public float getMissionDestinationX() {
|
||||
return missionDestinationX;
|
||||
}
|
||||
|
||||
public float getMissionDestinationY() {
|
||||
return missionDestinationY;
|
||||
}
|
||||
|
||||
public float getMissionDestinationZ() {
|
||||
return missionDestinationZ;
|
||||
}
|
||||
|
||||
public void setMissionDestination(float x, float y, float z) {
|
||||
this.missionDestinationZ = z;
|
||||
this.missionDestinationY = y;
|
||||
this.missionDestinationZ = z;
|
||||
}
|
||||
|
||||
public String getMissionDestinationPlanet() {
|
||||
return missionDestinationPlanet;
|
||||
}
|
||||
|
||||
public void setMissionDestinationPlanet(String missionDestinationPlanet) {
|
||||
this.missionDestinationPlanet = missionDestinationPlanet;
|
||||
}
|
||||
|
||||
public int getMissionLevel() {
|
||||
return missionLevel;
|
||||
}
|
||||
|
||||
public void setMissionLevel(int missionLevel) {
|
||||
this.missionLevel = missionLevel;
|
||||
}
|
||||
|
||||
public String getMissionStartPlanet() {
|
||||
return missionStartPlanet;
|
||||
}
|
||||
|
||||
public void setMissionStartPlanet(String missionStartPlanetCRC) {
|
||||
this.missionStartPlanet = missionStartPlanetCRC;
|
||||
}
|
||||
|
||||
public int getMissionRepeatCounter() {
|
||||
return missionRepeatCounter;
|
||||
}
|
||||
|
||||
public void setMissionRepeatCounter(int missionRepeatCounter) {
|
||||
this.missionRepeatCounter = missionRepeatCounter;
|
||||
}
|
||||
|
||||
public int getMissionCredits() {
|
||||
return missionCredits;
|
||||
}
|
||||
|
||||
public void setMissionCredits(int missionCredits) {
|
||||
this.missionCredits = missionCredits;
|
||||
}
|
||||
|
||||
public String getMissionCreator() {
|
||||
return missionCreator;
|
||||
}
|
||||
|
||||
public void setMissionCreator(String missionCreator) {
|
||||
this.missionCreator = missionCreator;
|
||||
}
|
||||
|
||||
public String getMissionDescription() {
|
||||
return missionDescription;
|
||||
}
|
||||
|
||||
public void setMissionDescription(String missionDescription) {
|
||||
this.missionDescription = missionDescription;
|
||||
}
|
||||
|
||||
public String getMissionTitle() {
|
||||
return missionTitle;
|
||||
}
|
||||
|
||||
public void setMissionTitle(String missionTitle) {
|
||||
this.missionTitle = missionTitle;
|
||||
}
|
||||
|
||||
public String getMissionTargetName() {
|
||||
return missionTargetName;
|
||||
}
|
||||
|
||||
public void setMissionTargetName(String missionTargetName) {
|
||||
this.missionTargetName = missionTargetName;
|
||||
}
|
||||
|
||||
public WaypointObject getMissionAttachedWaypoint() {
|
||||
return missionAttachedWaypoint;
|
||||
}
|
||||
|
||||
public void setMissionAttachedWaypoint(WaypointObject missionAttachedWaypoint) {
|
||||
this.missionAttachedWaypoint = missionAttachedWaypoint;
|
||||
}
|
||||
|
||||
public String getMissionTemplateObject() {
|
||||
return missionTemplateObject;
|
||||
}
|
||||
|
||||
public void setMissionTemplateObject(String missionTemplateObject) {
|
||||
this.missionTemplateObject = missionTemplateObject;
|
||||
}
|
||||
|
||||
public String getMissionDescId() {
|
||||
return missionDescId;
|
||||
}
|
||||
|
||||
public void setMissionDescId(String missionDescId) {
|
||||
this.missionDescId = missionDescId;
|
||||
}
|
||||
|
||||
public String getMissionTitleId() {
|
||||
return missionTitleId;
|
||||
}
|
||||
|
||||
public void setMissionTitleId(String missionTitleId) {
|
||||
this.missionTitleId = missionTitleId;
|
||||
}
|
||||
|
||||
public String getMissionType() {
|
||||
return missionType;
|
||||
}
|
||||
|
||||
public void setMissionType(String missionType) {
|
||||
this.missionType = missionType;
|
||||
}
|
||||
|
||||
public Transaction getTransaction() {
|
||||
return txn;
|
||||
}
|
||||
|
||||
public void createTransaction(Environment env) {
|
||||
txn = env.beginTransaction(null, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendBaselines(Client destination) {
|
||||
|
||||
if(destination == null || destination.getSession() == null) {
|
||||
System.out.println("NULL session");
|
||||
return;
|
||||
}
|
||||
|
||||
destination.getSession().write(messageBuilder.buildBaseline3());
|
||||
destination.getSession().write(messageBuilder.buildBaseline6());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -137,6 +137,26 @@ public class TangibleObject extends SWGObject {
|
||||
this.optionsBitmask = optionsBitmask;
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
public void removeOption(int option) {
|
||||
setOptionsBitmask(getOptionsBitmask() & ~option);
|
||||
}
|
||||
|
||||
public int getMaxDamage() {
|
||||
return maxDamage;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user