- UID
- 286271
- 帖子
- 42
- 主題
- 31
- 精華
- 0
- 積分
- 31
- 楓幣
- 507
- 威望
- 31
- 存款
- 0
- 贊助金額
- 0
- 推廣
- 0
- GP
- 31
- 閱讀權限
- 10
- 性別
- 保密
- 在線時間
- 2 小時
- 註冊時間
- 2020-7-12
- 最後登入
- 2021-4-13
|
点TRADE进入自由市场
打开\src\net\sf\odinms\net\channel\handler\EnterMTSHandler.java
找到
package net.sf.odinms.net.channel.handler;
import net.sf.odinms.client.MapleClient;
import net.sf.odinms.client.messages.ServernoticeMapleClientMessageCallback;
import net.sf.odinms.net.AbstractMaplePacketHandler;
import net.sf.odinms.tools.MaplePacketCreator;
import net.sf.odinms.tools.data.input.SeekableLittleEndianAccessor;
改成
package net.sf.odinms.net.channel.handler;
import net.sf.odinms.client.MapleClient;
import net.sf.odinms.client.messages.ServernoticeMapleClientMessageCallback;
import net.sf.odinms.net.AbstractMaplePacketHandler;
import net.sf.odinms.tools.MaplePacketCreator;
import net.sf.odinms.tools.data.input.SeekableLittleEndianAccessor;
import net.sf.odinms.net.channel.ChannelServer;
import net.sf.odinms.server.MaplePortal;
import net.sf.odinms.server.maps.MapleMap;
import net.sf.odinms.server.maps.SavedLocationType;
找到
public class EnterMTSHandler extends AbstractMaplePacketHandler {
@Override
public void handlePacket(SeekableLittleEndianAccessor slea, MapleClient c) {
new ServernoticeMapleClientMessageCallback(5, c).dropMessage("The MTS is not available");
c.getSession().write(MaplePacketCreator.enableActions());
}
}
改成
public class EnterMTSHandler extends AbstractMaplePacketHandler {
@Override
public void handlePacket(SeekableLittleEndianAccessor slea, MapleClient c) {
if ((c.getPlayer().getMapId() < 910000000) || (c.getPlayer().getMapId() > 910000022)){
new ServernoticeMapleClientMessageCallback(5, c).dropMessage("艾恩仙人用神力将你传送到自由市场,这里有超级传送!");
c.getSession().write(MaplePacketCreator.enableActions());
MapleMap to;
MaplePortal pto;
to = ChannelServer.getInstance(c.getChannel()).getMapFactory().getMap(910000000);
c.getPlayer().saveLocation(SavedLocationType.FREE_MARKET);
pto = to.getPortal("out00"); // or st00?
c.getPlayer().changeMap(to, pto);
} else {
new ServernoticeMapleClientMessageCallback(5, c).dropMessage("你已经是在自由市场了,你还想干什么!");
c.getSession().write(MaplePacketCreator.enableActions());
}
}
}
|
|