mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-08-02 03:15:52 -04:00
StaticService can now use mobileTemplates
Just put a mobileTemplate in place of the objectTemplate.
This commit is contained in:
@@ -70,7 +70,7 @@ public class SpawnService {
|
||||
}
|
||||
}
|
||||
|
||||
public CreatureObject spawnCreature(String template, String planetName, long cellId, float x, float y, float z, float qW, float qX, float qY, float qZ, short level) {
|
||||
public CreatureObject spawnCreature(String template, long objectId, String planetName, long cellId, float x, float y, float z, float qW, float qX, float qY, float qZ, short level) {
|
||||
|
||||
Planet planet = core.terrainService.getPlanetByName(planetName);
|
||||
MobileTemplate mobileTemplate = mobileTemplates.get(template);
|
||||
@@ -85,7 +85,7 @@ public class SpawnService {
|
||||
return null;
|
||||
}
|
||||
|
||||
CreatureObject creature = (CreatureObject) core.objectService.createObject(mobileTemplate.getTemplates().get(new Random().nextInt(mobileTemplate.getTemplates().size())), 0, planet, new Point3D(x, y, z), new Quaternion(qW, qX, qY, qZ));
|
||||
CreatureObject creature = (CreatureObject) core.objectService.createObject(mobileTemplate.getTemplates().get(new Random().nextInt(mobileTemplate.getTemplates().size())), objectId, planet, new Point3D(x, y, z), new Quaternion(qW, qX, qY, qZ));
|
||||
|
||||
if(creature == null)
|
||||
return null;
|
||||
@@ -211,6 +211,10 @@ public class SpawnService {
|
||||
return creature;
|
||||
}
|
||||
|
||||
public CreatureObject spawnCreature(String template, String planetName, long cellId, float x, float y, float z, float qW, float qX, float qY, float qZ, short level) {
|
||||
return spawnCreature(template, 0L, planetName, cellId, x, y, z, qW, qX, qY, qZ, level);
|
||||
}
|
||||
|
||||
public CreatureObject spawnCreature(String mobileTemplate, String planetName, long cellId, float x, float y, float z, float qW, float qX, float qY, float qZ, int level) {
|
||||
return spawnCreature(mobileTemplate, planetName, cellId, x, y, z, 1, 0, 0, 0, (short) level);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user