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:
@@ -3877,12 +3877,13 @@ public class MaplePacketCreator {
|
||||
}
|
||||
|
||||
public static byte[] applyMonsterStatus(final int oid, final MonsterStatusEffect mse, final List<Integer> reflection) {
|
||||
Map<MonsterStatus, Integer> stati = mse.getStati();
|
||||
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
|
||||
mplew.writeShort(SendOpcode.APPLY_MONSTER_STATUS.getValue());
|
||||
mplew.writeInt(oid);
|
||||
mplew.writeLong(0);
|
||||
writeIntMask(mplew, mse.getStati());
|
||||
for (Map.Entry<MonsterStatus, Integer> stat : mse.getStati().entrySet()) {
|
||||
writeIntMask(mplew, stati);
|
||||
for (Map.Entry<MonsterStatus, Integer> stat : stati.entrySet()) {
|
||||
mplew.writeShort(stat.getValue());
|
||||
if (mse.isMonsterSkill()) {
|
||||
mplew.writeShort(mse.getMobSkill().getSkillId());
|
||||
@@ -3892,7 +3893,7 @@ public class MaplePacketCreator {
|
||||
}
|
||||
mplew.writeShort(-1); // might actually be the buffTime but it's not displayed anywhere
|
||||
}
|
||||
int size = mse.getStati().size(); // size
|
||||
int size = stati.size(); // size
|
||||
if (reflection != null) {
|
||||
for (Integer ref : reflection) {
|
||||
mplew.writeInt(ref);
|
||||
|
||||
Reference in New Issue
Block a user