package com.aelfengard.i3.packet;
import java.util.List;
import com.aelfengard.i3.LPCUtils;
import com.aelfengard.i3.LPCMixed;
import com.aelfengard.i3.MudInfo;
public class StartupReq3Packet extends I3Packet {
public static final String TOKEN = "startup-req-3";
private LPCMixed originatorMudName = new LPCMixed("");
private LPCMixed targetMudName = new LPCMixed("");
private LPCMixed oldMudlistId = new LPCMixed(-1);
private LPCMixed oldChanlistId = new LPCMixed(-1);
private LPCMixed password = new LPCMixed(-1);
private MudInfo mudInfo = new MudInfo();
public StartupReq3Packet() {
super(I3Packet.Type.STARTUP_REQ);
}
public StartupReq3Packet(List<LPCMixed> args) {
this();
originatorMudName = args.get(2);
targetMudName = args.get(4);
password = args.get(6);
oldMudlistId = args.get(7);
oldChanlistId = args.get(8);
mudInfo.setPlayerPort(args.get(9));
mudInfo.setMudLib(args.get(12));
mudInfo.setBaseMudLib(args.get(13));
mudInfo.setDriver(args.get(14));
mudInfo.setMudType(args.get(15));
mudInfo.setOpenStatus(args.get(16));
mudInfo.setAdminEmail(args.get(17));
mudInfo.setServices(args.get(18));
mudInfo.setOtherData(args.get(19));
}
public List<LPCMixed> toList() {
return LPCUtils.makeList(
TOKEN,
5, originatorMudName,
0, targetMudName,
0, password,
oldMudlistId, oldChanlistId, mudInfo.getPlayerPort(),
0, 0, mudInfo.getMudLib(),
mudInfo.getBaseMudLib(),
mudInfo.getDriver(),
mudInfo.getMudType(),
mudInfo.getOpenStatus(),
mudInfo.getAdminEmail(),
mudInfo.getServices(),
mudInfo.getOtherData()
);
}
public MudInfo getMudInfo() {
return mudInfo;
}
public void setMudInfo(MudInfo mudInfo) {
this.mudInfo = mudInfo;
}
public LPCMixed getOldChanlistId() {
return oldChanlistId;
}
public void setOldChanlistId(LPCMixed oldChanlistId) {
this.oldChanlistId = oldChanlistId;
}
public LPCMixed getOldMudlistId() {
return oldMudlistId;
}
public void setOldMudlistId(LPCMixed oldMudlistId) {
this.oldMudlistId = oldMudlistId;
}
public LPCMixed getOriginatorMudName() {
return originatorMudName;
}
public void setOriginatorMudName(LPCMixed originatorMudName) {
this.originatorMudName = originatorMudName;
}
public LPCMixed getPassword() {
return password;
}
public void setPassword(LPCMixed password) {
this.password = password;
}
public LPCMixed getTargetMudName() {
return targetMudName;
}
public void setTargetMudName(LPCMixed targetMudName) {
this.targetMudName = targetMudName;
}
}