mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-10-03 18:13:11 -04:00
Merge branch 'master' of https://github.com/ProjectSWGCore/NGECore2
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
******************************************************************************/
|
||||
package services.spawn;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Vector;
|
||||
|
||||
@@ -59,7 +60,7 @@ public class MobileTemplate implements Cloneable {
|
||||
private String meatType, milkType, boneType, hideType;
|
||||
private int meatAmount, milkAmount, boneAmount, hideAmount;
|
||||
private int respawnTime = 0;
|
||||
private List<LootGroup> lootGroups;
|
||||
private List<LootGroup> lootGroups = new ArrayList<LootGroup>();
|
||||
|
||||
|
||||
public Vector<String> getTemplates() {
|
||||
|
||||
@@ -100,7 +100,7 @@ public class SpawnService {
|
||||
creature.setWeaponId(mobileTemplate.getCustomWeapon().getObjectID());
|
||||
}*/
|
||||
|
||||
if(mobileTemplate.getLootGroups() != null)
|
||||
if(mobileTemplate.getLootGroups() != null && !mobileTemplate.getLootGroups().isEmpty())
|
||||
creature.setLootGroups(mobileTemplate.getLootGroups());
|
||||
|
||||
creature.setOptionsBitmask(mobileTemplate.getOptionsBitmask());
|
||||
@@ -118,7 +118,7 @@ public class SpawnService {
|
||||
level = mobileTemplate.getLevel();
|
||||
}
|
||||
|
||||
if (mobileTemplate.getMinLevel()!=0 && mobileTemplate.getMaxLevel()!=0){
|
||||
if (mobileTemplate.getMinLevel()!=0 && mobileTemplate.getMaxLevel()!=0 && level == -1){
|
||||
level = (short) (mobileTemplate.getMinLevel() + (new Random().nextInt(mobileTemplate.getMaxLevel()-mobileTemplate.getMinLevel())));
|
||||
creature.setLevel(level);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user