Quick patch for the last commit
Fixed some bugs that appeared with the last commit. Added more info on the event functions documentation.
This commit is contained in:
@@ -719,7 +719,7 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
|
||||
}
|
||||
}
|
||||
|
||||
public void setLastCombo(long time) {;
|
||||
public void setLastCombo(long time) {
|
||||
lastcombo = time;
|
||||
}
|
||||
|
||||
@@ -1128,8 +1128,6 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
|
||||
}
|
||||
|
||||
public void changeMap(int map, int portal) {
|
||||
eventChangedMap(map);
|
||||
|
||||
MapleMap warpMap;
|
||||
if (getEventInstance() != null) {
|
||||
warpMap = getEventInstance().getMapInstance(map);
|
||||
@@ -1141,8 +1139,6 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
|
||||
}
|
||||
|
||||
public void changeMap(int map, String portal) {
|
||||
eventChangedMap(map);
|
||||
|
||||
MapleMap warpMap;
|
||||
if (getEventInstance() != null) {
|
||||
warpMap = getEventInstance().getMapInstance(map);
|
||||
@@ -1154,8 +1150,6 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
|
||||
}
|
||||
|
||||
public void changeMap(int map, MaplePortal portal) {
|
||||
eventChangedMap(map);
|
||||
|
||||
MapleMap warpMap;
|
||||
if (getEventInstance() != null) {
|
||||
warpMap = getEventInstance().getMapInstance(map);
|
||||
@@ -1171,6 +1165,7 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
|
||||
}
|
||||
|
||||
public void changeMap(final MapleMap to, final MaplePortal pto) {
|
||||
eventChangedMap(to.getId());
|
||||
changeMapInternal(to, pto.getPosition(), MaplePacketCreator.getWarpToMap(to, pto.getId(), this));
|
||||
}
|
||||
|
||||
|
||||
@@ -303,6 +303,12 @@ public class EventInstanceManager {
|
||||
public void unregisterPlayer(MapleCharacter chr) {
|
||||
wL.lock();
|
||||
try {
|
||||
try {
|
||||
em.getIv().invokeFunction("playerUnregistered", EventInstanceManager.this, chr);
|
||||
} catch (ScriptException | NoSuchMethodException ex) {
|
||||
Logger.getLogger(EventManager.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
chars.remove(chr);
|
||||
gridRemove(chr);
|
||||
dropExclusiveItems(chr);
|
||||
@@ -554,12 +560,8 @@ public class EventInstanceManager {
|
||||
return props;
|
||||
}
|
||||
|
||||
public Integer getIntProperty(String key) {
|
||||
try {
|
||||
return Integer.parseInt(props.getProperty(key));
|
||||
} catch(Exception e) {
|
||||
return null;
|
||||
}
|
||||
public int getIntProperty(String key) {
|
||||
return Integer.parseInt(props.getProperty(key));
|
||||
}
|
||||
|
||||
public void leftParty(MapleCharacter chr) {
|
||||
|
||||
Reference in New Issue
Block a user