Moved loot groups to mobile template scripts, moved respawn time to spawn service as last argument

Please no longer use loot in object template scripts and move them over
to the mobiles/ folder.
This commit is contained in:
Light2
2014-05-12 18:42:15 +02:00
parent 46a890ed92
commit 7fc5c44817
6 changed files with 65 additions and 11 deletions
@@ -84,7 +84,7 @@ public class TangibleObject extends SWGObject implements Serializable {
private transient TangibleMessageBuilder messageBuilder;
//private TreeSet<TreeMap<String,Integer>> lootSpecification = new TreeSet<TreeMap<String,Integer>>();
private List<LootGroup> lootGroups = new ArrayList<LootGroup>();
private transient List<LootGroup> lootGroups = new ArrayList<LootGroup>();
@NotPersistent
private transient boolean looted = false; // These 4 should not need to be persisted, since a looted corpse will get wiped with server restart
@@ -507,13 +507,22 @@ public class TangibleObject extends SWGObject implements Serializable {
public List<LootGroup> getLootGroups() {
return lootGroups;
}
public void setLootGroups(List<LootGroup> lootGroups) {
this.lootGroups = lootGroups;
}
public void addToLootGroups(String[] lootPoolNames, double[] lootPoolChances, double lootGroupChance) {
System.out.println("lootPoolNames[0] " + lootPoolNames[0]);
//System.out.println("lootPoolNames[0] " + lootPoolNames[0]);
LootGroup lootGroup = new LootGroup(lootPoolNames, lootPoolChances, lootGroupChance);
this.lootGroups.add(lootGroup);
}
public void addToLootGroups(LootGroup lootGroup) {
this.lootGroups.add(lootGroup);
}
public boolean isLooted() {
return looted;
}