TA的每日心情 | 开心 2024-11-6 23:36 |
---|
签到天数: 319 天 [LV.8]以坛为家I

管理员
  
- 积分
- 86133
|
由于聊天按钮都是被拿来当作解卡的,所以我把他改成按下按钮后移动到自由市场,
同时也可以跟拍卖快捷菜单共存,无需将拍卖按钮改成移动到自由市场
修改方法:
到handling.channel.handler的PlayersHandler节点
1.在适当的位置添加下面该段代码
- import tools.data.input.SeekableLittleEndianAccessor;
- import server.MaplePortal;
- import server.maps.MapleMap;
- import server.maps.SavedLocationType;
- import handling.channel.ChannelServer;
复制代码
2.再找到
- public static void ChatRoomHandler(final SeekableLittleEndianAccessor slea, final MapleClient c) {
复制代码
跟
- }
- public static void UseDoor(final SeekableLittleEndianAccessor slea, final MapleCharacter chr) {
复制代码
将这两段代码之间的代码改成
- if ((c.getPlayer().getMapId() < 910000000) || (c.getPlayer().getMapId() > 910000022)){
-
- //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 {
-
- //c.getSession().write(MaplePacketCreator.enableActions());
- }
复制代码
最终结果需为
- public static void ChatRoomHandler(final SeekableLittleEndianAccessor slea, final MapleClient c) {
- if ((c.getPlayer().getMapId() < 910000000) || (c.getPlayer().getMapId() > 910000022)){
-
- //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 {
-
- //c.getSession().write(MaplePacketCreator.enableActions());
- }
-
- }
复制代码
|
|