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:
@@ -27,6 +27,7 @@ import java.awt.Point;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import server.life.MapleMonster;
|
||||
import server.life.MapleMonsterInformationProvider;
|
||||
//import server.life.MobAttackInfo;
|
||||
//import server.life.MobAttackInfoFactory;
|
||||
import server.life.MobSkill;
|
||||
@@ -94,20 +95,27 @@ public final class MoveLifeHandler extends AbstractMovementPacketHandler {
|
||||
} else if (toUse.getHP() < percHpLeft) {
|
||||
toUse = null;
|
||||
} else if (monster.canUseSkill(toUse)) {
|
||||
toUse.applyEffect(c.getPlayer(), monster, true, banishPlayers);
|
||||
int animationTime = MapleMonsterInformationProvider.getInstance().getMobSkillAnimationTime(monster.getId(), Random);
|
||||
if(animationTime > 0) {
|
||||
toUse.applyDelayedEffect(c.getPlayer(), monster, true, banishPlayers, animationTime);
|
||||
} else {
|
||||
toUse.applyEffect(c.getPlayer(), monster, true, banishPlayers);
|
||||
}
|
||||
} else {
|
||||
toUse = null;
|
||||
}
|
||||
} else {
|
||||
toUse = null; // paliative measure for suspicious mob movement
|
||||
|
||||
/*
|
||||
long curtime = System.currentTimeMillis();
|
||||
if(curtime >= monster.getNextBasicSkillTime()) { // dont use the special attack too often, chase the player f3
|
||||
//MobAttackInfo mobAttack = MobAttackInfoFactory.getMobAttackInfo(monster, attackId);
|
||||
//monster.setNextBasicSkillTime(curtime);
|
||||
|
||||
toUse = null; // paliative measure for suspicious mob movement
|
||||
MobAttackInfo mobAttack = MobAttackInfoFactory.getMobAttackInfo(monster, attackId);
|
||||
monster.setNextBasicSkillTime(curtime);
|
||||
} else {
|
||||
toUse = null;
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user