1
0
mirror of https://github.com/Rogiel/l2jserver2 synced 2025-12-10 09:22:49 +00:00

Several improvements

Signed-off-by: Rogiel <rogiel@rogiel.com>
This commit is contained in:
2011-05-21 20:19:13 -03:00
parent 6efce6615f
commit ab38e7d5ba
125 changed files with 969 additions and 205 deletions

View File

@@ -30,6 +30,7 @@ import com.l2jserver.model.id.object.provider.ObjectIDResolver;
import com.l2jserver.model.world.L2Character;
import com.l2jserver.model.world.capability.Actor;
import com.l2jserver.service.game.CharacterService;
import com.l2jserver.service.game.CharacterService.CannotSetTargetServiceException;
import com.l2jserver.util.dimensional.Coordinate;
/**
@@ -124,6 +125,10 @@ public class CharacterAttackRequestPacket extends AbstractClientPacket {
return;
}
final Actor actor = id.getObject();
charService.attack(character, actor);
try {
charService.attack(character, actor);
} catch (CannotSetTargetServiceException e) {
conn.sendActionFailed();
}
}
}

View File

@@ -25,6 +25,8 @@ import com.l2jserver.game.net.Lineage2Connection;
import com.l2jserver.game.net.packet.AbstractClientPacket;
import com.l2jserver.model.id.object.CharacterID;
import com.l2jserver.service.game.CharacterService;
import com.l2jserver.service.game.SpawnService.AlreadySpawnedServiceException;
import com.l2jserver.service.game.SpawnService.SpawnPointNotFoundServiceException;
/**
* The client is requesting a logout. Currently, when this packet is received
@@ -75,6 +77,13 @@ public class EnterWorld extends AbstractClientPacket {
conn.close();
return;
}
characterService.enterWorld(id.getObject());
// TODO send fail message
try {
characterService.enterWorld(id.getObject());
} catch (SpawnPointNotFoundServiceException e) {
} catch (AlreadySpawnedServiceException e) {
}
}
}