use of com.solinia.solinia.Models.SoliniaLootTableEntry in project solinia3-core by mixxit.
the class SoliniaLootFactory method CreateLootTableDrop.
public static void CreateLootTableDrop(int loottableid, int lootdropid, boolean operatorCreated) throws CoreStateInitException {
ISoliniaLootTable loottabletable = StateManager.getInstance().getConfigurationManager().getLootTable(loottableid);
SoliniaLootTableEntry loottable = new SoliniaLootTableEntry();
int id = 1;
for (ISoliniaLootTableEntry entry : loottabletable.getEntries()) {
if (entry.getId() > id)
id = entry.getId() + 1;
}
loottable.setId(id);
loottable.setLoottableid(loottableid);
loottable.setLootdropid(lootdropid);
loottable.setOperatorCreated(operatorCreated);
StateManager.getInstance().getConfigurationManager().getLootTable(loottableid).getEntries().add(loottable);
}
Aggregations