diff --git a/MapleCouponInstaller/build/built-jar.properties b/MapleCouponInstaller/build/built-jar.properties index 9389cc86ff..53d8f13a70 100644 --- a/MapleCouponInstaller/build/built-jar.properties +++ b/MapleCouponInstaller/build/built-jar.properties @@ -1,4 +1,4 @@ -#Tue, 30 May 2017 01:30:51 -0300 +#Tue, 30 May 2017 13:56:57 -0300 C\:\\Nexon\\MapleSolaxia\\MapleSolaxiaV2\\MapleCouponInstaller= diff --git a/MapleCouponInstaller/build/classes/maplecouponinstaller/MapleCouponInstaller.class b/MapleCouponInstaller/build/classes/maplecouponinstaller/MapleCouponInstaller.class index 69eb2e3be5..95a12c9381 100644 Binary files a/MapleCouponInstaller/build/classes/maplecouponinstaller/MapleCouponInstaller.class and b/MapleCouponInstaller/build/classes/maplecouponinstaller/MapleCouponInstaller.class differ diff --git a/MapleCouponInstaller/dist/MapleCouponInstaller.jar b/MapleCouponInstaller/dist/MapleCouponInstaller.jar index 1833765e4d..566be7833a 100644 Binary files a/MapleCouponInstaller/dist/MapleCouponInstaller.jar and b/MapleCouponInstaller/dist/MapleCouponInstaller.jar differ diff --git a/MapleCouponInstaller/nbproject/private/private.xml b/MapleCouponInstaller/nbproject/private/private.xml index 6807a2ba19..27b105dcc9 100644 --- a/MapleCouponInstaller/nbproject/private/private.xml +++ b/MapleCouponInstaller/nbproject/private/private.xml @@ -2,6 +2,8 @@ - + + file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/MapleCouponInstaller/src/maplecouponinstaller/MapleCouponInstaller.java + diff --git a/MapleCouponInstaller/src/maplecouponinstaller/MapleCouponInstaller.java b/MapleCouponInstaller/src/maplecouponinstaller/MapleCouponInstaller.java index a39523e4d4..da42aab5a4 100644 --- a/MapleCouponInstaller/src/maplecouponinstaller/MapleCouponInstaller.java +++ b/MapleCouponInstaller/src/maplecouponinstaller/MapleCouponInstaller.java @@ -124,7 +124,7 @@ public class MapleCouponInstaller { } private static void processDayTimeString(String time) { - String day = time.substring(0, 2); + String day = time.substring(0, 3); int d = getDayOfWeek(day); activeDay |= (1 << d); diff --git a/MobBookUpdate/build/built-jar.properties b/MobBookUpdate/build/built-jar.properties index fe045ec6f5..4ef345a406 100644 --- a/MobBookUpdate/build/built-jar.properties +++ b/MobBookUpdate/build/built-jar.properties @@ -1,4 +1,4 @@ -#Tue, 30 May 2017 01:30:16 -0300 +#Tue, 30 May 2017 23:02:51 -0300 C\:\\Nexon\\MapleSolaxia\\MapleSolaxiaV2\\MobBookUpdate= diff --git a/MobBookUpdate/build/classes/.netbeans_automatic_build b/MobBookUpdate/build/classes/.netbeans_automatic_build deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/MobBookUpdate/build/classes/.netbeans_update_resources b/MobBookUpdate/build/classes/.netbeans_update_resources deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/MobBookUpdate/build/classes/mobbookupdate/MobBookUpdate.class b/MobBookUpdate/build/classes/mobbookupdate/MobBookUpdate.class index 45dc15e916..838ae80ead 100644 Binary files a/MobBookUpdate/build/classes/mobbookupdate/MobBookUpdate.class and b/MobBookUpdate/build/classes/mobbookupdate/MobBookUpdate.class differ diff --git a/MobBookUpdate/dist/MobBookUpdate.jar b/MobBookUpdate/dist/MobBookUpdate.jar index 1d6af9e10f..71e2c391c7 100644 Binary files a/MobBookUpdate/dist/MobBookUpdate.jar and b/MobBookUpdate/dist/MobBookUpdate.jar differ diff --git a/build/built-jar.properties b/build/built-jar.properties index fc472b7710..1028b0d504 100644 --- a/build/built-jar.properties +++ b/build/built-jar.properties @@ -1,4 +1,4 @@ -#Tue, 30 May 2017 13:12:05 -0300 +#Tue, 30 May 2017 23:04:14 -0300 C\:\\Nexon\\MapleSolaxia\\MapleSolaxiaV2= diff --git a/build/classes/client/MapleCharacter$10.class b/build/classes/client/MapleCharacter$10.class index 79ced3a9c8..11b2b3794c 100644 Binary files a/build/classes/client/MapleCharacter$10.class and b/build/classes/client/MapleCharacter$10.class differ diff --git a/build/classes/client/MapleCharacter$11.class b/build/classes/client/MapleCharacter$11.class index ad408f6cff..486f2bceb6 100644 Binary files a/build/classes/client/MapleCharacter$11.class and b/build/classes/client/MapleCharacter$11.class differ diff --git a/build/classes/client/MapleCharacter$12.class b/build/classes/client/MapleCharacter$12.class index b3cbc21de2..4a942f8f0d 100644 Binary files a/build/classes/client/MapleCharacter$12.class and b/build/classes/client/MapleCharacter$12.class differ diff --git a/build/classes/client/MapleCharacter$13.class b/build/classes/client/MapleCharacter$13.class index ab905ab41b..1283191ed3 100644 Binary files a/build/classes/client/MapleCharacter$13.class and b/build/classes/client/MapleCharacter$13.class differ diff --git a/build/classes/client/MapleCharacter$14.class b/build/classes/client/MapleCharacter$14.class index b624705fd1..cf7a32871c 100644 Binary files a/build/classes/client/MapleCharacter$14.class and b/build/classes/client/MapleCharacter$14.class differ diff --git a/build/classes/client/MapleCharacter$15.class b/build/classes/client/MapleCharacter$15.class index 44da913a15..9a96b482f7 100644 Binary files a/build/classes/client/MapleCharacter$15.class and b/build/classes/client/MapleCharacter$15.class differ diff --git a/build/classes/client/MapleCharacter$16.class b/build/classes/client/MapleCharacter$16.class index 227c3e4c1a..db985666bc 100644 Binary files a/build/classes/client/MapleCharacter$16.class and b/build/classes/client/MapleCharacter$16.class differ diff --git a/build/classes/client/MapleCharacter$17.class b/build/classes/client/MapleCharacter$17.class index 8a012795a4..3fb6df0b3a 100644 Binary files a/build/classes/client/MapleCharacter$17.class and b/build/classes/client/MapleCharacter$17.class differ diff --git a/build/classes/client/MapleCharacter$18.class b/build/classes/client/MapleCharacter$18.class index f018d28a07..83d0a90e7c 100644 Binary files a/build/classes/client/MapleCharacter$18.class and b/build/classes/client/MapleCharacter$18.class differ diff --git a/build/classes/client/MapleCharacter$8.class b/build/classes/client/MapleCharacter$8.class index 8f3ed9d94f..0287bdebef 100644 Binary files a/build/classes/client/MapleCharacter$8.class and b/build/classes/client/MapleCharacter$8.class differ diff --git a/build/classes/client/MapleCharacter$9.class b/build/classes/client/MapleCharacter$9.class index d5793fb3a6..b37a411076 100644 Binary files a/build/classes/client/MapleCharacter$9.class and b/build/classes/client/MapleCharacter$9.class differ diff --git a/build/classes/client/MapleCharacter$MapleBuffStatValueHolder.class b/build/classes/client/MapleCharacter$MapleBuffStatValueHolder.class index f8c90a4ade..ff5e3169f1 100644 Binary files a/build/classes/client/MapleCharacter$MapleBuffStatValueHolder.class and b/build/classes/client/MapleCharacter$MapleBuffStatValueHolder.class differ diff --git a/build/classes/client/MapleCharacter$MapleCoolDownValueHolder.class b/build/classes/client/MapleCharacter$MapleCoolDownValueHolder.class index ac67f53919..4b9aecf967 100644 Binary files a/build/classes/client/MapleCharacter$MapleCoolDownValueHolder.class and b/build/classes/client/MapleCharacter$MapleCoolDownValueHolder.class differ diff --git a/build/classes/client/MapleCharacter$SkillEntry.class b/build/classes/client/MapleCharacter$SkillEntry.class index 03766be4f3..2f2d704d97 100644 Binary files a/build/classes/client/MapleCharacter$SkillEntry.class and b/build/classes/client/MapleCharacter$SkillEntry.class differ diff --git a/build/classes/client/MapleCharacter.class b/build/classes/client/MapleCharacter.class index 017109f143..be4ceeae82 100644 Binary files a/build/classes/client/MapleCharacter.class and b/build/classes/client/MapleCharacter.class differ diff --git a/build/classes/client/command/Commands.class b/build/classes/client/command/Commands.class index 8b918c5d2d..239c8bb30f 100644 Binary files a/build/classes/client/command/Commands.class and b/build/classes/client/command/Commands.class differ diff --git a/build/classes/client/inventory/MapleInventory.class b/build/classes/client/inventory/MapleInventory.class index fcf4bfd314..eb321ded05 100644 Binary files a/build/classes/client/inventory/MapleInventory.class and b/build/classes/client/inventory/MapleInventory.class differ diff --git a/build/classes/net/server/channel/handlers/PlayerLoggedinHandler$1.class b/build/classes/net/server/channel/handlers/PlayerLoggedinHandler$1.class index 65f2787a50..6d9ce2a135 100644 Binary files a/build/classes/net/server/channel/handlers/PlayerLoggedinHandler$1.class and b/build/classes/net/server/channel/handlers/PlayerLoggedinHandler$1.class differ diff --git a/build/classes/net/server/channel/handlers/PlayerLoggedinHandler.class b/build/classes/net/server/channel/handlers/PlayerLoggedinHandler.class index 7653a270d3..4e3ea583a0 100644 Binary files a/build/classes/net/server/channel/handlers/PlayerLoggedinHandler.class and b/build/classes/net/server/channel/handlers/PlayerLoggedinHandler.class differ diff --git a/dist/MapleSolaxia.jar b/dist/MapleSolaxia.jar index c5bdad9f41..baa1b0ef2c 100644 Binary files a/dist/MapleSolaxia.jar and b/dist/MapleSolaxia.jar differ diff --git a/nbproject/private/private.xml b/nbproject/private/private.xml index c71af36319..e3a41b04d6 100644 --- a/nbproject/private/private.xml +++ b/nbproject/private/private.xml @@ -12,11 +12,7 @@ - file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/net/server/Server.java - file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/net/server/CouponWorker.java file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/client/MapleCharacter.java - file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/client/MapleClient.java - file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/client/inventory/MapleInventory.java diff --git a/sql/db_database.sql b/sql/db_database.sql index 8bf839cd64..0504bb3249 100644 --- a/sql/db_database.sql +++ b/sql/db_database.sql @@ -16324,46 +16324,46 @@ CREATE TABLE IF NOT EXISTS `nxcoupons` ( ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=41 ; INSERT INTO `nxcoupons` (`id`, `couponid`, `rate`, `activeday`, `starthour`, `endhour`) VALUES -(1,5211000,2,1,18,20), -(2,5211004,2,1,7,11), -(3,5211005,2,1,10,14), -(4,5211006,2,1,13,17), -(5,5211007,2,1,16,20), -(6,5211008,2,1,19,23), -(7,5211009,2,1,7,11), -(8,5211010,2,1,10,14), -(9,5211011,2,1,13,17), -(10,5211012,2,1,16,20), -(11,5211013,2,1,19,23), -(12,5211014,2,1,7,11), -(13,5211015,2,1,10,14), -(14,5211016,2,1,13,17), -(15,5211017,2,1,16,20), -(16,5211018,2,1,19,23), -(17,5211037,2,1,0,4), -(18,5211038,2,1,0,4), -(19,5211039,2,1,0,4), -(20,5211040,2,1,3,7), -(21,5211041,2,1,3,7), -(22,5211042,2,1,3,7), -(23,5211043,2,1,6,10), -(24,5211044,2,1,6,10), -(25,5211045,2,1,6,10), -(26,5211046,2,1,0,24), -(27,5211048,2,1,0,24), -(28,5211049,2,1,0,24), -(29,5211052,3,1,0,24), -(30,5211060,3,1,0,24), -(31,5360000,2,1,0,24), -(32,5360001,2,1,7,11), -(33,5360002,2,1,10,14), -(34,5360003,2,1,13,17), -(35,5360004,2,1,16,20), -(36,5360005,2,1,19,23), -(37,5360006,2,1,0,4), -(38,5360007,2,1,3,7), -(39,5360008,2,1,6,10), -(40,5360042,2,1,0,24); +(1,5211000,2,254,18,20), +(2,5211004,2,124,7,11), +(3,5211005,2,124,10,14), +(4,5211006,2,124,13,17), +(5,5211007,2,124,16,20), +(6,5211008,2,124,19,23), +(7,5211009,2,130,7,11), +(8,5211010,2,130,10,14), +(9,5211011,2,130,13,17), +(10,5211012,2,130,16,20), +(11,5211013,2,130,19,23), +(12,5211014,2,254,7,11), +(13,5211015,2,254,10,14), +(14,5211016,2,254,13,17), +(15,5211017,2,254,16,20), +(16,5211018,2,254,19,23), +(17,5211037,2,124,0,4), +(18,5211038,2,130,0,4), +(19,5211039,2,254,0,4), +(20,5211040,2,124,3,7), +(21,5211041,2,130,3,7), +(22,5211042,2,254,3,7), +(23,5211043,2,124,6,10), +(24,5211044,2,130,6,10), +(25,5211045,2,254,6,10), +(26,5211046,2,254,0,24), +(27,5211048,2,254,0,24), +(28,5211049,2,254,0,24), +(29,5211052,3,255,0,24), +(30,5211060,3,255,0,24), +(31,5360000,2,254,0,24), +(32,5360001,2,254,7,11), +(33,5360002,2,254,10,14), +(34,5360003,2,254,13,17), +(35,5360004,2,254,16,20), +(36,5360005,2,254,19,23), +(37,5360006,2,254,0,4), +(38,5360007,2,254,3,7), +(39,5360008,2,254,6,10), +(40,5360042,2,254,0,24); CREATE TABLE IF NOT EXISTS `pets` ( diff --git a/src/client/MapleCharacter.java b/src/client/MapleCharacter.java index 548fa90eca..5309955ab0 100644 --- a/src/client/MapleCharacter.java +++ b/src/client/MapleCharacter.java @@ -1691,7 +1691,7 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject { public void cancelAllDebuffs() { diseases.clear(); } - + public void dispelSkill(int skillid) { LinkedList allBuffs = new LinkedList<>(effects.values()); for (MapleBuffStatValueHolder mbsvh : allBuffs) { @@ -3418,6 +3418,16 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject { activateCouponsEffects(); } + public void resetPlayerRates() { + expRate = 1; + mesoRate = 1; + dropRate = 1; + + expCoupon = 1; + mesoCoupon = 1; + dropCoupon = 1; + } + private boolean isExpCoupon(int couponId) { return couponId / 1000 == 5211; } @@ -3436,6 +3446,8 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject { } private void revertCouponsEffects() { + dispelBuffCoupons(); + this.expRate /= this.expCoupon; this.dropRate /= this.dropCoupon; this.mesoRate /= this.mesoCoupon; @@ -3451,20 +3463,34 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject { int couponId = coupon.getKey(); int couponQty = coupon.getValue(); + commitBuffCoupon(couponId); if(isExpCoupon(couponId)) setExpCouponRate(couponId, couponQty); else setDropCouponRate(couponId, couponQty); } } else { - int maxExpRate = 1, maxDropRate = 1; + int maxExpRate = 1, maxDropRate = 1, maxExpCouponId = -1, maxDropCouponId = -1; for(Entry coupon: activeCoupons.entrySet()) { int couponId = coupon.getKey(); - if(isExpCoupon(couponId)) maxExpRate = Math.max(maxExpRate, getCouponMultiplier(couponId)); - else maxDropRate = Math.max(maxDropRate, getCouponMultiplier(couponId)); + if(isExpCoupon(couponId)) { + if(maxExpRate < getCouponMultiplier(couponId)) { + maxExpCouponId = couponId; + maxExpRate = getCouponMultiplier(couponId); + } + } + else { + if(maxDropRate < getCouponMultiplier(couponId)) { + maxDropCouponId = couponId; + maxDropRate = getCouponMultiplier(couponId); + } + } } + if(maxExpCouponId > -1) commitBuffCoupon(maxExpCouponId); + if(maxDropCouponId > -1) commitBuffCoupon(maxDropCouponId); + this.expCoupon = maxExpRate; this.dropCoupon = maxDropRate; this.mesoCoupon = maxDropRate; @@ -3494,6 +3520,24 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject { } } } + + private void commitBuffCoupon(int couponid) { + if(!isLoggedin() || getCashShop().isOpened()) return; + + MapleStatEffect mse = MapleItemInformationProvider.getInstance().getItemEffect(couponid); + mse.applyTo(this); + } + + public void dispelBuffCoupons() { + LinkedList allBuffs = new LinkedList<>(effects.values()); + MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance(); + + for (MapleBuffStatValueHolder mbsvh : allBuffs) { + if (ii.isRateCoupon(mbsvh.effect.getSourceId())) { + cancelEffect(mbsvh.effect, false, mbsvh.startTime); + } + } + } public static MapleCharacter loadCharFromDB(int charid, MapleClient client, boolean channelserver) throws SQLException { try { @@ -3817,13 +3861,6 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject { ret.maplemount.setTiredness(mounttiredness); ret.maplemount.setActive(false); - if(ServerConstants.USE_ADD_RATES_BY_LEVEL == true) { - ret.setPlayerRates(); - } - - ret.setWorldRates(); - ret.setCouponRates(); - return ret; } catch (SQLException | RuntimeException e) { e.printStackTrace(); diff --git a/src/client/SkillFactory.java b/src/client/SkillFactory.java index 2c407f5c4d..098aef3a00 100644 --- a/src/client/SkillFactory.java +++ b/src/client/SkillFactory.java @@ -98,22 +98,22 @@ public class SkillFactory { } public static void loadAllSkills() { - final MapleDataDirectoryEntry root = datasource.getRoot(); - int skillid; - for (MapleDataFileEntry topDir : root.getFiles()) { // Loop thru jobs - if (topDir.getName().length() <= 8) { - for (MapleData data : datasource.getData(topDir.getName())) { // Loop thru each jobs - if (data.getName().equals("skill")) { - for (MapleData data2 : data) { // Loop thru each jobs - if (data2 != null) { - skillid = Integer.parseInt(data2.getName()); - skills.put(skillid, loadFromData(skillid, data2)); - } - } - } - } - } - } + final MapleDataDirectoryEntry root = datasource.getRoot(); + int skillid; + for (MapleDataFileEntry topDir : root.getFiles()) { // Loop thru jobs + if (topDir.getName().length() <= 8) { + for (MapleData data : datasource.getData(topDir.getName())) { // Loop thru each jobs + if (data.getName().equals("skill")) { + for (MapleData data2 : data) { // Loop thru each jobs + if (data2 != null) { + skillid = Integer.parseInt(data2.getName()); + skills.put(skillid, loadFromData(skillid, data2)); + } + } + } + } + } + } } private static Skill loadFromData(int id, MapleData data) { @@ -135,251 +135,251 @@ public class SkillFactory { MapleData action_ = data.getChildByPath("action"); boolean action = false; if (action_ == null) { - if (data.getChildByPath("prepare/action") != null) { - action = true; - } else { - switch (id) { - case Gunslinger.INVISIBLE_SHOT: - case Corsair.HYPNOTIZE: - action = true; - break; - } - } + if (data.getChildByPath("prepare/action") != null) { + action = true; + } else { + switch (id) { + case Gunslinger.INVISIBLE_SHOT: + case Corsair.HYPNOTIZE: + action = true; + break; + } + } } else { action = true; } ret.action = action; - MapleData hit = data.getChildByPath("hit"); - MapleData ball = data.getChildByPath("ball"); - isBuff = effect != null && hit == null && ball == null; - isBuff |= action_ != null && MapleDataTool.getString("0", action_, "").equals("alert2"); - switch (id) { - case Hero.RUSH: - case Paladin.RUSH: - case DarkKnight.RUSH: - case DragonKnight.SACRIFICE: - case FPMage.EXPLOSION: - case FPMage.POISON_MIST: - case Cleric.HEAL: - case Ranger.MORTAL_BLOW: - case Sniper.MORTAL_BLOW: - case Assassin.DRAIN: - case Hermit.SHADOW_WEB: - case Bandit.STEAL: - case Shadower.SMOKE_SCREEN: - case SuperGM.HEAL_PLUS_DISPEL: - case Hero.MONSTER_MAGNET: - case Paladin.MONSTER_MAGNET: - case DarkKnight.MONSTER_MAGNET: - case Evan.ICE_BREATH: - case Evan.FIRE_BREATH: - case Gunslinger.RECOIL_SHOT: - case Marauder.ENERGY_DRAIN: - case BlazeWizard.FLAME_GEAR: - case NightWalker.SHADOW_WEB: - case NightWalker.POISON_BOMB: - case NightWalker.VAMPIRE: - case ChiefBandit.CHAKRA: - case Evan.RECOVERY_AURA: - isBuff = false; - break; - case Beginner.RECOVERY: - case Beginner.NIMBLE_FEET: - case Beginner.MONSTER_RIDER: - case Beginner.ECHO_OF_HERO: - case Swordsman.IRON_BODY: - case Fighter.AXE_BOOSTER: - case Fighter.POWER_GUARD: - case Fighter.RAGE: - case Fighter.SWORD_BOOSTER: - case Crusader.ARMOR_CRASH: - case Crusader.COMBO: - case Hero.ENRAGE: - case Hero.HEROS_WILL: - case Hero.MAPLE_WARRIOR: - case Hero.STANCE: - case Page.BW_BOOSTER: - case Page.POWER_GUARD: - case Page.SWORD_BOOSTER: - case Page.THREATEN: - case WhiteKnight.BW_FIRE_CHARGE: - case WhiteKnight.BW_ICE_CHARGE: - case WhiteKnight.BW_LIT_CHARGE: - case WhiteKnight.MAGIC_CRASH: - case WhiteKnight.SWORD_FIRE_CHARGE: - case WhiteKnight.SWORD_ICE_CHARGE: - case WhiteKnight.SWORD_LIT_CHARGE: - case Paladin.BW_HOLY_CHARGE: - case Paladin.HEROS_WILL: - case Paladin.MAPLE_WARRIOR: - case Paladin.STANCE: - case Paladin.SWORD_HOLY_CHARGE: - case Spearman.HYPER_BODY: - case Spearman.IRON_WILL: - case Spearman.POLEARM_BOOSTER: - case Spearman.SPEAR_BOOSTER: - case DragonKnight.DRAGON_BLOOD: - case DragonKnight.POWER_CRASH: - case DarkKnight.AURA_OF_BEHOLDER: - case DarkKnight.BEHOLDER: - case DarkKnight.HEROS_WILL: - case DarkKnight.HEX_OF_BEHOLDER: - case DarkKnight.MAPLE_WARRIOR: - case DarkKnight.STANCE: - case Magician.MAGIC_GUARD: - case Magician.MAGIC_ARMOR: - case FPWizard.MEDITATION: - case FPWizard.SLOW: - case FPMage.SEAL: - case FPMage.SPELL_BOOSTER: - case FPArchMage.HEROS_WILL: - case FPArchMage.INFINITY: - case FPArchMage.MANA_REFLECTION: - case FPArchMage.MAPLE_WARRIOR: - case ILWizard.MEDITATION: - case ILMage.SEAL: - case ILWizard.SLOW: - case ILMage.SPELL_BOOSTER: - case ILArchMage.HEROS_WILL: - case ILArchMage.INFINITY: - case ILArchMage.MANA_REFLECTION: - case ILArchMage.MAPLE_WARRIOR: - case Cleric.INVINCIBLE: - case Cleric.BLESS: - case Priest.DISPEL: - case Priest.DOOM: - case Priest.HOLY_SYMBOL: - case Priest.MYSTIC_DOOR: - case Bishop.HEROS_WILL: - case Bishop.HOLY_SHIELD: - case Bishop.INFINITY: - case Bishop.MANA_REFLECTION: - case Bishop.MAPLE_WARRIOR: - case Archer.FOCUS: - case Hunter.BOW_BOOSTER: - case Hunter.SOUL_ARROW: - case Ranger.PUPPET: - case Bowmaster.CONCENTRATE: - case Bowmaster.HEROS_WILL: - case Bowmaster.MAPLE_WARRIOR: - case Bowmaster.SHARP_EYES: - case Crossbowman.CROSSBOW_BOOSTER: - case Crossbowman.SOUL_ARROW: - case Sniper.PUPPET: - case Marksman.BLIND: - case Marksman.HEROS_WILL: - case Marksman.MAPLE_WARRIOR: - case Marksman.SHARP_EYES: - case Rogue.DARK_SIGHT: - case Assassin.CLAW_BOOSTER: - case Assassin.HASTE: - case Hermit.MESO_UP: - case Hermit.SHADOW_PARTNER: - case NightLord.HEROS_WILL: - case NightLord.MAPLE_WARRIOR: - case NightLord.NINJA_AMBUSH: - case NightLord.SHADOW_STARS: - case Bandit.DAGGER_BOOSTER: - case Bandit.HASTE: - case ChiefBandit.MESO_GUARD: - case ChiefBandit.PICKPOCKET: - case Shadower.HEROS_WILL: - case Shadower.MAPLE_WARRIOR: - case Shadower.NINJA_AMBUSH: - case Pirate.DASH: - case Marauder.TRANSFORMATION: - case Buccaneer.SUPER_TRANSFORMATION: - case Corsair.BATTLE_SHIP: - case GM.HIDE: - case SuperGM.HASTE: - case SuperGM.HOLY_SYMBOL: - case SuperGM.BLESS: - case SuperGM.HIDE: - case SuperGM.HYPER_BODY: - case Noblesse.BLESSING_OF_THE_FAIRY: - case Noblesse.ECHO_OF_HERO: - case Noblesse.MONSTER_RIDER: - case Noblesse.NIMBLE_FEET: - case Noblesse.RECOVERY: - case DawnWarrior.COMBO: - case DawnWarrior.FINAL_ATTACK: - case DawnWarrior.IRON_BODY: - case DawnWarrior.RAGE: - case DawnWarrior.SOUL: - case DawnWarrior.SOUL_CHARGE: - case DawnWarrior.SWORD_BOOSTER: - case BlazeWizard.ELEMENTAL_RESET: - case BlazeWizard.FLAME: - case BlazeWizard.IFRIT: - case BlazeWizard.MAGIC_ARMOR: - case BlazeWizard.MAGIC_GUARD: - case BlazeWizard.MEDITATION: - case BlazeWizard.SEAL: - case BlazeWizard.SLOW: - case BlazeWizard.SPELL_BOOSTER: - case WindArcher.BOW_BOOSTER: - case WindArcher.EAGLE_EYE: - case WindArcher.FINAL_ATTACK: - case WindArcher.FOCUS: - case WindArcher.PUPPET: - case WindArcher.SOUL_ARROW: - case WindArcher.STORM: - case WindArcher.WIND_WALK: - case NightWalker.CLAW_BOOSTER: - case NightWalker.DARKNESS: - case NightWalker.DARK_SIGHT: - case NightWalker.HASTE: - case NightWalker.SHADOW_PARTNER: - case ThunderBreaker.DASH: - case ThunderBreaker.ENERGY_CHARGE: - case ThunderBreaker.ENERGY_DRAIN: - case ThunderBreaker.KNUCKLER_BOOSTER: - case ThunderBreaker.LIGHTNING: - case ThunderBreaker.SPARK: - case ThunderBreaker.LIGHTNING_CHARGE: - case ThunderBreaker.SPEED_INFUSION: - case ThunderBreaker.TRANSFORMATION: - case Legend.BLESSING_OF_THE_FAIRY: - case Legend.AGILE_BODY: - case Legend.ECHO_OF_HERO: - case Legend.RECOVERY: - case Legend.MONSTER_RIDER: - case Aran.MAPLE_WARRIOR: - case Aran.HEROS_WILL: - case Aran.POLEARM_BOOSTER: - case Aran.COMBO_DRAIN: - case Aran.SNOW_CHARGE: - case Aran.BODY_PRESSURE: - case Aran.SMART_KNOCKBACK: - case Aran.COMBO_BARRIER: - case Aran.COMBO_ABILITY: - case Evan.BLESSING_OF_THE_FAIRY: - case Evan.RECOVERY: - case Evan.NIMBLE_FEET: - case Evan.HEROS_WILL: - case Evan.ECHO_OF_HERO: - case Evan.MAGIC_BOOSTER: - case Evan.MAGIC_GUARD: - case Evan.ELEMENTAL_RESET: - case Evan.MAPLE_WARRIOR: - case Evan.MAGIC_RESISTANCE: - case Evan.MAGIC_SHIELD: - case Evan.SLOW: - isBuff = true; - break; + MapleData hit = data.getChildByPath("hit"); + MapleData ball = data.getChildByPath("ball"); + isBuff = effect != null && hit == null && ball == null; + isBuff |= action_ != null && MapleDataTool.getString("0", action_, "").equals("alert2"); + switch (id) { + case Hero.RUSH: + case Paladin.RUSH: + case DarkKnight.RUSH: + case DragonKnight.SACRIFICE: + case FPMage.EXPLOSION: + case FPMage.POISON_MIST: + case Cleric.HEAL: + case Ranger.MORTAL_BLOW: + case Sniper.MORTAL_BLOW: + case Assassin.DRAIN: + case Hermit.SHADOW_WEB: + case Bandit.STEAL: + case Shadower.SMOKE_SCREEN: + case SuperGM.HEAL_PLUS_DISPEL: + case Hero.MONSTER_MAGNET: + case Paladin.MONSTER_MAGNET: + case DarkKnight.MONSTER_MAGNET: + case Evan.ICE_BREATH: + case Evan.FIRE_BREATH: + case Gunslinger.RECOIL_SHOT: + case Marauder.ENERGY_DRAIN: + case BlazeWizard.FLAME_GEAR: + case NightWalker.SHADOW_WEB: + case NightWalker.POISON_BOMB: + case NightWalker.VAMPIRE: + case ChiefBandit.CHAKRA: + case Evan.RECOVERY_AURA: + isBuff = false; + break; + case Beginner.RECOVERY: + case Beginner.NIMBLE_FEET: + case Beginner.MONSTER_RIDER: + case Beginner.ECHO_OF_HERO: + case Swordsman.IRON_BODY: + case Fighter.AXE_BOOSTER: + case Fighter.POWER_GUARD: + case Fighter.RAGE: + case Fighter.SWORD_BOOSTER: + case Crusader.ARMOR_CRASH: + case Crusader.COMBO: + case Hero.ENRAGE: + case Hero.HEROS_WILL: + case Hero.MAPLE_WARRIOR: + case Hero.STANCE: + case Page.BW_BOOSTER: + case Page.POWER_GUARD: + case Page.SWORD_BOOSTER: + case Page.THREATEN: + case WhiteKnight.BW_FIRE_CHARGE: + case WhiteKnight.BW_ICE_CHARGE: + case WhiteKnight.BW_LIT_CHARGE: + case WhiteKnight.MAGIC_CRASH: + case WhiteKnight.SWORD_FIRE_CHARGE: + case WhiteKnight.SWORD_ICE_CHARGE: + case WhiteKnight.SWORD_LIT_CHARGE: + case Paladin.BW_HOLY_CHARGE: + case Paladin.HEROS_WILL: + case Paladin.MAPLE_WARRIOR: + case Paladin.STANCE: + case Paladin.SWORD_HOLY_CHARGE: + case Spearman.HYPER_BODY: + case Spearman.IRON_WILL: + case Spearman.POLEARM_BOOSTER: + case Spearman.SPEAR_BOOSTER: + case DragonKnight.DRAGON_BLOOD: + case DragonKnight.POWER_CRASH: + case DarkKnight.AURA_OF_BEHOLDER: + case DarkKnight.BEHOLDER: + case DarkKnight.HEROS_WILL: + case DarkKnight.HEX_OF_BEHOLDER: + case DarkKnight.MAPLE_WARRIOR: + case DarkKnight.STANCE: + case Magician.MAGIC_GUARD: + case Magician.MAGIC_ARMOR: + case FPWizard.MEDITATION: + case FPWizard.SLOW: + case FPMage.SEAL: + case FPMage.SPELL_BOOSTER: + case FPArchMage.HEROS_WILL: + case FPArchMage.INFINITY: + case FPArchMage.MANA_REFLECTION: + case FPArchMage.MAPLE_WARRIOR: + case ILWizard.MEDITATION: + case ILMage.SEAL: + case ILWizard.SLOW: + case ILMage.SPELL_BOOSTER: + case ILArchMage.HEROS_WILL: + case ILArchMage.INFINITY: + case ILArchMage.MANA_REFLECTION: + case ILArchMage.MAPLE_WARRIOR: + case Cleric.INVINCIBLE: + case Cleric.BLESS: + case Priest.DISPEL: + case Priest.DOOM: + case Priest.HOLY_SYMBOL: + case Priest.MYSTIC_DOOR: + case Bishop.HEROS_WILL: + case Bishop.HOLY_SHIELD: + case Bishop.INFINITY: + case Bishop.MANA_REFLECTION: + case Bishop.MAPLE_WARRIOR: + case Archer.FOCUS: + case Hunter.BOW_BOOSTER: + case Hunter.SOUL_ARROW: + case Ranger.PUPPET: + case Bowmaster.CONCENTRATE: + case Bowmaster.HEROS_WILL: + case Bowmaster.MAPLE_WARRIOR: + case Bowmaster.SHARP_EYES: + case Crossbowman.CROSSBOW_BOOSTER: + case Crossbowman.SOUL_ARROW: + case Sniper.PUPPET: + case Marksman.BLIND: + case Marksman.HEROS_WILL: + case Marksman.MAPLE_WARRIOR: + case Marksman.SHARP_EYES: + case Rogue.DARK_SIGHT: + case Assassin.CLAW_BOOSTER: + case Assassin.HASTE: + case Hermit.MESO_UP: + case Hermit.SHADOW_PARTNER: + case NightLord.HEROS_WILL: + case NightLord.MAPLE_WARRIOR: + case NightLord.NINJA_AMBUSH: + case NightLord.SHADOW_STARS: + case Bandit.DAGGER_BOOSTER: + case Bandit.HASTE: + case ChiefBandit.MESO_GUARD: + case ChiefBandit.PICKPOCKET: + case Shadower.HEROS_WILL: + case Shadower.MAPLE_WARRIOR: + case Shadower.NINJA_AMBUSH: + case Pirate.DASH: + case Marauder.TRANSFORMATION: + case Buccaneer.SUPER_TRANSFORMATION: + case Corsair.BATTLE_SHIP: + case GM.HIDE: + case SuperGM.HASTE: + case SuperGM.HOLY_SYMBOL: + case SuperGM.BLESS: + case SuperGM.HIDE: + case SuperGM.HYPER_BODY: + case Noblesse.BLESSING_OF_THE_FAIRY: + case Noblesse.ECHO_OF_HERO: + case Noblesse.MONSTER_RIDER: + case Noblesse.NIMBLE_FEET: + case Noblesse.RECOVERY: + case DawnWarrior.COMBO: + case DawnWarrior.FINAL_ATTACK: + case DawnWarrior.IRON_BODY: + case DawnWarrior.RAGE: + case DawnWarrior.SOUL: + case DawnWarrior.SOUL_CHARGE: + case DawnWarrior.SWORD_BOOSTER: + case BlazeWizard.ELEMENTAL_RESET: + case BlazeWizard.FLAME: + case BlazeWizard.IFRIT: + case BlazeWizard.MAGIC_ARMOR: + case BlazeWizard.MAGIC_GUARD: + case BlazeWizard.MEDITATION: + case BlazeWizard.SEAL: + case BlazeWizard.SLOW: + case BlazeWizard.SPELL_BOOSTER: + case WindArcher.BOW_BOOSTER: + case WindArcher.EAGLE_EYE: + case WindArcher.FINAL_ATTACK: + case WindArcher.FOCUS: + case WindArcher.PUPPET: + case WindArcher.SOUL_ARROW: + case WindArcher.STORM: + case WindArcher.WIND_WALK: + case NightWalker.CLAW_BOOSTER: + case NightWalker.DARKNESS: + case NightWalker.DARK_SIGHT: + case NightWalker.HASTE: + case NightWalker.SHADOW_PARTNER: + case ThunderBreaker.DASH: + case ThunderBreaker.ENERGY_CHARGE: + case ThunderBreaker.ENERGY_DRAIN: + case ThunderBreaker.KNUCKLER_BOOSTER: + case ThunderBreaker.LIGHTNING: + case ThunderBreaker.SPARK: + case ThunderBreaker.LIGHTNING_CHARGE: + case ThunderBreaker.SPEED_INFUSION: + case ThunderBreaker.TRANSFORMATION: + case Legend.BLESSING_OF_THE_FAIRY: + case Legend.AGILE_BODY: + case Legend.ECHO_OF_HERO: + case Legend.RECOVERY: + case Legend.MONSTER_RIDER: + case Aran.MAPLE_WARRIOR: + case Aran.HEROS_WILL: + case Aran.POLEARM_BOOSTER: + case Aran.COMBO_DRAIN: + case Aran.SNOW_CHARGE: + case Aran.BODY_PRESSURE: + case Aran.SMART_KNOCKBACK: + case Aran.COMBO_BARRIER: + case Aran.COMBO_ABILITY: + case Evan.BLESSING_OF_THE_FAIRY: + case Evan.RECOVERY: + case Evan.NIMBLE_FEET: + case Evan.HEROS_WILL: + case Evan.ECHO_OF_HERO: + case Evan.MAGIC_BOOSTER: + case Evan.MAGIC_GUARD: + case Evan.ELEMENTAL_RESET: + case Evan.MAPLE_WARRIOR: + case Evan.MAGIC_RESISTANCE: + case Evan.MAGIC_SHIELD: + case Evan.SLOW: + isBuff = true; + break; + } } - } - - for (MapleData level : data.getChildByPath("level")) { - ret.effects.add(MapleStatEffect.loadSkillEffectFromData(level, id, isBuff)); - } - ret.animationTime = 0; - if (effect != null) { - for (MapleData effectEntry : effect) { - ret.animationTime += MapleDataTool.getIntConvert("delay", effectEntry, 0); + + for (MapleData level : data.getChildByPath("level")) { + ret.effects.add(MapleStatEffect.loadSkillEffectFromData(level, id, isBuff)); } - } - return ret; + ret.animationTime = 0; + if (effect != null) { + for (MapleData effectEntry : effect) { + ret.animationTime += MapleDataTool.getIntConvert("delay", effectEntry, 0); + } + } + return ret; } public static String getSkillName(int skillid) { diff --git a/src/client/inventory/MapleInventory.java b/src/client/inventory/MapleInventory.java index 8a9ec89c86..bad9b2e329 100644 --- a/src/client/inventory/MapleInventory.java +++ b/src/client/inventory/MapleInventory.java @@ -199,7 +199,6 @@ public class MapleInventory implements Iterable { inventory.put(slot, item); if(MapleItemInformationProvider.getInstance().isRateCoupon(item.getItemId())) { - System.out.println("reformulating"); owner.revertCouponRates(); owner.setCouponRates(); } @@ -209,7 +208,6 @@ public class MapleInventory implements Iterable { Item item = inventory.remove(slot); if(item != null && MapleItemInformationProvider.getInstance().isRateCoupon(item.getItemId())) { - System.out.println("reformulating"); owner.revertCouponRates(); owner.setCouponRates(); } diff --git a/src/net/server/channel/handlers/PlayerLoggedinHandler.java b/src/net/server/channel/handlers/PlayerLoggedinHandler.java index 0148b2b5dc..d0be625c8f 100644 --- a/src/net/server/channel/handlers/PlayerLoggedinHandler.java +++ b/src/net/server/channel/handlers/PlayerLoggedinHandler.java @@ -50,6 +50,7 @@ import client.inventory.MapleInventoryType; import client.inventory.MaplePet; import client.inventory.PetDataFactory; import constants.GameConstants; +import constants.ServerConstants; import java.util.concurrent.ScheduledFuture; import server.TimerManager; @@ -278,5 +279,12 @@ public final class PlayerLoggedinHandler extends AbstractMaplePacketHandler { mc.setHpDecreaseTask(hpDecreaseTask); } + + player.dispelBuffCoupons(); + player.resetPlayerRates(); + + if(ServerConstants.USE_ADD_RATES_BY_LEVEL == true) player.setPlayerRates(); + player.setWorldRates(); + player.setCouponRates(); } } diff --git a/src/server/MapleInventoryManipulator.java b/src/server/MapleInventoryManipulator.java index 462e3c5c4f..48441020c7 100644 --- a/src/server/MapleInventoryManipulator.java +++ b/src/server/MapleInventoryManipulator.java @@ -275,29 +275,29 @@ public class MapleInventoryManipulator { } public static void removeById(MapleClient c, MapleInventoryType type, int itemId, int quantity, boolean fromDrop, boolean consume) { - int removeQuantity = quantity; - MapleInventory inv = c.getPlayer().getInventory(type); + int removeQuantity = quantity; + MapleInventory inv = c.getPlayer().getInventory(type); int slotLimit = type == MapleInventoryType.EQUIPPED ? 128 : inv.getSlotLimit(); - for (short i = 0; i <= slotLimit; i++) { - Item item = inv.getItem((short) (type == MapleInventoryType.EQUIPPED ? -i : i)); - if (item != null) { - if (item.getItemId() == itemId || item.getCashId() == itemId) { - if (removeQuantity <= item.getQuantity()) { - removeFromSlot(c, type, item.getPosition(), (short) removeQuantity, fromDrop, consume); - removeQuantity = 0; - break; - } else { - removeQuantity -= item.getQuantity(); - removeFromSlot(c, type, item.getPosition(), item.getQuantity(), fromDrop, consume); - } - } - } + for (short i = 0; i <= slotLimit; i++) { + Item item = inv.getItem((short) (type == MapleInventoryType.EQUIPPED ? -i : i)); + if (item != null) { + if (item.getItemId() == itemId || item.getCashId() == itemId) { + if (removeQuantity <= item.getQuantity()) { + removeFromSlot(c, type, item.getPosition(), (short) removeQuantity, fromDrop, consume); + removeQuantity = 0; + break; + } else { + removeQuantity -= item.getQuantity(); + removeFromSlot(c, type, item.getPosition(), item.getQuantity(), fromDrop, consume); + } + } + } + } + if (removeQuantity > 0) { + throw new RuntimeException("[HACK] Not enough items available of Item:" + itemId + ", Quantity (After Quantity/Over Current Quantity): " + (quantity - removeQuantity) + "/" + quantity); + } } - if (removeQuantity > 0) { - throw new RuntimeException("[HACK] Not enough items available of Item:" + itemId + ", Quantity (After Quantity/Over Current Quantity): " + (quantity - removeQuantity) + "/" + quantity); - } -} public static void move(MapleClient c, MapleInventoryType type, short src, short dst) { if (src < 0 || dst < 0) { diff --git a/wz/Item.wz/Cash/0521.img.xml b/wz/Item.wz/Cash/0521.img.xml index 099f15ff14..7f1104f3b2 100644 --- a/wz/Item.wz/Cash/0521.img.xml +++ b/wz/Item.wz/Cash/0521.img.xml @@ -21,6 +21,10 @@ + + + + @@ -41,6 +45,10 @@ + + + + @@ -61,6 +69,10 @@ + + + + @@ -81,6 +93,10 @@ + + + + @@ -101,6 +117,10 @@ + + + + @@ -121,6 +141,10 @@ + + + + @@ -138,6 +162,10 @@ + + + + @@ -155,6 +183,10 @@ + + + + @@ -172,6 +204,10 @@ + + + + @@ -189,6 +225,10 @@ + + + + @@ -206,6 +246,10 @@ + + + + @@ -228,6 +272,10 @@ + + + + @@ -250,6 +298,10 @@ + + + + @@ -272,6 +324,10 @@ + + + + @@ -294,6 +350,10 @@ + + + + @@ -316,6 +376,10 @@ + + + + @@ -336,6 +400,10 @@ + + + + @@ -353,6 +421,10 @@ + + + + @@ -375,6 +447,10 @@ + + + + @@ -395,6 +471,10 @@ + + + + @@ -412,6 +492,10 @@ + + + + @@ -434,6 +518,10 @@ + + + + @@ -454,6 +542,10 @@ + + + + @@ -471,6 +563,10 @@ + + + + @@ -493,6 +589,10 @@ + + + + @@ -515,6 +615,10 @@ + + + + @@ -537,6 +641,10 @@ + + + + @@ -559,6 +667,10 @@ + + + + @@ -582,6 +694,10 @@ + + + + @@ -605,5 +721,9 @@ + + + + diff --git a/wz/Item.wz/Cash/0536.img.xml b/wz/Item.wz/Cash/0536.img.xml index de8fc45878..025b4de0d6 100644 --- a/wz/Item.wz/Cash/0536.img.xml +++ b/wz/Item.wz/Cash/0536.img.xml @@ -21,6 +21,10 @@ + + + + @@ -43,6 +47,10 @@ + + + + @@ -65,6 +73,10 @@ + + + + @@ -87,6 +99,10 @@ + + + + @@ -109,6 +125,10 @@ + + + + @@ -131,6 +151,10 @@ + + + + @@ -153,6 +177,10 @@ + + + + @@ -175,6 +203,10 @@ + + + + @@ -197,6 +229,10 @@ + + + + @@ -219,5 +255,9 @@ + + + +