mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-08-03 04:16:19 -04:00
Fixed crash caused by buildings, fixed weapon object superclass, added equipment and appearance equipment deltas
This commit is contained in:
@@ -24,6 +24,8 @@ package resources.objects.weapon;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import resources.objects.tangible.TangibleObject;
|
||||
|
||||
import com.sleepycat.persist.model.NotPersistent;
|
||||
import com.sleepycat.persist.model.Persistent;
|
||||
|
||||
@@ -34,17 +36,10 @@ import engine.resources.scene.Point3D;
|
||||
import engine.resources.scene.Quaternion;
|
||||
|
||||
@Persistent(version=1)
|
||||
public class WeaponObject extends SWGObject {
|
||||
public class WeaponObject extends TangibleObject {
|
||||
|
||||
// TODO: Thread safety
|
||||
|
||||
private int incapTimer = 10;
|
||||
private int conditionDamage = 0;
|
||||
|
||||
private byte[] customization;
|
||||
private List<Integer> componentCustomizations = new ArrayList<Integer>();
|
||||
private int optionsBitmask = 0;
|
||||
private boolean staticObject = true;
|
||||
@NotPersistent
|
||||
private WeaponMessageBuilder messageBuilder;
|
||||
|
||||
@@ -52,7 +47,7 @@ public class WeaponObject extends SWGObject {
|
||||
private float maxRange;
|
||||
|
||||
public WeaponObject(long objectID, Planet planet, String template) {
|
||||
super(objectID, planet, new Point3D(0, 0, 0), new Quaternion(1, 0, 1, 0), template);
|
||||
super(objectID, planet, template, new Point3D(0, 0, 0), new Quaternion(1, 0, 1, 0));
|
||||
messageBuilder = new WeaponMessageBuilder(this);
|
||||
if (this.getClass().getSimpleName().equals("WeaponObject")) setIntAttribute("volume", 1);
|
||||
calculateRange();
|
||||
@@ -60,7 +55,7 @@ public class WeaponObject extends SWGObject {
|
||||
}
|
||||
|
||||
public WeaponObject(long objectID, Planet planet, String template, Point3D position, Quaternion orientation) {
|
||||
super(objectID, planet, position, orientation, template);
|
||||
super(objectID, planet, template, position, orientation);
|
||||
messageBuilder = new WeaponMessageBuilder(this);
|
||||
if (this.getClass().getSimpleName().equals("WeaponObject")) setIntAttribute("volume", 1);
|
||||
calculateRange();
|
||||
@@ -105,13 +100,6 @@ public class WeaponObject extends SWGObject {
|
||||
this.incapTimer = incapTimer;
|
||||
}
|
||||
|
||||
public int getConditionDamage() {
|
||||
return conditionDamage;
|
||||
}
|
||||
|
||||
public void setConditionDamage(int conditionDamage) {
|
||||
this.conditionDamage = conditionDamage;
|
||||
}
|
||||
|
||||
public byte[] getCustomization() {
|
||||
return customization;
|
||||
@@ -121,14 +109,6 @@ public class WeaponObject extends SWGObject {
|
||||
this.customization = customization;
|
||||
}
|
||||
|
||||
public List<Integer> getComponentCustomizations() {
|
||||
return componentCustomizations;
|
||||
}
|
||||
|
||||
public void setComponentCustomizations(List<Integer> componentCustomizations) {
|
||||
this.componentCustomizations = componentCustomizations;
|
||||
}
|
||||
|
||||
public int getOptionsBitmask() {
|
||||
return optionsBitmask;
|
||||
}
|
||||
@@ -181,14 +161,6 @@ public class WeaponObject extends SWGObject {
|
||||
return (int) (((getMaxDamage() + getElementalDamage() + getMinDamage() + getElementalDamage()) / 2 + getElementalDamage()) * (1 / getAttackSpeed()));
|
||||
}
|
||||
|
||||
public boolean isStaticObject() {
|
||||
return staticObject;
|
||||
}
|
||||
|
||||
public void setStaticObject(boolean staticObject) {
|
||||
this.staticObject = staticObject;
|
||||
}
|
||||
|
||||
public int getWeaponType() {
|
||||
|
||||
int weaponType = -1;
|
||||
|
||||
Reference in New Issue
Block a user