forked from MagicBane/Server
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.4 KiB
45 lines
1.4 KiB
package engine.net.client.handlers; |
|
|
|
import engine.exception.MsgSendException; |
|
import engine.gameManager.DispatchManager; |
|
import engine.mbEnums.DispatchChannel; |
|
import engine.net.Dispatch; |
|
import engine.net.client.ClientConnection; |
|
import engine.net.client.msg.ArcOwnedMinesListMsg; |
|
import engine.net.client.msg.ClientNetMsg; |
|
import engine.objects.GuildStatusController; |
|
import engine.objects.Mine; |
|
import engine.objects.PlayerCharacter; |
|
|
|
/* |
|
* @Author: |
|
* @Summary: Processes application protocol message which keeps |
|
* client's tcp connection open. |
|
*/ |
|
|
|
public class ArcOwnedMinesListHandler extends AbstractClientMsgHandler { |
|
|
|
public ArcOwnedMinesListHandler() { |
|
super(); |
|
} |
|
|
|
@Override |
|
protected boolean _handleNetMsg(ClientNetMsg baseMsg, ClientConnection origin) throws MsgSendException { |
|
|
|
PlayerCharacter playerCharacter = origin.getPlayerCharacter(); |
|
ArcOwnedMinesListMsg msg = (ArcOwnedMinesListMsg) baseMsg; |
|
|
|
if (playerCharacter == null) |
|
return true; |
|
|
|
if (GuildStatusController.isInnerCouncil(playerCharacter.getGuildStatus()) == false)// is this only GL? |
|
return true; |
|
|
|
msg.setMineList(Mine.getMinesForGuild(playerCharacter.getGuild().getObjectUUID())); |
|
Dispatch dispatch = Dispatch.borrow(playerCharacter, msg); |
|
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY); |
|
|
|
return true; |
|
} |
|
|
|
} |