mirror of
https://github.com/Rogiel/l2jserver2
synced 2025-12-06 07:32:46 +00:00
- Added Bloody Pixy template for issue https://github.com/l2jserver2/l2jserver2/issues/14 (unrelated to Interlude)
- More Interlude work - Trying out admin commands.
This commit is contained in:
@@ -29,5 +29,6 @@ public class L2JConstant {
|
||||
* <p>
|
||||
* This <b>MUST</b> be hard-coded!
|
||||
*/
|
||||
public static final ProtocolVersion SUPPORTED_PROTOCOL = ProtocolVersion.FREYA;
|
||||
//public static final ProtocolVersion SUPPORTED_PROTOCOL = ProtocolVersion.FREYA;
|
||||
public static final ProtocolVersion SUPPORTED_PROTOCOL = ProtocolVersion.INTERLUDE;
|
||||
}
|
||||
|
||||
@@ -48,8 +48,7 @@ public class TeleporterController extends BaseNPCController {
|
||||
if (args.length >= 2) {
|
||||
switch (args[0]) {
|
||||
case "goto":
|
||||
final TeleportationTemplate tele = teleportationIdProvider
|
||||
.resolveID(Integer.parseInt(args[1])).getTemplate();
|
||||
final TeleportationTemplate tele = teleportationIdProvider.resolveID(Integer.parseInt(args[1])).getTemplate();
|
||||
if (tele == null) {
|
||||
throw new NPCControllerException();
|
||||
}
|
||||
|
||||
@@ -23,9 +23,12 @@ import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.l2jserver.model.id.object.CharacterID;
|
||||
import com.l2jserver.model.id.template.provider.ItemTemplateIDProvider;
|
||||
import com.l2jserver.model.world.Actor;
|
||||
import com.l2jserver.model.world.L2Character;
|
||||
import com.l2jserver.service.AbstractService;
|
||||
import com.l2jserver.service.ServiceException;
|
||||
import com.l2jserver.service.game.item.ItemService;
|
||||
import com.l2jserver.service.game.spawn.CharacterAlreadyTeleportingServiceException;
|
||||
import com.l2jserver.service.game.spawn.NotSpawnedServiceException;
|
||||
import com.l2jserver.service.game.spawn.SpawnService;
|
||||
@@ -53,6 +56,12 @@ public class AdministratorServiceImpl extends AbstractService implements
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
private List<CharacterID> online;
|
||||
|
||||
@Inject
|
||||
private ItemService itemService;
|
||||
|
||||
@Inject
|
||||
private ItemTemplateIDProvider itidProvider;
|
||||
|
||||
/**
|
||||
* @param spawnService
|
||||
@@ -66,7 +75,7 @@ public class AdministratorServiceImpl extends AbstractService implements
|
||||
@Override
|
||||
public void command(Lineage2Client conn, L2Character character,
|
||||
String command, String... args) throws NotSpawnedServiceException,
|
||||
CharacterAlreadyTeleportingServiceException {
|
||||
CharacterAlreadyTeleportingServiceException, ServiceException {
|
||||
log.debug("{} is opening admin control panel", character);
|
||||
switch (command) {
|
||||
case "tele":
|
||||
@@ -79,8 +88,12 @@ public class AdministratorServiceImpl extends AbstractService implements
|
||||
Integer.parseInt(args[1]),
|
||||
Integer.parseInt(args[2])));
|
||||
break;
|
||||
default:
|
||||
case "give":
|
||||
// conn.sendMessage( "adding " + itidProvider.resolveID(57).getTemplate().getName() );
|
||||
character.getInventory().add( itemService.create(itidProvider.resolveID(57).getTemplate(), 10000) );
|
||||
break;
|
||||
default:
|
||||
throw new ServiceException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ public class MapperPathingService extends AbstractService implements
|
||||
@Override
|
||||
protected void doStart() throws ServiceStartException {
|
||||
try {
|
||||
final java.nio.file.Path dbFile = vfsService.resolveDataFile(file);
|
||||
final java.nio.file.Path dbFile = vfsService.resolveDataFile(file.toString());
|
||||
this.channel = Files.newByteChannel(dbFile, CREATE, APPEND, WRITE);
|
||||
} catch (IOException e) {
|
||||
throw new ServiceStartException(
|
||||
|
||||
@@ -28,9 +28,9 @@ public enum ProtocolVersion {
|
||||
*/
|
||||
RELEASE(0),
|
||||
/**
|
||||
* The Interlude(200) version
|
||||
* The Interlude(746) version
|
||||
*/
|
||||
INTERLUDE(200, RELEASE),
|
||||
INTERLUDE(746, RELEASE),
|
||||
/**
|
||||
* The Freya(216) version
|
||||
*/
|
||||
@@ -39,7 +39,7 @@ public enum ProtocolVersion {
|
||||
* The High5(268) version
|
||||
*/
|
||||
HIGH5(268, FREYA);
|
||||
|
||||
|
||||
/**
|
||||
* The parent version
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user