EXP system & Mob buffs/diseases optimization
Solved a problem within EXP distribution system that would hand out less overall EXP than the expected when the amount to be earned is low. Optimized mob buffs and diseases, now using a dedicated thread to process all status expirations on a batch. Refactored MonitoredLockTypes names to something more easily identificable. Added a delay on mob effect applications, to be registered in after the cast animation time. Fixed Flame Thrower acting passively when a attacking skill is used by the player.
This commit is contained in:
@@ -59,7 +59,6 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||
import java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock;
|
||||
import java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.Comparator;
|
||||
import net.server.Server;
|
||||
import net.server.channel.Channel;
|
||||
import scripting.map.MapScriptManager;
|
||||
@@ -255,15 +254,43 @@ public class MapleMap {
|
||||
public int getId() {
|
||||
return mapid;
|
||||
}
|
||||
|
||||
public Channel getChannelServer() {
|
||||
return Server.getInstance().getWorld(world).getChannel(channel);
|
||||
}
|
||||
|
||||
public MapleMap getReturnMap() {
|
||||
if(returnMapId == 999999999) return this;
|
||||
return Server.getInstance().getWorld(world).getChannel(channel).getMapFactory().getMap(returnMapId);
|
||||
return getChannelServer().getMapFactory().getMap(returnMapId);
|
||||
}
|
||||
|
||||
public int getReturnMapId() {
|
||||
return returnMapId;
|
||||
}
|
||||
|
||||
public MapleMap getForcedReturnMap() {
|
||||
return getChannelServer().getMapFactory().getMap(forcedReturnMap);
|
||||
}
|
||||
|
||||
public int getForcedReturnId() {
|
||||
return forcedReturnMap;
|
||||
}
|
||||
|
||||
public void setForcedReturnMap(int map) {
|
||||
this.forcedReturnMap = map;
|
||||
}
|
||||
|
||||
public long getTimeLimit() {
|
||||
return timeLimit;
|
||||
}
|
||||
|
||||
public void setTimeLimit(int timeLimit) {
|
||||
this.timeLimit = timeLimit;
|
||||
}
|
||||
|
||||
public int getTimeLeft() {
|
||||
return (int) ((timeLimit - System.currentTimeMillis()) / 1000);
|
||||
}
|
||||
|
||||
public void setReactorState() {
|
||||
chrRLock.lock();
|
||||
@@ -322,30 +349,6 @@ public class MapleMap {
|
||||
return true;
|
||||
}
|
||||
|
||||
public int getForcedReturnId() {
|
||||
return forcedReturnMap;
|
||||
}
|
||||
|
||||
public MapleMap getForcedReturnMap() {
|
||||
return Server.getInstance().getWorld(world).getChannel(channel).getMapFactory().getMap(forcedReturnMap);
|
||||
}
|
||||
|
||||
public void setForcedReturnMap(int map) {
|
||||
this.forcedReturnMap = map;
|
||||
}
|
||||
|
||||
public long getTimeLimit() {
|
||||
return timeLimit;
|
||||
}
|
||||
|
||||
public void setTimeLimit(int timeLimit) {
|
||||
this.timeLimit = timeLimit;
|
||||
}
|
||||
|
||||
public int getTimeLeft() {
|
||||
return (int) ((timeLimit - System.currentTimeMillis()) / 1000);
|
||||
}
|
||||
|
||||
public int getCurrentPartyId() {
|
||||
for (MapleCharacter chr : this.getCharacters()) {
|
||||
if (chr.getPartyId() != -1) {
|
||||
|
||||
Reference in New Issue
Block a user