mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-08-02 03:15:52 -04:00
Merge branch 'master' of https://github.com/ProjectSWGCore/NGECore2
Conflicts: src/services/command/CommandService.java src/services/object/ObjectService.java
This commit is contained in:
@@ -40,6 +40,7 @@ import protocol.swg.objectControllerObjects.ShowFlyText;
|
||||
import resources.common.OutOfBand;
|
||||
import resources.common.RGB;
|
||||
import resources.objects.creature.CreatureObject;
|
||||
import resources.objects.loot.LootGroup;
|
||||
import resources.visitors.IDManagerVisitor;
|
||||
|
||||
import com.sleepycat.persist.model.NotPersistent;
|
||||
@@ -52,7 +53,7 @@ import engine.resources.scene.Planet;
|
||||
import engine.resources.scene.Point3D;
|
||||
import engine.resources.scene.Quaternion;
|
||||
|
||||
@Persistent(version=1)
|
||||
@Persistent(version=5)
|
||||
public class TangibleObject extends SWGObject {
|
||||
|
||||
// TODO: Thread safety
|
||||
@@ -75,6 +76,12 @@ public class TangibleObject extends SWGObject {
|
||||
private int respawnTime = 0;
|
||||
private Point3D spawnCoordinates = new Point3D(0, 0, 0);
|
||||
|
||||
//private TreeSet<TreeMap<String,Integer>> lootSpecification = new TreeSet<TreeMap<String,Integer>>();
|
||||
private List<LootGroup> lootGroups = new ArrayList<LootGroup>();
|
||||
|
||||
private boolean looted = false;
|
||||
private boolean lootLock = false;
|
||||
|
||||
@NotPersistent
|
||||
private TangibleObject killer = null;
|
||||
|
||||
@@ -369,7 +376,8 @@ public class TangibleObject extends SWGObject {
|
||||
|
||||
return getPvPBitmask() == 1 || getPvPBitmask() == 2;
|
||||
|
||||
}
|
||||
} else if(attacker.getSlottedObject("ghost") == null)
|
||||
return true;
|
||||
|
||||
return getPvPBitmask() == 1 || getPvPBitmask() == 2;
|
||||
}
|
||||
@@ -436,6 +444,33 @@ public class TangibleObject extends SWGObject {
|
||||
}
|
||||
}
|
||||
|
||||
public List<LootGroup> getLootGroups() {
|
||||
return lootGroups;
|
||||
}
|
||||
|
||||
public void addToLootGroups(String[] lootPoolNames, int[] lootPoolChances, int lootGroupChance) {
|
||||
System.out.println("lootPoolNames[0] " + lootPoolNames[0]);
|
||||
LootGroup lootGroup = new LootGroup(lootPoolNames, lootPoolChances, lootGroupChance);
|
||||
this.lootGroups.add(lootGroup);
|
||||
}
|
||||
|
||||
public boolean isLooted() {
|
||||
return looted;
|
||||
}
|
||||
|
||||
public void setLooted(boolean looted) {
|
||||
this.looted = looted;
|
||||
}
|
||||
|
||||
public boolean isLootLock() {
|
||||
return lootLock;
|
||||
}
|
||||
|
||||
public void setLootLock(boolean lootLock) {
|
||||
this.lootLock = lootLock;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void sendBaselines(Client destination) {
|
||||
|
||||
@@ -459,5 +494,5 @@ public class TangibleObject extends SWGObject {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user