mirror of
https://github.com/Rogiel/l2jserver2
synced 2025-12-10 09:22:49 +00:00
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user