diff --git a/build/built-jar.properties b/build/built-jar.properties index 01cee0faf7..cdf25ef53b 100644 --- a/build/built-jar.properties +++ b/build/built-jar.properties @@ -1,4 +1,4 @@ -#Wed, 18 Oct 2017 15:51:18 -0200 +#Sun, 22 Oct 2017 00:39:49 -0200 C\:\\Nexon\\MapleSolaxia\\MapleSolaxiaV2= diff --git a/build/classes/client/MapleBuffStat.class b/build/classes/client/MapleBuffStat.class index 1ce02a3e34..35caea418e 100644 Binary files a/build/classes/client/MapleBuffStat.class and b/build/classes/client/MapleBuffStat.class differ diff --git a/build/classes/client/MapleCharacter$1.class b/build/classes/client/MapleCharacter$1.class index fcc4883a62..cc01b808ea 100644 Binary files a/build/classes/client/MapleCharacter$1.class and b/build/classes/client/MapleCharacter$1.class differ diff --git a/build/classes/client/MapleCharacter$10.class b/build/classes/client/MapleCharacter$10.class index 30db8e59cc..c863f275b4 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 ef23fbb6ae..cb1803173a 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 ad9b9d082f..6a62238b19 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 571dbae1e9..e33ffc3829 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 bb841cea8f..c7aad56429 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 5aeefa138d..e4846b85ce 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 fe4cc766c8..f42c0af875 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 965122e4d3..0478a12309 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 ac0d4b00f5..dd873ce60d 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$19.class b/build/classes/client/MapleCharacter$19.class index 249ec7f3ae..b0644872d2 100644 Binary files a/build/classes/client/MapleCharacter$19.class and b/build/classes/client/MapleCharacter$19.class differ diff --git a/build/classes/client/MapleCharacter$2.class b/build/classes/client/MapleCharacter$2.class index ffe6fe8371..7e60a68ab3 100644 Binary files a/build/classes/client/MapleCharacter$2.class and b/build/classes/client/MapleCharacter$2.class differ diff --git a/build/classes/client/MapleCharacter$3.class b/build/classes/client/MapleCharacter$3.class index c96c3e93d9..3088112bcf 100644 Binary files a/build/classes/client/MapleCharacter$3.class and b/build/classes/client/MapleCharacter$3.class differ diff --git a/build/classes/client/MapleCharacter$4.class b/build/classes/client/MapleCharacter$4.class index b4acbc4028..509f602118 100644 Binary files a/build/classes/client/MapleCharacter$4.class and b/build/classes/client/MapleCharacter$4.class differ diff --git a/build/classes/client/MapleCharacter$5.class b/build/classes/client/MapleCharacter$5.class index 4f32c82cdb..3df962e462 100644 Binary files a/build/classes/client/MapleCharacter$5.class and b/build/classes/client/MapleCharacter$5.class differ diff --git a/build/classes/client/MapleCharacter$6.class b/build/classes/client/MapleCharacter$6.class index 239d69cfb8..9200095191 100644 Binary files a/build/classes/client/MapleCharacter$6.class and b/build/classes/client/MapleCharacter$6.class differ diff --git a/build/classes/client/MapleCharacter$7.class b/build/classes/client/MapleCharacter$7.class index 76d40490a5..3e3a6ae310 100644 Binary files a/build/classes/client/MapleCharacter$7.class and b/build/classes/client/MapleCharacter$7.class differ diff --git a/build/classes/client/MapleCharacter$8.class b/build/classes/client/MapleCharacter$8.class index 10514607e9..821f360489 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 96cd8c43a1..daf352190e 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$FameStatus.class b/build/classes/client/MapleCharacter$FameStatus.class index cd70ac8110..f4cc6ebd1a 100644 Binary files a/build/classes/client/MapleCharacter$FameStatus.class and b/build/classes/client/MapleCharacter$FameStatus.class differ diff --git a/build/classes/client/MapleCharacter$MapleBuffStatValueHolder.class b/build/classes/client/MapleCharacter$MapleBuffStatValueHolder.class index 2075f82add..c77220d142 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 fd5e4e3419..f7c9fea085 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 d65dce29a9..c29901f907 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 a9e18a97d6..63af495c33 100644 Binary files a/build/classes/client/MapleCharacter.class and b/build/classes/client/MapleCharacter.class differ diff --git a/build/classes/client/MapleClient.class b/build/classes/client/MapleClient.class index 55ac1ccd34..09b9c03b5d 100644 Binary files a/build/classes/client/MapleClient.class and b/build/classes/client/MapleClient.class differ diff --git a/build/classes/client/SkillFactory.class b/build/classes/client/SkillFactory.class index 537e136f01..1103a24b59 100644 Binary files a/build/classes/client/SkillFactory.class and b/build/classes/client/SkillFactory.class differ diff --git a/build/classes/constants/skills/Beginner.class b/build/classes/constants/skills/Beginner.class index ed37ea3bca..f93a865f0e 100644 Binary files a/build/classes/constants/skills/Beginner.class and b/build/classes/constants/skills/Beginner.class differ diff --git a/build/classes/constants/skills/Legend.class b/build/classes/constants/skills/Legend.class index c89e3e6be9..24eff2a334 100644 Binary files a/build/classes/constants/skills/Legend.class and b/build/classes/constants/skills/Legend.class differ diff --git a/build/classes/constants/skills/Noblesse.class b/build/classes/constants/skills/Noblesse.class index 43d587f40a..dcbbb0c2f4 100644 Binary files a/build/classes/constants/skills/Noblesse.class and b/build/classes/constants/skills/Noblesse.class differ diff --git a/build/classes/net/server/channel/handlers/CancelChairHandler.class b/build/classes/net/server/channel/handlers/CancelChairHandler.class index e85c140d19..2de6b6425f 100644 Binary files a/build/classes/net/server/channel/handlers/CancelChairHandler.class and b/build/classes/net/server/channel/handlers/CancelChairHandler.class differ diff --git a/build/classes/net/server/channel/handlers/NPCMoreTalkHandler.class b/build/classes/net/server/channel/handlers/NPCMoreTalkHandler.class index 5a2f10ccf7..e2cc773907 100644 Binary files a/build/classes/net/server/channel/handlers/NPCMoreTalkHandler.class and b/build/classes/net/server/channel/handlers/NPCMoreTalkHandler.class differ diff --git a/build/classes/net/server/channel/handlers/NPCTalkHandler.class b/build/classes/net/server/channel/handlers/NPCTalkHandler.class index 2e33ddc669..91b10b4e22 100644 Binary files a/build/classes/net/server/channel/handlers/NPCTalkHandler.class and b/build/classes/net/server/channel/handlers/NPCTalkHandler.class differ diff --git a/build/classes/net/server/channel/handlers/QuestActionHandler.class b/build/classes/net/server/channel/handlers/QuestActionHandler.class index db24d00896..16734dfb9c 100644 Binary files a/build/classes/net/server/channel/handlers/QuestActionHandler.class and b/build/classes/net/server/channel/handlers/QuestActionHandler.class differ diff --git a/build/classes/server/MapleStatEffect.class b/build/classes/server/MapleStatEffect.class index 6d00ffa008..15a08a5385 100644 Binary files a/build/classes/server/MapleStatEffect.class and b/build/classes/server/MapleStatEffect.class differ diff --git a/build/classes/server/MapleStorage$1.class b/build/classes/server/MapleStorage$1.class index 56577554eb..410ce3cfa8 100644 Binary files a/build/classes/server/MapleStorage$1.class and b/build/classes/server/MapleStorage$1.class differ diff --git a/build/classes/server/MapleStorage.class b/build/classes/server/MapleStorage.class index 09d3bad26d..1bbbb3fe64 100644 Binary files a/build/classes/server/MapleStorage.class and b/build/classes/server/MapleStorage.class differ diff --git a/dist/MapleSolaxia.jar b/dist/MapleSolaxia.jar index 3eb034012c..a9840296a2 100644 Binary files a/dist/MapleSolaxia.jar and b/dist/MapleSolaxia.jar differ diff --git a/docs/mychanges_ptbr.txt b/docs/mychanges_ptbr.txt index 927a1ebe44..dad7f4f129 100644 --- a/docs/mychanges_ptbr.txt +++ b/docs/mychanges_ptbr.txt @@ -590,4 +590,9 @@ Adicionado contador de buscas por itens realizados pelos jogadores ao usar Owl. 17 Outubro 2017, Consertado Roaring Tiger Messenger aparecendo fora da tela ao final da animação. -Consertado bugs envolvendo ganho de EXP em party, para casos onde o level do mob alvo é bem maior que o do atacante/leecher. \ No newline at end of file +Consertado bugs envolvendo ganho de EXP em party, para casos onde o level do mob alvo é bem maior que o do atacante/leecher. + +21 - 22 Outubro 2017, +Bonus de Map chair rearranjado como uma skill, buffando jogador no momento que a codição de ativação é atingida. +Hired Merchant agora verifica devidamente se jogador possui slot antes de liberar a compra de um item. +Pequeno conserto de acesso concorrente com o Storage. \ No newline at end of file diff --git a/handbook/Skill.txt b/handbook/Skill.txt index 2847e1a4b3..d82cdeb78c 100644 --- a/handbook/Skill.txt +++ b/handbook/Skill.txt @@ -1,4 +1,5 @@ -0000008 - Follow the Lead - Allows one to lead up to 3 pets at once. (Passive skill) +0000008 - Follow the Lead - Allows one to lead up to 3 pets at once. (Passive skill) +0000100 - Chair Mastery - [Master Level : 1]\nBonus recovery gain from using map chairs throughout the world. 0001000 - Three Snails - [Master Level : 3]\nHurls snail shells to attack monsters from long distance. 0001001 - Recovery - [Master Level : 3]\nEnables the user to recover HP constantly for 30 sec. \n#cTerms between skills : 10 min.# 0001003 - Legendary Spirit - [Master Level : 1]\nUses the spirit of a legend to use a scroll on an item that cannot be normally equipped by the character. @@ -439,6 +440,7 @@ 11101001 - Sword Booster - [Master Level : 20]\nUses HP and MP to temporarily boost the attack speed of the Sword. It only applies when either a one-handed or a two-handed Sword is in hand.\nRequired Skill : \n#cAt least Level 5 on Sword Mastery# 11101002 - Final Attack - [Master Level : 30]\nEnables consecutive attacks when an attack skill is applied at a regular interval and pre-established amount of MP is used. It only applies when a one-handed or a two-handed Sword is in hand. \nRequired Skill : #c At least Lv.3 on Sword Mastery# 10000018 - Follow the Lead - Allows one to lead up to 3 pets at once. (Passive skill) +10000100 - Chair Mastery - [Master Level : 1]\nBonus recovery gain from using map chairs throughout the world. 10001000 - Three Snails - [Master Level : 3]\nHurls snail shells to attack monsters from long distance. 10001001 - Recovery - [Master Level : 3]\nEnables the user to recover HP constantly for 30 sec. \n#cTerms between skills : 10 min.# 10001002 - Nimble Feet - [Master Level : 3]\nEnables the character to move around quickly for a short amount of time. \n#cTerms between skills : 1 min.# @@ -465,6 +467,7 @@ 10001014 - Spaceship - [Master Level : 2]\nYou board a spaceship. While aboard, you can increase your movement and jump abilities by pressing the right/left direction key twice. #Available until: 06-08-2009 at 00 hour# 10001015 - Space Dash - [Master Level : 1]\nIncrease your movement and jump abilities by pressing the right/left direction key twice. #cAvailable until 06-08-2009 at 00 hour# 10001016 - Space Beam - [Master Level : 1]\nChanges the condition of the Krypto found at the Space Mine. #cAvailable until: 06-08-2009 at 00 hour# +20000100 - Chair Mastery - [Master Level : 1]\nBonus recovery gain from using map chairs throughout the world. 20001000 - Three Snails - [Master Level : 3]\nHurls snail shells to attack monsters from long distance. 20001001 - Recovery - [Master Level : 3]\nEnables the user to recover HP constantly for 30 sec. \n#cTerms between skills : 2 min.# 20001002 - Agile Body - [Master Level : 3]\nExplosive speed for an instant. \n#cTakes about 1 min. until the next call.# diff --git a/handbook/Use.txt b/handbook/Use.txt index da05b2f5ec..5b48ddf3f3 100644 --- a/handbook/Use.txt +++ b/handbook/Use.txt @@ -385,7 +385,7 @@ 2030016 - Phyllia's Warp Powder - Warp powder made by fairy Phyllia. Teleports you to Magatia when used inside the Nihal desert region. 2030019 - Nautilus Return Scroll - This scroll enables you to return to the Pirate village, Nautilus. This is a one use item and will disappear after use. 2030020 - Return to New Leaf City Scroll - Use this scroll to venture back to New Leaf City whenever you want! -2030100 - Return Scroll - Banished Area - Returns you to the map where you were last banished. Requires immediate use and not have changed maps. +2030100 - Return Scroll - Banished Area - Returns you to the map where you were last banished. Requires immediate use and have changed neither maps nor channels. 2031000 - Masked Man's Invitation - An invitation from the Masked Man to the Halloween Party at the Haunted Mansion. Double-click to move straight to the mansion. 2031001 - Studio Invitation - An invitation to the studio for the event "For Guild Only". 2040000 - Scroll for Helmet for DEF - Improves the helmet's weapon def.\nSuccess rate:100%, weapon def. +1 diff --git a/scripts/quest/20720.js b/scripts/quest/20720.js index bbcacca9ec..32de2f42a4 100644 --- a/scripts/quest/20720.js +++ b/scripts/quest/20720.js @@ -15,8 +15,7 @@ function start(mode, type, selection){ else status++; - - else if(status == 0){ + if(status == 0){ qm.sendAcceptDecline("How's the leveling up so far? By this time, you might be able to participate in the Party Quest at #m103000000#. Leveling up is important, yes, but we need you now to take on a mission as a Cygnus Knight. We just received a new information that may help us."); } else if(status == 1){ diff --git a/src/client/MapleBuffStat.java b/src/client/MapleBuffStat.java index ca743768aa..7fc2dc2d45 100644 --- a/src/client/MapleBuffStat.java +++ b/src/client/MapleBuffStat.java @@ -63,7 +63,7 @@ public enum MapleBuffStat { BERSERK_FURY(0x8000000L), DIVINE_BODY(0x10000000L), SPARK(0x20000000L), - //0x40000000L + MAP_CHAIR(0x40000000L), FINALATTACK(0x80000000L), BATTLESHIP(0xA00000040L), // weird one WATK(0x100000000L), diff --git a/src/client/MapleCharacter.java b/src/client/MapleCharacter.java index 3951515d4a..9ed42925fd 100644 --- a/src/client/MapleCharacter.java +++ b/src/client/MapleCharacter.java @@ -121,6 +121,7 @@ import constants.GameConstants; import constants.ItemConstants; import constants.ServerConstants; import constants.skills.Aran; +import constants.skills.Beginner; import constants.skills.Bishop; import constants.skills.BlazeWizard; import constants.skills.Bowmaster; @@ -135,10 +136,12 @@ import constants.skills.GM; import constants.skills.Hermit; import constants.skills.Hero; import constants.skills.ILArchMage; +import constants.skills.Legend; import constants.skills.Magician; import constants.skills.Marauder; import constants.skills.Marksman; import constants.skills.NightLord; +import constants.skills.Noblesse; import constants.skills.Paladin; import constants.skills.Priest; import constants.skills.Ranger; @@ -1248,7 +1251,7 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject { private void changeMapInternal(final MapleMap to, final Point pos, final byte[] warpPacket) { if(!canWarpMap) return; - this.stopChairTask(); + this.unregisterChairBuff(); this.clearBanishPlayerData(); this.closePlayerInteractions(); this.resetPlayerAggro(); @@ -2994,6 +2997,8 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject { prtLock.unlock(); } } + } else if (effect.isMapChair()) { + stopChairTask(); } List> toCancel = deregisterBuffStats(buffstats); @@ -3263,6 +3268,8 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject { stopExtraTask(); startExtraTask(extraHpRec, extraMpRec, extraRecInterval); // HP & MP sharing the same task holder } + } else if (effect.isMapChair()) { + startChairTask(); } effLock.lock(); @@ -3324,7 +3331,36 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject { recalcLocalStats(); } - + + private static int getJobMapChair(MapleJob job) { + switch(job.getId() / 1000) { + case 0: + return Beginner.MAP_CHAIR; + case 1: + return Noblesse.MAP_CHAIR; + default: + return Legend.MAP_CHAIR; + } + } + + public void unregisterChairBuff() { + int skillId = getJobMapChair(job); + int skillLv = getSkillLevel(skillId); + if(skillLv > 0) { + MapleStatEffect mapChairSkill = SkillFactory.getSkill(skillId).getEffect(skillLv); + cancelEffect(mapChairSkill, false, -1); + } + } + + public void registerChairBuff() { + int skillId = getJobMapChair(job); + int skillLv = getSkillLevel(skillId); + if(skillLv > 0) { + MapleStatEffect mapChairSkill = SkillFactory.getSkill(skillId).getEffect(skillLv); + mapChairSkill.applyTo(this); + } + } + public int getChair() { return chair.get(); } diff --git a/src/client/MapleClient.java b/src/client/MapleClient.java index 588b982770..4328a75cae 100644 --- a/src/client/MapleClient.java +++ b/src/client/MapleClient.java @@ -1316,7 +1316,6 @@ public class MapleClient { player.cancelBuffExpireTask(); player.cancelDiseaseExpireTask(); player.cancelSkillCooldownTask(); - player.stopChairTask(); //Cancelling magicdoor? Nope //Cancelling mounts? Noty if (player.getBuffedValue(MapleBuffStat.PUPPET) != null) { diff --git a/src/client/SkillFactory.java b/src/client/SkillFactory.java index 38f43f1c48..8e0e5398c4 100644 --- a/src/client/SkillFactory.java +++ b/src/client/SkillFactory.java @@ -74,9 +74,7 @@ import constants.skills.WhiteKnight; import constants.skills.WindArcher; import java.io.File; -import java.util.ArrayList; import java.util.HashMap; -import java.util.List; import java.util.Map; import provider.MapleData; @@ -189,6 +187,7 @@ public class SkillFactory { case Beginner.NIMBLE_FEET: case Beginner.MONSTER_RIDER: case Beginner.ECHO_OF_HERO: + case Beginner.MAP_CHAIR: case Swordsman.IRON_BODY: case Fighter.AXE_BOOSTER: case Fighter.POWER_GUARD: @@ -303,6 +302,7 @@ public class SkillFactory { case Noblesse.MONSTER_RIDER: case Noblesse.NIMBLE_FEET: case Noblesse.RECOVERY: + case Noblesse.MAP_CHAIR: case DawnWarrior.COMBO: case DawnWarrior.FINAL_ATTACK: case DawnWarrior.IRON_BODY: @@ -346,6 +346,7 @@ public class SkillFactory { case Legend.ECHO_OF_HERO: case Legend.RECOVERY: case Legend.MONSTER_RIDER: + case Legend.MAP_CHAIR: case Aran.MAPLE_WARRIOR: case Aran.HEROS_WILL: case Aran.POLEARM_BOOSTER: diff --git a/src/constants/skills/Beginner.java b/src/constants/skills/Beginner.java index 5b943d525d..1e4be9c7de 100644 --- a/src/constants/skills/Beginner.java +++ b/src/constants/skills/Beginner.java @@ -28,6 +28,7 @@ package constants.skills; public class Beginner { public static final int BLESSING_OF_THE_FAIRY = 12; public static final int FOLLOW_THE_LEADER = 8; + public static final int MAP_CHAIR = 100; public static final int THREE_SNAILS = 1001; public static final int RECOVERY = 1001; public static final int NIMBLE_FEET = 1002; diff --git a/src/constants/skills/Evan.java b/src/constants/skills/Evan.java index 4a3537e849..045e4cde73 100644 --- a/src/constants/skills/Evan.java +++ b/src/constants/skills/Evan.java @@ -4,7 +4,7 @@ public class Evan { // EVAN1 public static final int BLESSING_OF_THE_FAIRY = 20010012; public static final int THREE_SNAILS = 20011000; - public static final int RECOVERY = 20011001; + public static final int RECOVERY = 20011001; public static final int NIMBLE_FEET = 20011002; public static final int LEGENDARY_SPIRIT = 20011003; public static final int MONSTER_RIDER = 20011004; diff --git a/src/constants/skills/Legend.java b/src/constants/skills/Legend.java index 5f12caa540..aabdd13d21 100644 --- a/src/constants/skills/Legend.java +++ b/src/constants/skills/Legend.java @@ -44,6 +44,7 @@ public class Legend { public static final int TUTORIAL_SKILL3 = 20000016; public static final int TUTORIAL_SKILL4 = 20000017; //combo public static final int TUTORIAL_SKILL5 = 20000018; //critical + public static final int MAP_CHAIR = 20000100; public static final int YETI_MOUNT1 = 20001019; public static final int YETI_MOUNT2 = 20001022; public static final int WITCH_BROOMSTICK = 20001023; diff --git a/src/constants/skills/Noblesse.java b/src/constants/skills/Noblesse.java index 1e9901ebaf..074f726449 100644 --- a/src/constants/skills/Noblesse.java +++ b/src/constants/skills/Noblesse.java @@ -27,6 +27,7 @@ package constants.skills; */ public class Noblesse { public static final int BLESSING_OF_THE_FAIRY = 10000012; + public static final int MAP_CHAIR = 10000100; public static final int THREE_SNAILS = 10001000; public static final int RECOVERY = 10001001; public static final int NIMBLE_FEET = 10001002; diff --git a/src/net/server/channel/handlers/CancelChairHandler.java b/src/net/server/channel/handlers/CancelChairHandler.java index 98d055b319..ef64f754c0 100644 --- a/src/net/server/channel/handlers/CancelChairHandler.java +++ b/src/net/server/channel/handlers/CancelChairHandler.java @@ -22,23 +22,28 @@ package net.server.channel.handlers; import client.MapleClient; +import client.MapleCharacter; import net.AbstractMaplePacketHandler; import tools.MaplePacketCreator; import tools.data.input.SeekableLittleEndianAccessor; public final class CancelChairHandler extends AbstractMaplePacketHandler { - + @Override public final void handlePacket(SeekableLittleEndianAccessor slea, MapleClient c) { int id = slea.readShort(); + MapleCharacter mc = c.getPlayer(); + if (id == -1) { // Cancel Chair - c.getPlayer().setChair(0); - c.getPlayer().stopChairTask(); + mc.setChair(0); + mc.unregisterChairBuff(); + c.announce(MaplePacketCreator.cancelChair(-1)); c.getPlayer().getMap().broadcastMessage(c.getPlayer(), MaplePacketCreator.showChair(c.getPlayer().getId(), 0), false); } else { // Use In-Map Chair - c.getPlayer().setChair(id); - c.getPlayer().startChairTask(); + mc.setChair(id); + mc.registerChairBuff(); + c.announce(MaplePacketCreator.cancelChair(id)); } } diff --git a/src/net/server/channel/handlers/NPCMoreTalkHandler.java b/src/net/server/channel/handlers/NPCMoreTalkHandler.java index 7d1105570f..54a0754920 100644 --- a/src/net/server/channel/handlers/NPCMoreTalkHandler.java +++ b/src/net/server/channel/handlers/NPCMoreTalkHandler.java @@ -32,6 +32,7 @@ import tools.data.input.SeekableLittleEndianAccessor; * @author Matze */ public final class NPCMoreTalkHandler extends AbstractMaplePacketHandler { + @Override public final void handlePacket(SeekableLittleEndianAccessor slea, MapleClient c) { byte lastMsg = slea.readByte(); // 00 (last msg type I think) byte action = slea.readByte(); // 00 = end chat, 01 == follow diff --git a/src/net/server/channel/handlers/NPCTalkHandler.java b/src/net/server/channel/handlers/NPCTalkHandler.java index 09e6441aa1..52fc2cd900 100644 --- a/src/net/server/channel/handlers/NPCTalkHandler.java +++ b/src/net/server/channel/handlers/NPCTalkHandler.java @@ -33,6 +33,7 @@ import tools.MaplePacketCreator; import tools.data.input.SeekableLittleEndianAccessor; public final class NPCTalkHandler extends AbstractMaplePacketHandler { + @Override public final void handlePacket(SeekableLittleEndianAccessor slea, MapleClient c) { if (!c.getPlayer().isAlive()) { c.announce(MaplePacketCreator.enableActions()); diff --git a/src/net/server/channel/handlers/QuestActionHandler.java b/src/net/server/channel/handlers/QuestActionHandler.java index b231fad416..69eb70f4d0 100644 --- a/src/net/server/channel/handlers/QuestActionHandler.java +++ b/src/net/server/channel/handlers/QuestActionHandler.java @@ -26,7 +26,6 @@ import client.MapleClient; import net.AbstractMaplePacketHandler; import scripting.quest.QuestScriptManager; import server.quest.MapleQuest; -import tools.MaplePacketCreator; import tools.data.input.SeekableLittleEndianAccessor; /** @@ -34,6 +33,7 @@ import tools.data.input.SeekableLittleEndianAccessor; * @author Matze */ public final class QuestActionHandler extends AbstractMaplePacketHandler { + @Override public final void handlePacket(SeekableLittleEndianAccessor slea, MapleClient c) { byte action = slea.readByte(); short questid = slea.readShort(); diff --git a/src/server/MapleStatEffect.java b/src/server/MapleStatEffect.java index b994f095a3..a43aebe7e0 100644 --- a/src/server/MapleStatEffect.java +++ b/src/server/MapleStatEffect.java @@ -266,7 +266,9 @@ public class MapleStatEffect { } } } else { - if((sourceid == Beginner.NIMBLE_FEET || sourceid == Noblesse.NIMBLE_FEET || sourceid == Evan.NIMBLE_FEET || sourceid == Legend.AGILE_BODY) && ServerConstants.USE_ULTRA_NIMBLE_FEET == true) { + if(isMapChair(sourceid)) { + addBuffStatPairToListIfNotZero(statups, MapleBuffStat.MAP_CHAIR, 1); + } else if((sourceid == Beginner.NIMBLE_FEET || sourceid == Noblesse.NIMBLE_FEET || sourceid == Evan.NIMBLE_FEET || sourceid == Legend.AGILE_BODY) && ServerConstants.USE_ULTRA_NIMBLE_FEET == true) { ret.jump = (short)(ret.speed * 4); ret.speed *= 15; } @@ -756,8 +758,7 @@ public class MapleStatEffect { applyto.dispelDebuff(MapleDisease.SEDUCE); applyto.dispelDebuff(MapleDisease.ZOMBIFY); applyto.dispelDebuffs(); - } - if (isComboReset()) { + } else if (isComboReset()) { applyto.setCombo((short) 0); } /*if (applyfrom.getMp() < getMpCon()) { @@ -1322,6 +1323,15 @@ public class MapleStatEffect { return sourceid == Beginner.RECOVERY || sourceid == Noblesse.RECOVERY || sourceid == Legend.RECOVERY || sourceid == Evan.RECOVERY; } + public boolean isMapChair() { + return sourceid == Beginner.MAP_CHAIR || sourceid == Noblesse.MAP_CHAIR || sourceid == Legend.MAP_CHAIR; + } + + public static boolean isMapChair(int sourceid) { + return sourceid == Beginner.MAP_CHAIR || sourceid == Noblesse.MAP_CHAIR || sourceid == Legend.MAP_CHAIR; + } + + public boolean isDojoBuff() { return sourceid >= 2022359 && sourceid <= 2022421; } diff --git a/src/server/MapleStorage.java b/src/server/MapleStorage.java index f1591dfe9c..83b591aa19 100644 --- a/src/server/MapleStorage.java +++ b/src/server/MapleStorage.java @@ -3,19 +3,16 @@ Copyright (C) 2008 Patrick Huy Matthias Butz Jan Christian Meyer - This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation version 3 as published by the Free Software Foundation. You may not use, modify or distribute this program under any other version of the GNU Affero General Public License. - This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. - You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ @@ -164,12 +161,13 @@ public class MapleStorage { lock.lock(); try { ret = items.remove(slot); + + MapleInventoryType type = MapleItemInformationProvider.getInstance().getInventoryType(ret.getItemId()); + typeItems.put(type, new ArrayList<>(filterItems(type))); } finally { lock.unlock(); } - MapleInventoryType type = MapleItemInformationProvider.getInstance().getInventoryType(ret.getItemId()); - typeItems.put(type, new ArrayList<>(filterItems(type))); return ret; } @@ -177,12 +175,12 @@ public class MapleStorage { lock.lock(); try { items.add(item); + + MapleInventoryType type = MapleItemInformationProvider.getInstance().getInventoryType(item.getItemId()); + typeItems.put(type, new ArrayList<>(filterItems(type))); } finally { lock.unlock(); } - - MapleInventoryType type = MapleItemInformationProvider.getInstance().getInventoryType(item.getItemId()); - typeItems.put(type, new ArrayList<>(filterItems(type))); } public List getItems() { @@ -208,15 +206,20 @@ public class MapleStorage { } public byte getSlot(MapleInventoryType type, byte slot) { - byte ret = 0; - List storageItems = getItems(); - for (Item item : storageItems) { - if (item == typeItems.get(type).get(slot)) { - return ret; + lock.lock(); + try { + byte ret = 0; + List storageItems = getItems(); + for (Item item : storageItems) { + if (item == typeItems.get(type).get(slot)) { + return ret; + } + ret++; } - ret++; + return -1; + } finally { + lock.unlock(); } - return -1; } public void sendStorage(MapleClient c, int npcId) { @@ -235,23 +238,33 @@ public class MapleStorage { return 1; } }); + + List storageItems = getItems(); + for (MapleInventoryType type : MapleInventoryType.values()) { + typeItems.put(type, new ArrayList<>(storageItems)); + } + c.announce(MaplePacketCreator.getStorage(npcId, slots, storageItems, meso)); } finally { lock.unlock(); } - - List storageItems = getItems(); - for (MapleInventoryType type : MapleInventoryType.values()) { - typeItems.put(type, new ArrayList<>(storageItems)); - } - c.announce(MaplePacketCreator.getStorage(npcId, slots, storageItems, meso)); } public void sendStored(MapleClient c, MapleInventoryType type) { - c.announce(MaplePacketCreator.storeStorage(slots, type, typeItems.get(type))); + lock.lock(); + try { + c.announce(MaplePacketCreator.storeStorage(slots, type, typeItems.get(type))); + } finally { + lock.unlock(); + } } public void sendTakenOut(MapleClient c, MapleInventoryType type) { - c.announce(MaplePacketCreator.takeOutStorage(slots, type, typeItems.get(type))); + lock.lock(); + try { + c.announce(MaplePacketCreator.takeOutStorage(slots, type, typeItems.get(type))); + } finally { + lock.unlock(); + } } public int getMeso() { @@ -279,6 +292,11 @@ public class MapleStorage { } public void close() { - typeItems.clear(); + lock.lock(); + try { + typeItems.clear(); + } finally { + lock.unlock(); + } } -} +} \ No newline at end of file diff --git a/src/server/maps/MapleHiredMerchant.java b/src/server/maps/MapleHiredMerchant.java index 96a7692cd6..a6563bd599 100644 --- a/src/server/maps/MapleHiredMerchant.java +++ b/src/server/maps/MapleHiredMerchant.java @@ -167,7 +167,8 @@ public class MapleHiredMerchant extends AbstractMapleMapObject { } int price = (int)Math.min((long)pItem.getPrice() * quantity, Integer.MAX_VALUE); if (c.getPlayer().getMeso() >= price) { - if (MapleInventoryManipulator.addFromDrop(c, newItem, false)) { + if (MapleInventoryManipulator.checkSpace(c, newItem.getItemId(), newItem.getQuantity(), newItem.getOwner())) { + MapleInventoryManipulator.addFromDrop(c, newItem, false); c.getPlayer().gainMeso(-price, false); synchronized (sold) { @@ -196,7 +197,7 @@ public class MapleHiredMerchant extends AbstractMapleMapObject { } } } else { - c.getPlayer().dropMessage(1, "Your inventory is full. Please clean a slot before buying this item."); + c.getPlayer().dropMessage(1, "Your inventory is full. Please clear a slot before buying this item."); } } else { c.getPlayer().dropMessage(1, "You do not have enough mesos."); diff --git a/wz/Skill.wz/000.img.xml b/wz/Skill.wz/000.img.xml index cad3b05d19..1b643c5d09 100644 --- a/wz/Skill.wz/000.img.xml +++ b/wz/Skill.wz/000.img.xml @@ -2713,5 +2713,27 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/wz/Skill.wz/1000.img.xml b/wz/Skill.wz/1000.img.xml index 0bcd88049c..7870c0db39 100644 --- a/wz/Skill.wz/1000.img.xml +++ b/wz/Skill.wz/1000.img.xml @@ -1425,7 +1425,7 @@ - + @@ -1441,126 +1441,11 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -2893,5 +2778,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wz/Skill.wz/2000.img.xml b/wz/Skill.wz/2000.img.xml index 5b3c0a95ab..efd0896a79 100644 --- a/wz/Skill.wz/2000.img.xml +++ b/wz/Skill.wz/2000.img.xml @@ -2981,5 +2981,27 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/wz/String.wz/Consume.img.xml b/wz/String.wz/Consume.img.xml index f2e7a7367e..cc7b624de6 100644 --- a/wz/String.wz/Consume.img.xml +++ b/wz/String.wz/Consume.img.xml @@ -1533,7 +1533,7 @@ - + diff --git a/wz/String.wz/Skill.img.xml b/wz/String.wz/Skill.img.xml index 8c1f5ca5ea..62db55c0bc 100644 --- a/wz/String.wz/Skill.img.xml +++ b/wz/String.wz/Skill.img.xml @@ -11606,29 +11606,10 @@ - - - - - - - - - - - - - - - - - - - - - - - + + + + @@ -12709,4 +12690,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +