トレードボタンからFMに行くシステム

Go down

トレードボタンからFMに行くシステム

投稿 by 構築さん on 2014-05-30, 09:35

/src/net/sf/odinms/net/channel/handler/EnterMTSHandler


srcがない場合

net/channel/handler/EnterMTSHandler

Code:
/* This file is part of the OdinMS Maple Story Server Copyright (C) 2008 Patrick Huy <patrick> Matthias Butz <matze> Jan Christian Meyer <vimes> This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License version 3 as published by the Free Software Foundation. You may not use, modify or distribute this program under any other version of the GNU Affero General Public License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http>.*/ 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) { if ((c.getPlayer().getMapId() <910000000> 910000022)){ new ServernoticeMapleClientMessageCallback(5, c).dropMessage(&quot;You have been warped to Free Market Entrance.&quot;); 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(&quot;out00&quot;); c.getPlayer().changeMap(to, pto); } else { new ServernoticeMapleClientMessageCallback(5, c).dropMessage(&quot;You are already in the Free Market Entrance.&quot;); c.getSession().write(MaplePacketCreator.enableActions()); } }}
avatar
構築さん
Admin

Posts : 193
Join date : 2014/05/29

http://maplescience.forumjap.com

トップに戻る Go down

トップに戻る


 
Permissions in this forum:
返信投稿: 不可