mirror of
https://github.com/Rogiel/l2jserver2
synced 2025-12-09 17:02:53 +00:00
NPC skills added, updated item template
Signed-off-by: Rogiel <rogiel@rogiel.com>
This commit is contained in:
@@ -87,17 +87,23 @@ public class SpawnServiceImpl extends AbstractService implements SpawnService {
|
||||
throws SpawnPointNotFoundServiceException,
|
||||
AlreadySpawnedServiceException {
|
||||
Preconditions.checkNotNull(object, "object");
|
||||
// only set the new position if needed, this could cause a lot of
|
||||
// database updates if update is done unnecessarily
|
||||
boolean updatePoint = true;
|
||||
// sanitize
|
||||
if (point == null)
|
||||
if (point == null) {
|
||||
// retrieving stored point
|
||||
point = object.getPoint();
|
||||
updatePoint = false;
|
||||
}
|
||||
if (point == null) {
|
||||
// not point send and no point stored, aborting
|
||||
// not point in argument and no point stored, aborting
|
||||
throw new SpawnPointNotFoundServiceException();
|
||||
}
|
||||
|
||||
// set the spawning point
|
||||
object.setPoint(point);
|
||||
if (updatePoint)
|
||||
object.setPoint(point);
|
||||
// reset actor state
|
||||
if (object instanceof Actor) {
|
||||
((Actor) object).setState(null);
|
||||
|
||||
Reference in New Issue
Block a user