Update NPCS to fit recent changes to mobiletemplate and weapontemplate

This commit is contained in:
tacef
2014-06-07 07:52:32 +02:00
parent d73c54d212
commit 106c73341f
1469 changed files with 10744 additions and 7834 deletions
+4 -1
View File
@@ -132,7 +132,10 @@ public class SpawnService {
WeaponObject defaultWeapon = null;
Vector<WeaponTemplate> weaponTemplates = mobileTemplate.getWeaponTemplateVector();
int rnd = new Random().nextInt(weaponTemplates.size());
int rnd = 0;
if (weaponTemplates.size() > 0 )
rnd = new Random().nextInt(weaponTemplates.size());
if (weaponTemplates.size() == 0){
defaultWeapon = (WeaponObject) core.objectService.createObject("object/weapon/creature/shared_creature_default_weapon.iff", creature.getPlanet());