Project cleanup pre merge.
This commit is contained in:
@@ -24,27 +24,27 @@ import engine.objects.PlayerCharacter;
|
||||
|
||||
public class GuildControlHandler extends AbstractClientMsgHandler {
|
||||
|
||||
public GuildControlHandler() {
|
||||
super(GuildControlMsg.class);
|
||||
}
|
||||
|
||||
// TODO Don't think this protocolMsg (0x3235E5EA) is actually player history. so
|
||||
// take further look at it.
|
||||
@Override
|
||||
protected boolean _handleNetMsg(ClientNetMsg baseMsg, ClientConnection origin) throws MsgSendException {
|
||||
GuildControlMsg msg = (GuildControlMsg) baseMsg;
|
||||
public GuildControlHandler() {
|
||||
super(GuildControlMsg.class);
|
||||
}
|
||||
|
||||
// TODO Don't think this protocolMsg (0x3235E5EA) is actually player history. so
|
||||
// take further look at it.
|
||||
@Override
|
||||
protected boolean _handleNetMsg(ClientNetMsg baseMsg, ClientConnection origin) throws MsgSendException {
|
||||
GuildControlMsg msg = (GuildControlMsg) baseMsg;
|
||||
Dispatch dispatch;
|
||||
|
||||
// until we know what it's for, just echo it back.
|
||||
msg.setUnknown05((byte) 1);
|
||||
// until we know what it's for, just echo it back.
|
||||
msg.setUnknown05((byte) 1);
|
||||
|
||||
//Send a GuildList msg
|
||||
if(msg.getUnknown01() == 1) {
|
||||
//Send a GuildList msg
|
||||
if (msg.getUnknown01() == 1) {
|
||||
|
||||
PlayerCharacter player = SessionManager.getPlayerCharacter(origin);
|
||||
//TODO figure out why GL can't be changed and IC can't be banished
|
||||
//Bounce back the rank options
|
||||
msg.setGM((byte) (GuildStatusController.isGuildLeader(player.getGuildStatus()) ? 1 : 0));
|
||||
PlayerCharacter player = SessionManager.getPlayerCharacter(origin);
|
||||
//TODO figure out why GL can't be changed and IC can't be banished
|
||||
//Bounce back the rank options
|
||||
msg.setGM((byte) (GuildStatusController.isGuildLeader(player.getGuildStatus()) ? 1 : 0));
|
||||
|
||||
dispatch = Dispatch.borrow(player, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY);
|
||||
@@ -52,23 +52,23 @@ public class GuildControlHandler extends AbstractClientMsgHandler {
|
||||
if (GuildStatusController.isInnerCouncil(player.getGuildStatus()) || GuildStatusController.isGuildLeader(player.getGuildStatus())) {
|
||||
dispatch = Dispatch.borrow(player, new GuildListMsg(player.getGuild()));
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY);
|
||||
} else
|
||||
} else
|
||||
ErrorPopupMsg.sendErrorMsg(player, "Only guild leader and inner council have such authority!");
|
||||
|
||||
|
||||
} else if(msg.getUnknown01() == 2) {
|
||||
PlayerCharacter player = SessionManager.getPlayerCharacter(origin);
|
||||
|
||||
//If we don't get a valid PC for whatever reason.. just ignore it.
|
||||
PlayerCharacter pc = PlayerCharacter.getFromCache(msg.getUnknown03());
|
||||
} else if (msg.getUnknown01() == 2) {
|
||||
PlayerCharacter player = SessionManager.getPlayerCharacter(origin);
|
||||
|
||||
if(pc != null) {
|
||||
dispatch = Dispatch.borrow(player,new GuildListMsg(pc));
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
//If we don't get a valid PC for whatever reason.. just ignore it.
|
||||
PlayerCharacter pc = PlayerCharacter.getFromCache(msg.getUnknown03());
|
||||
|
||||
if (pc != null) {
|
||||
dispatch = Dispatch.borrow(player, new GuildListMsg(pc));
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user