gm限制
parent
52aa71a362
commit
be16318ce5
|
|
@ -28,6 +28,8 @@ public class ServerProperties {
|
||||||
|
|
||||||
private boolean autoOpen;
|
private boolean autoOpen;
|
||||||
|
|
||||||
|
private boolean debug;
|
||||||
|
|
||||||
public int getId() {
|
public int getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
@ -108,6 +110,14 @@ public class ServerProperties {
|
||||||
this.autoOpen = autoOpen;
|
this.autoOpen = autoOpen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isDebug() {
|
||||||
|
return debug;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDebug(boolean debug) {
|
||||||
|
this.debug = debug;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "ServerProperties{" +
|
return "ServerProperties{" +
|
||||||
|
|
@ -120,6 +130,8 @@ public class ServerProperties {
|
||||||
", sendlog37=" + sendlog37 +
|
", sendlog37=" + sendlog37 +
|
||||||
", guildFight =" + guildFight +
|
", guildFight =" + guildFight +
|
||||||
", areaId="+areaId+
|
", areaId="+areaId+
|
||||||
|
", autoOpen="+autoOpen+
|
||||||
|
", debug="+debug+
|
||||||
'}';
|
'}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import com.ljsd.jieling.config.clazzStaticCfg.HeroStaticConfig;
|
||||||
import com.ljsd.jieling.core.GlobalsDef;
|
import com.ljsd.jieling.core.GlobalsDef;
|
||||||
import com.ljsd.jieling.db.redis.RedisKey;
|
import com.ljsd.jieling.db.redis.RedisKey;
|
||||||
import com.ljsd.jieling.db.redis.RedisUtil;
|
import com.ljsd.jieling.db.redis.RedisUtil;
|
||||||
|
import com.ljsd.jieling.exception.ErrorCodeException;
|
||||||
import com.ljsd.jieling.globals.BIReason;
|
import com.ljsd.jieling.globals.BIReason;
|
||||||
import com.ljsd.jieling.globals.Global;
|
import com.ljsd.jieling.globals.Global;
|
||||||
import com.ljsd.jieling.globals.GlobalGm;
|
import com.ljsd.jieling.globals.GlobalGm;
|
||||||
|
|
@ -48,6 +49,9 @@ public class GMRequestHandler extends BaseHandler{
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void process(ISession iSession, PacketNetData netData) throws Exception {
|
public void process(ISession iSession, PacketNetData netData) throws Exception {
|
||||||
|
if(!GameApplication.serverProperties.isDebug()){
|
||||||
|
throw new ErrorCodeException("In a formal setting");
|
||||||
|
}
|
||||||
byte[] message = netData.parseClientProtoNetData();
|
byte[] message = netData.parseClientProtoNetData();
|
||||||
CommonProto.GMCommand gmCommand = CommonProto.GMCommand.parseFrom(message);
|
CommonProto.GMCommand gmCommand = CommonProto.GMCommand.parseFrom(message);
|
||||||
String command = gmCommand.getCommand();
|
String command = gmCommand.getCommand();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue