Revamped buff system + skill cd/buff schedule rework
Completely rearranged buff system (system can smartly check for the best statup to take effect for it's duration, or the server can be flagged to act as usual). Refactored scheduling system for buffs expiration and cooldowns to use one single thread per player rather than one per instance.
This commit is contained in:
@@ -48,7 +48,7 @@ public enum MapleBuffStat {
|
||||
AURA(0x40000L),
|
||||
CONFUSE(0x80000L),
|
||||
|
||||
// ---- COUPON feature (was unused anyway) ----
|
||||
// ------ COUPON feature ------
|
||||
|
||||
COUPON_EXP1(0x100000L),
|
||||
COUPON_EXP2(0x200000L),
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1307,7 +1307,9 @@ public class MapleClient {
|
||||
}
|
||||
}
|
||||
server.getPlayerBuffStorage().addBuffsToStorage(player.getId(), player.getAllBuffs());
|
||||
player.cancelBuffEffects();
|
||||
player.cancelAllBuffs(true);
|
||||
player.cancelBuffExpireTask();
|
||||
player.cancelSkillCooldownTask();
|
||||
//Cancelling magicdoor? Nope
|
||||
//Cancelling mounts? Noty
|
||||
if (player.getBuffedValue(MapleBuffStat.PUPPET) != null) {
|
||||
|
||||
@@ -1252,9 +1252,12 @@ public class Commands {
|
||||
}
|
||||
}
|
||||
|
||||
if(player.getJob().isA(MapleJob.ARAN1)) {
|
||||
if(player.getJob().isA(MapleJob.ARAN1) || player.getJob().isA(MapleJob.LEGEND)) {
|
||||
skill = SkillFactory.getSkill(5001005);
|
||||
player.changeSkillLevel(skill, (byte) -1, -1, -1);
|
||||
} else {
|
||||
skill = SkillFactory.getSkill(21001001);
|
||||
player.changeSkillLevel(skill, (byte) -1, -1, -1);
|
||||
}
|
||||
|
||||
player.yellowMessage("Skills maxed out.");
|
||||
@@ -1664,7 +1667,7 @@ public class Commands {
|
||||
|
||||
case "givems":
|
||||
if (sub.length < 3){
|
||||
player.yellowMessage("Syntax: !givems <playername> <gainmx>");
|
||||
player.yellowMessage("Syntax: !givems <playername> <gainms>");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2051,7 +2054,7 @@ public class Commands {
|
||||
try {
|
||||
if (sub.length == 2) {
|
||||
int itemId = Integer.parseInt(sub[1]);
|
||||
if(!(itemId >= 30000 && itemId < 32000) || MapleItemInformationProvider.getInstance().getName(itemId) == null) {
|
||||
if(!(itemId >= 30000 && itemId < 35000) || MapleItemInformationProvider.getInstance().getName(itemId) == null) {
|
||||
player.yellowMessage("Hair id '" + sub[1] + "' does not exist.");
|
||||
break;
|
||||
}
|
||||
@@ -2061,7 +2064,7 @@ public class Commands {
|
||||
player.equipChanged();
|
||||
} else {
|
||||
int itemId = Integer.parseInt(sub[2]);
|
||||
if(!(itemId >= 30000 && itemId < 32000) || MapleItemInformationProvider.getInstance().getName(itemId) == null) {
|
||||
if(!(itemId >= 30000 && itemId < 35000) || MapleItemInformationProvider.getInstance().getName(itemId) == null) {
|
||||
player.yellowMessage("Hair id '" + sub[2] + "' does not exist.");
|
||||
break;
|
||||
}
|
||||
@@ -2278,6 +2281,7 @@ public class Commands {
|
||||
player.getMap().spawnMonsterOnGroundBelow(monster, player.getPosition());
|
||||
break;
|
||||
|
||||
/*
|
||||
case "playernpc":
|
||||
if (sub.length < 3){
|
||||
player.yellowMessage("Syntax: !playernpc <playername> <npcid>");
|
||||
@@ -2285,6 +2289,7 @@ public class Commands {
|
||||
}
|
||||
player.playerNPC(c.getChannelServer().getPlayerStorage().getCharacterByName(sub[1]), Integer.parseInt(sub[2]));
|
||||
break;
|
||||
*/
|
||||
|
||||
default:
|
||||
return false;
|
||||
|
||||
@@ -487,11 +487,11 @@ public class Equip extends Item {
|
||||
// from level 1 to 2 is killing about 100~200 mobs of the same level range, on a 1x EXP rate scenario.
|
||||
|
||||
if(reqLevel >= 78) {
|
||||
return Math.max(ServerConstants.EQUIP_EXPERIENCE_MOD * (10413.648 * Math.exp(reqLevel * 0.03275)), 15);
|
||||
return Math.max(ServerConstants.EQUIP_EXP_RATE * (10413.648 * Math.exp(reqLevel * 0.03275)), 15);
|
||||
} else if(reqLevel >= 38) {
|
||||
return Math.max(ServerConstants.EQUIP_EXPERIENCE_MOD * ( 4985.818 * Math.exp(reqLevel * 0.02007)), 15);
|
||||
return Math.max(ServerConstants.EQUIP_EXP_RATE * ( 4985.818 * Math.exp(reqLevel * 0.02007)), 15);
|
||||
} else {
|
||||
return Math.max(ServerConstants.EQUIP_EXPERIENCE_MOD * ( 248.219 * Math.exp(reqLevel * 0.11093)), 15);
|
||||
return Math.max(ServerConstants.EQUIP_EXP_RATE * ( 248.219 * Math.exp(reqLevel * 0.11093)), 15);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user