Return map & MaplePacketEncoder & Quest status patch
Fixed null pointer issue when trying to use return scroll on maps such as Mu Lung. Fixed a critical deadlock issue with MaplePacketEncoder. Fixed a critical DB leak regarding player's quest status.
This commit is contained in:
@@ -22,7 +22,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
package net.mina;
|
||||
|
||||
import client.MapleClient;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import org.apache.mina.core.buffer.IoBuffer;
|
||||
import org.apache.mina.core.session.IoSession;
|
||||
import org.apache.mina.filter.codec.ProtocolEncoder;
|
||||
@@ -36,7 +35,7 @@ public class MaplePacketEncoder implements ProtocolEncoder {
|
||||
final MapleClient client = (MapleClient) session.getAttribute(MapleClient.CLIENT_KEY);
|
||||
|
||||
try {
|
||||
client.lockClient();
|
||||
client.lockEncoder();
|
||||
try {
|
||||
final MapleAESOFB send_crypto = client.getSendCrypto();
|
||||
final byte[] input = (byte[]) message;
|
||||
@@ -52,7 +51,7 @@ public class MaplePacketEncoder implements ProtocolEncoder {
|
||||
|
||||
out.write(IoBuffer.wrap(ret));
|
||||
} finally {
|
||||
client.unlockClient();
|
||||
client.unlockEncoder();
|
||||
}
|
||||
// System.arraycopy(unencrypted, 0, ret, 4, unencrypted.length);
|
||||
// out.write(ByteBuffer.wrap(ret));
|
||||
|
||||
@@ -44,6 +44,7 @@ public final class ItemPickupHandler extends AbstractMaplePacketHandler {
|
||||
int oid = slea.readInt();
|
||||
MapleCharacter chr = c.getPlayer();
|
||||
MapleMapObject ob = chr.getMap().getMapObject(oid);
|
||||
if(ob == null) return;
|
||||
|
||||
Point charPos = chr.getPosition();
|
||||
Point obPos = ob.getPosition();
|
||||
|
||||
Reference in New Issue
Block a user