ServerlistRequestHandler.java
资源名称:src.rar [点击查看]
上传用户:gwt600
上传日期:2021-06-03
资源大小:704k
文件大小:1k
源码类别:
游戏
开发平台:
Java
- package net.sf.odinms.net.login.handler;
- import net.sf.odinms.client.MapleClient;
- import net.sf.odinms.net.AbstractMaplePacketHandler;
- import net.sf.odinms.net.login.LoginServer;
- import net.sf.odinms.tools.MaplePacketCreator;
- import net.sf.odinms.tools.data.input.SeekableLittleEndianAccessor;
- public class ServerlistRequestHandler extends AbstractMaplePacketHandler {
- @Override
- public void handlePacket(SeekableLittleEndianAccessor slea, MapleClient c) {
- for (int i = 0; i < LoginServer.getInstance().numberOfWorlds(); i++) {
- c.getSession().write(MaplePacketCreator.getServerList(i, LoginServer.getInstance().getServerName() + " 涓栫晫 " + i, LoginServer.getInstance().getLoad()));
- c.getSession().write(MaplePacketCreator.getEndOfServerList());
- }
- }
- }