Pooled Io Write + EXP loss & Detached morph patch + Storages in World
Fixed autocommit getting called early/unavailable in a few catch blocks, when trying to save player. Fixed the missing variable declaration in several quest scripts that were recently formatted. Reworked the EXP loss formula applied at a knock-out. The new formula follows past discussions in several MS forums. Fixed a deadlock issue related with party HP and party doors management. Refactored management of packets sent to client through an IoSession. New system no longer makes use of a synchronized statement when calling announce(packet), rather makes use of dedicated threads to send queued packets for the respective players. Fixed SP reset allowing increase of unexpected skills. Refactored storages, no longer instantiated as coupled with the character, rather instantiated in a map within the world object, with accountid as key. Reviewed usage of character objects of offline party members, that weren't being properly checked. Fixed some unexpected cases with buffs and morphs (within the enhanced buff system) making the latter show up as another morph figure. Added a "priority buff" perspective within the enhanced buff system, to let such priority items/skills take awareness over other buffs. (This would be vital for some quests, as the one reported in #514 ) Fixed EXP gains in certain scenarios showing up with less amount than the expected (due to float point operations). Fixed a critical bug that have emerged in a recent mount-skill update, issue happened due to an improper object initialization. Fixed mount information packet not being relayed to the player at world login time, rendering some quests not startable until the mob levels up.
This commit is contained in:
@@ -22,7 +22,6 @@
|
||||
package server.maps;
|
||||
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import server.MaplePortal;
|
||||
import server.TimerManager;
|
||||
|
||||
public class MapMonitor {
|
||||
|
||||
@@ -25,7 +25,6 @@ import java.awt.Point;
|
||||
import java.util.Collection;
|
||||
import tools.Pair;
|
||||
|
||||
import server.MaplePortal;
|
||||
import client.MapleCharacter;
|
||||
import constants.ServerConstants;
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@ import client.MapleCharacter;
|
||||
import constants.GameConstants;
|
||||
import java.awt.Point;
|
||||
import scripting.portal.PortalScriptManager;
|
||||
import server.MaplePortal;
|
||||
import tools.MaplePacketCreator;
|
||||
import net.server.audit.locks.MonitoredLockType;
|
||||
import net.server.audit.locks.MonitoredReentrantLock;
|
||||
|
||||
@@ -68,7 +68,6 @@ import net.server.channel.Channel;
|
||||
import net.server.world.World;
|
||||
import scripting.map.MapScriptManager;
|
||||
import server.MapleItemInformationProvider;
|
||||
import server.MaplePortal;
|
||||
import server.MapleStatEffect;
|
||||
import server.TimerManager;
|
||||
import server.events.gm.MapleCoconut;
|
||||
|
||||
@@ -35,7 +35,6 @@ import provider.MapleData;
|
||||
import provider.MapleDataProvider;
|
||||
import provider.MapleDataProviderFactory;
|
||||
import provider.MapleDataTool;
|
||||
import server.PortalFactory;
|
||||
import server.life.AbstractLoadedMapleLife;
|
||||
import server.life.MapleLifeFactory;
|
||||
import server.life.MapleMonster;
|
||||
@@ -163,7 +162,7 @@ public class MapleMapFactory {
|
||||
|
||||
map.setFieldLimit(MapleDataTool.getInt(infoData.getChildByPath("fieldLimit"), 0));
|
||||
map.setMobInterval((short) MapleDataTool.getInt(infoData.getChildByPath("createMobInterval"), 5000));
|
||||
PortalFactory portalFactory = new PortalFactory();
|
||||
MaplePortalFactory portalFactory = new MaplePortalFactory();
|
||||
for (MapleData portal : mapData.getChildByPath("portal")) {
|
||||
map.addPortal(portalFactory.makePortal(MapleDataTool.getInt(portal.getChildByPath("pt")), portal));
|
||||
}
|
||||
|
||||
@@ -21,8 +21,6 @@
|
||||
*/
|
||||
package server.maps;
|
||||
|
||||
import server.MaplePortal;
|
||||
|
||||
public class MapleMapPortal extends MapleGenericPortal {
|
||||
public MapleMapPortal() {
|
||||
super(MaplePortal.MAP_PORTAL);
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
This file is part of the OdinMS Maple Story Server
|
||||
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
|
||||
Matthias Butz <matze@odinms.de>
|
||||
Jan Christian Meyer <vimes@odinms.de>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation 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://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package server.maps;
|
||||
|
||||
import java.awt.Point;
|
||||
import client.MapleClient;
|
||||
|
||||
public interface MaplePortal {
|
||||
public final int TELEPORT_PORTAL = 1;
|
||||
public final int MAP_PORTAL = 2;
|
||||
public final int DOOR_PORTAL = 6;
|
||||
public static boolean OPEN = true;
|
||||
public static boolean CLOSED = false;
|
||||
int getType();
|
||||
int getId();
|
||||
Point getPosition();
|
||||
String getName();
|
||||
String getTarget();
|
||||
String getScriptName();
|
||||
void setScriptName(String newName);
|
||||
void setPortalStatus(boolean newStatus);
|
||||
boolean getPortalStatus();
|
||||
int getTargetMapId();
|
||||
void enterPortal(MapleClient c);
|
||||
void setPortalState(boolean state);
|
||||
boolean getPortalState();
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
This file is part of the OdinMS Maple Story Server
|
||||
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
|
||||
Matthias Butz <matze@odinms.de>
|
||||
Jan Christian Meyer <vimes@odinms.de>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation 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://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package server.maps;
|
||||
|
||||
import java.awt.Point;
|
||||
|
||||
import provider.MapleData;
|
||||
import provider.MapleDataTool;
|
||||
import server.maps.MapleGenericPortal;
|
||||
import server.maps.MapleMapPortal;
|
||||
|
||||
public class MaplePortalFactory {
|
||||
private int nextDoorPortal;
|
||||
|
||||
public MaplePortalFactory() {
|
||||
nextDoorPortal = 0x80;
|
||||
}
|
||||
|
||||
public MaplePortal makePortal(int type, MapleData portal) {
|
||||
MapleGenericPortal ret = null;
|
||||
if (type == MaplePortal.MAP_PORTAL) {
|
||||
ret = new MapleMapPortal();
|
||||
} else {
|
||||
ret = new MapleGenericPortal(type);
|
||||
}
|
||||
loadPortal(ret, portal);
|
||||
return ret;
|
||||
}
|
||||
|
||||
private void loadPortal(MapleGenericPortal myPortal, MapleData portal) {
|
||||
myPortal.setName(MapleDataTool.getString(portal.getChildByPath("pn")));
|
||||
myPortal.setTarget(MapleDataTool.getString(portal.getChildByPath("tn")));
|
||||
myPortal.setTargetMapId(MapleDataTool.getInt(portal.getChildByPath("tm")));
|
||||
int x = MapleDataTool.getInt(portal.getChildByPath("x"));
|
||||
int y = MapleDataTool.getInt(portal.getChildByPath("y"));
|
||||
myPortal.setPosition(new Point(x, y));
|
||||
String script = MapleDataTool.getString("script", portal, null);
|
||||
if (script != null && script.equals("")) {
|
||||
script = null;
|
||||
}
|
||||
myPortal.setScriptName(script);
|
||||
if (myPortal.getType() == MaplePortal.DOOR_PORTAL) {
|
||||
myPortal.setId(nextDoorPortal);
|
||||
nextDoorPortal++;
|
||||
} else {
|
||||
myPortal.setId(Integer.parseInt(portal.getName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user