1
0
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:
2011-06-03 14:04:57 -03:00
parent b188f054df
commit fe7373ba29
10110 changed files with 181889 additions and 39634 deletions

View File

@@ -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);