Map chair skill + Hired Merchant fix
Changed map chair bonus healing mechanic to be a player skill, instead of promptly available for all players (healing buff takes place only if the player has the skill). Hired Merchant now properly checks for a space on the inventory before permitting a player to buy an item/bundle. Minor fix with concurrency on MapleStorage.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#Wed, 18 Oct 2017 15:51:18 -0200
|
||||
#Sun, 22 Oct 2017 00:39:49 -0200
|
||||
|
||||
|
||||
C\:\\Nexon\\MapleSolaxia\\MapleSolaxiaV2=
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
dist/MapleSolaxia.jar
vendored
BIN
dist/MapleSolaxia.jar
vendored
Binary file not shown.
@@ -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.
|
||||
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.
|
||||
@@ -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.#
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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){
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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<Pair<MapleBuffStat, MapleBuffStatValueHolder>> 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();
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -3,19 +3,16 @@
|
||||
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
|
||||
Matthias Butz <matze@odinms.de>
|
||||
Jan Christian Meyer <vimes@odinms.de>
|
||||
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -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<Item> getItems() {
|
||||
@@ -208,15 +206,20 @@ public class MapleStorage {
|
||||
}
|
||||
|
||||
public byte getSlot(MapleInventoryType type, byte slot) {
|
||||
byte ret = 0;
|
||||
List<Item> storageItems = getItems();
|
||||
for (Item item : storageItems) {
|
||||
if (item == typeItems.get(type).get(slot)) {
|
||||
return ret;
|
||||
lock.lock();
|
||||
try {
|
||||
byte ret = 0;
|
||||
List<Item> 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<Item> 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<Item> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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.");
|
||||
|
||||
@@ -2713,5 +2713,27 @@
|
||||
<int name="timeLimited" value="1"/>
|
||||
<int name="disable" value="1"/>
|
||||
</imgdir>
|
||||
<imgdir name="0000100">
|
||||
<canvas name="icon" width="32" height="32">
|
||||
<vector name="origin" x="0" y="32"/>
|
||||
<int name="z" value="0"/>
|
||||
</canvas>
|
||||
<canvas name="iconMouseOver" width="32" height="32">
|
||||
<vector name="origin" x="0" y="32"/>
|
||||
<int name="z" value="0"/>
|
||||
</canvas>
|
||||
<canvas name="iconDisabled" width="32" height="32">
|
||||
<vector name="origin" x="0" y="32"/>
|
||||
<int name="z" value="0"/>
|
||||
</canvas>
|
||||
<imgdir name="level">
|
||||
<imgdir name="1">
|
||||
<string name="hs" value="h1"/>
|
||||
<int name="time" value="2100000"/>
|
||||
</imgdir>
|
||||
</imgdir>
|
||||
<int name="disable" value="1"/>
|
||||
<int name="invisible" value="1"/>
|
||||
</imgdir>
|
||||
</imgdir>
|
||||
</imgdir>
|
||||
|
||||
@@ -1425,7 +1425,7 @@
|
||||
<int name="z" value="-8"/>
|
||||
</imgdir>
|
||||
</imgdir>
|
||||
<imgdir name="10000012">
|
||||
<imgdir name="10000100">
|
||||
<canvas name="icon" width="32" height="32">
|
||||
<vector name="origin" x="0" y="32"/>
|
||||
<int name="z" value="0"/>
|
||||
@@ -1441,126 +1441,11 @@
|
||||
<imgdir name="level">
|
||||
<imgdir name="1">
|
||||
<string name="hs" value="h1"/>
|
||||
<int name="x" value="1"/>
|
||||
<int name="y" value="2"/>
|
||||
<int name="z" value="1"/>
|
||||
</imgdir>
|
||||
<imgdir name="2">
|
||||
<string name="hs" value="h2"/>
|
||||
<int name="x" value="2"/>
|
||||
<int name="y" value="4"/>
|
||||
<int name="z" value="2"/>
|
||||
</imgdir>
|
||||
<imgdir name="3">
|
||||
<string name="hs" value="h3"/>
|
||||
<int name="x" value="3"/>
|
||||
<int name="y" value="6"/>
|
||||
<int name="z" value="3"/>
|
||||
</imgdir>
|
||||
<imgdir name="4">
|
||||
<string name="hs" value="h4"/>
|
||||
<int name="x" value="4"/>
|
||||
<int name="y" value="8"/>
|
||||
<int name="z" value="4"/>
|
||||
</imgdir>
|
||||
<imgdir name="5">
|
||||
<string name="hs" value="h5"/>
|
||||
<int name="x" value="5"/>
|
||||
<int name="y" value="10"/>
|
||||
<int name="z" value="5"/>
|
||||
</imgdir>
|
||||
<imgdir name="6">
|
||||
<string name="hs" value="h6"/>
|
||||
<int name="x" value="6"/>
|
||||
<int name="y" value="12"/>
|
||||
<int name="z" value="6"/>
|
||||
</imgdir>
|
||||
<imgdir name="7">
|
||||
<string name="hs" value="h7"/>
|
||||
<int name="x" value="7"/>
|
||||
<int name="y" value="14"/>
|
||||
<int name="z" value="7"/>
|
||||
</imgdir>
|
||||
<imgdir name="8">
|
||||
<string name="hs" value="h8"/>
|
||||
<int name="x" value="8"/>
|
||||
<int name="y" value="16"/>
|
||||
<int name="z" value="8"/>
|
||||
</imgdir>
|
||||
<imgdir name="9">
|
||||
<string name="hs" value="h9"/>
|
||||
<int name="x" value="9"/>
|
||||
<int name="y" value="18"/>
|
||||
<int name="z" value="9"/>
|
||||
</imgdir>
|
||||
<imgdir name="10">
|
||||
<string name="hs" value="h10"/>
|
||||
<int name="x" value="10"/>
|
||||
<int name="y" value="20"/>
|
||||
<int name="z" value="10"/>
|
||||
</imgdir>
|
||||
<imgdir name="11">
|
||||
<string name="hs" value="h11"/>
|
||||
<int name="x" value="11"/>
|
||||
<int name="y" value="22"/>
|
||||
<int name="z" value="11"/>
|
||||
</imgdir>
|
||||
<imgdir name="12">
|
||||
<string name="hs" value="h12"/>
|
||||
<int name="x" value="12"/>
|
||||
<int name="y" value="24"/>
|
||||
<int name="z" value="12"/>
|
||||
</imgdir>
|
||||
<imgdir name="13">
|
||||
<string name="hs" value="h13"/>
|
||||
<int name="x" value="13"/>
|
||||
<int name="y" value="26"/>
|
||||
<int name="z" value="13"/>
|
||||
</imgdir>
|
||||
<imgdir name="14">
|
||||
<string name="hs" value="h14"/>
|
||||
<int name="x" value="14"/>
|
||||
<int name="y" value="28"/>
|
||||
<int name="z" value="14"/>
|
||||
</imgdir>
|
||||
<imgdir name="15">
|
||||
<string name="hs" value="h15"/>
|
||||
<int name="x" value="15"/>
|
||||
<int name="y" value="30"/>
|
||||
<int name="z" value="15"/>
|
||||
</imgdir>
|
||||
<imgdir name="16">
|
||||
<string name="hs" value="h16"/>
|
||||
<int name="x" value="16"/>
|
||||
<int name="y" value="32"/>
|
||||
<int name="z" value="16"/>
|
||||
</imgdir>
|
||||
<imgdir name="17">
|
||||
<string name="hs" value="h17"/>
|
||||
<int name="x" value="17"/>
|
||||
<int name="y" value="34"/>
|
||||
<int name="z" value="17"/>
|
||||
</imgdir>
|
||||
<imgdir name="18">
|
||||
<string name="hs" value="h18"/>
|
||||
<int name="x" value="18"/>
|
||||
<int name="y" value="36"/>
|
||||
<int name="z" value="18"/>
|
||||
</imgdir>
|
||||
<imgdir name="19">
|
||||
<string name="hs" value="h19"/>
|
||||
<int name="x" value="19"/>
|
||||
<int name="y" value="38"/>
|
||||
<int name="z" value="19"/>
|
||||
</imgdir>
|
||||
<imgdir name="20">
|
||||
<string name="hs" value="h20"/>
|
||||
<int name="x" value="20"/>
|
||||
<int name="y" value="40"/>
|
||||
<int name="z" value="20"/>
|
||||
<int name="time" value="2100000"/>
|
||||
</imgdir>
|
||||
</imgdir>
|
||||
<int name="disable" value="1"/>
|
||||
<int name="invisible" value="1"/>
|
||||
</imgdir>
|
||||
<imgdir name="10000018">
|
||||
<canvas name="icon" width="32" height="32">
|
||||
@@ -2893,5 +2778,142 @@
|
||||
<int name="timeLimited" value="1"/>
|
||||
<int name="disable" value="1"/>
|
||||
</imgdir>
|
||||
<imgdir name="10000012">
|
||||
<canvas name="icon" width="32" height="32">
|
||||
<vector name="origin" x="0" y="32"/>
|
||||
<int name="z" value="0"/>
|
||||
</canvas>
|
||||
<canvas name="iconMouseOver" width="32" height="32">
|
||||
<vector name="origin" x="0" y="32"/>
|
||||
<int name="z" value="0"/>
|
||||
</canvas>
|
||||
<canvas name="iconDisabled" width="32" height="32">
|
||||
<vector name="origin" x="0" y="32"/>
|
||||
<int name="z" value="0"/>
|
||||
</canvas>
|
||||
<imgdir name="level">
|
||||
<imgdir name="1">
|
||||
<string name="hs" value="h1"/>
|
||||
<int name="x" value="1"/>
|
||||
<int name="y" value="2"/>
|
||||
<int name="z" value="1"/>
|
||||
</imgdir>
|
||||
<imgdir name="2">
|
||||
<string name="hs" value="h2"/>
|
||||
<int name="x" value="2"/>
|
||||
<int name="y" value="4"/>
|
||||
<int name="z" value="2"/>
|
||||
</imgdir>
|
||||
<imgdir name="3">
|
||||
<string name="hs" value="h3"/>
|
||||
<int name="x" value="3"/>
|
||||
<int name="y" value="6"/>
|
||||
<int name="z" value="3"/>
|
||||
</imgdir>
|
||||
<imgdir name="4">
|
||||
<string name="hs" value="h4"/>
|
||||
<int name="x" value="4"/>
|
||||
<int name="y" value="8"/>
|
||||
<int name="z" value="4"/>
|
||||
</imgdir>
|
||||
<imgdir name="5">
|
||||
<string name="hs" value="h5"/>
|
||||
<int name="x" value="5"/>
|
||||
<int name="y" value="10"/>
|
||||
<int name="z" value="5"/>
|
||||
</imgdir>
|
||||
<imgdir name="6">
|
||||
<string name="hs" value="h6"/>
|
||||
<int name="x" value="6"/>
|
||||
<int name="y" value="12"/>
|
||||
<int name="z" value="6"/>
|
||||
</imgdir>
|
||||
<imgdir name="7">
|
||||
<string name="hs" value="h7"/>
|
||||
<int name="x" value="7"/>
|
||||
<int name="y" value="14"/>
|
||||
<int name="z" value="7"/>
|
||||
</imgdir>
|
||||
<imgdir name="8">
|
||||
<string name="hs" value="h8"/>
|
||||
<int name="x" value="8"/>
|
||||
<int name="y" value="16"/>
|
||||
<int name="z" value="8"/>
|
||||
</imgdir>
|
||||
<imgdir name="9">
|
||||
<string name="hs" value="h9"/>
|
||||
<int name="x" value="9"/>
|
||||
<int name="y" value="18"/>
|
||||
<int name="z" value="9"/>
|
||||
</imgdir>
|
||||
<imgdir name="10">
|
||||
<string name="hs" value="h10"/>
|
||||
<int name="x" value="10"/>
|
||||
<int name="y" value="20"/>
|
||||
<int name="z" value="10"/>
|
||||
</imgdir>
|
||||
<imgdir name="11">
|
||||
<string name="hs" value="h11"/>
|
||||
<int name="x" value="11"/>
|
||||
<int name="y" value="22"/>
|
||||
<int name="z" value="11"/>
|
||||
</imgdir>
|
||||
<imgdir name="12">
|
||||
<string name="hs" value="h12"/>
|
||||
<int name="x" value="12"/>
|
||||
<int name="y" value="24"/>
|
||||
<int name="z" value="12"/>
|
||||
</imgdir>
|
||||
<imgdir name="13">
|
||||
<string name="hs" value="h13"/>
|
||||
<int name="x" value="13"/>
|
||||
<int name="y" value="26"/>
|
||||
<int name="z" value="13"/>
|
||||
</imgdir>
|
||||
<imgdir name="14">
|
||||
<string name="hs" value="h14"/>
|
||||
<int name="x" value="14"/>
|
||||
<int name="y" value="28"/>
|
||||
<int name="z" value="14"/>
|
||||
</imgdir>
|
||||
<imgdir name="15">
|
||||
<string name="hs" value="h15"/>
|
||||
<int name="x" value="15"/>
|
||||
<int name="y" value="30"/>
|
||||
<int name="z" value="15"/>
|
||||
</imgdir>
|
||||
<imgdir name="16">
|
||||
<string name="hs" value="h16"/>
|
||||
<int name="x" value="16"/>
|
||||
<int name="y" value="32"/>
|
||||
<int name="z" value="16"/>
|
||||
</imgdir>
|
||||
<imgdir name="17">
|
||||
<string name="hs" value="h17"/>
|
||||
<int name="x" value="17"/>
|
||||
<int name="y" value="34"/>
|
||||
<int name="z" value="17"/>
|
||||
</imgdir>
|
||||
<imgdir name="18">
|
||||
<string name="hs" value="h18"/>
|
||||
<int name="x" value="18"/>
|
||||
<int name="y" value="36"/>
|
||||
<int name="z" value="18"/>
|
||||
</imgdir>
|
||||
<imgdir name="19">
|
||||
<string name="hs" value="h19"/>
|
||||
<int name="x" value="19"/>
|
||||
<int name="y" value="38"/>
|
||||
<int name="z" value="19"/>
|
||||
</imgdir>
|
||||
<imgdir name="20">
|
||||
<string name="hs" value="h20"/>
|
||||
<int name="x" value="20"/>
|
||||
<int name="y" value="40"/>
|
||||
<int name="z" value="20"/>
|
||||
</imgdir>
|
||||
</imgdir>
|
||||
<int name="disable" value="1"/>
|
||||
</imgdir>
|
||||
</imgdir>
|
||||
</imgdir>
|
||||
|
||||
@@ -2981,5 +2981,27 @@
|
||||
<int name="timeLimited" value="1"/>
|
||||
<int name="disable" value="1"/>
|
||||
</imgdir>
|
||||
<imgdir name="20000100">
|
||||
<canvas name="icon" width="32" height="32">
|
||||
<vector name="origin" x="0" y="32"/>
|
||||
<int name="z" value="0"/>
|
||||
</canvas>
|
||||
<canvas name="iconMouseOver" width="32" height="32">
|
||||
<vector name="origin" x="0" y="32"/>
|
||||
<int name="z" value="0"/>
|
||||
</canvas>
|
||||
<canvas name="iconDisabled" width="32" height="32">
|
||||
<vector name="origin" x="0" y="32"/>
|
||||
<int name="z" value="0"/>
|
||||
</canvas>
|
||||
<imgdir name="level">
|
||||
<imgdir name="1">
|
||||
<string name="hs" value="h1"/>
|
||||
<int name="time" value="2100000"/>
|
||||
</imgdir>
|
||||
</imgdir>
|
||||
<int name="disable" value="1"/>
|
||||
<int name="invisible" value="1"/>
|
||||
</imgdir>
|
||||
</imgdir>
|
||||
</imgdir>
|
||||
|
||||
@@ -1533,7 +1533,7 @@
|
||||
</imgdir>
|
||||
<imgdir name="2030100">
|
||||
<string name="name" value="Return Scroll - Banished Area"/>
|
||||
<string name="desc" value="Returns you to the map where you were last banished. Requires immediate use and not have changed maps nor channels."/>
|
||||
<string name="desc" value="Returns you to the map where you were last banished. Requires immediate use and have changed neither maps nor channels."/>
|
||||
</imgdir>
|
||||
<imgdir name="2031000">
|
||||
<string name="name" value="Masked Man's Invitation"/>
|
||||
|
||||
@@ -11606,29 +11606,10 @@
|
||||
<string name="desc" value="Damage will increase for certain period of time."/>
|
||||
<string name="h1" value="Damage increased by 100% for 30 sec."/>
|
||||
</imgdir>
|
||||
<imgdir name="10000012">
|
||||
<string name="name" value="Blessing of the Fairy"/>
|
||||
<string name="desc" value="[Master Level : 20]\nSkill Point will increase by 1 when the related character reaches above Lv.10."/>
|
||||
<string name="h1" value="WA +1, MA +2, Accuracy and Avoidability +1"/>
|
||||
<string name="h2" value="WA +2, MA +4, Accuracy and Avoidability +2"/>
|
||||
<string name="h3" value="WA +3, MA +6, Accuracy and Avoidability +3"/>
|
||||
<string name="h4" value="WA +4, MA +8, Accuracy and Avoidability +4"/>
|
||||
<string name="h5" value="WA +5, MA +10, Accuracy and Avoidability +5"/>
|
||||
<string name="h6" value="WA +6, MA +12, Accuracy and Avoidability +6"/>
|
||||
<string name="h7" value="WA +7, MA +14, Accuracy and Avoidability +7"/>
|
||||
<string name="h8" value="WA +8, MA +16, Accuracy and Avoidability +8"/>
|
||||
<string name="h9" value="WA +9, MA +18, Accuracy and Avoidability +9"/>
|
||||
<string name="h10" value="WA +10, MA +20, Accuracy and Avoidability +10"/>
|
||||
<string name="h11" value="WA +11, MA +22, Accuracy and Avoidability +11"/>
|
||||
<string name="h12" value="WA +12, MA +24, Accuracy and Avoidability +12"/>
|
||||
<string name="h13" value="WA +13, MA +26, Accuracy and Avoidability +13"/>
|
||||
<string name="h14" value="WA +14, MA +28, Accuracy and Avoidability +14"/>
|
||||
<string name="h15" value="WA +15, MA +30, Accuracy and Avoidability +15"/>
|
||||
<string name="h16" value="WA +16, MA +32, Accuracy and Avoidability +16"/>
|
||||
<string name="h17" value="WA +17, MA +34, Accuracy and Avoidability +17"/>
|
||||
<string name="h18" value="WA +18, MA +36, Accuracy and Avoidability +18"/>
|
||||
<string name="h19" value="WA +19, MA +38, Accuracy and Avoidability +19"/>
|
||||
<string name="h20" value="WA +20, MA +40, Accuracy and Avoidability +20"/>
|
||||
<imgdir name="20000100">
|
||||
<string name="name" value="Chair Mastery"/>
|
||||
<string name="desc" value="[Master Level : 1]\nBonus recovery gain from using map chairs throughout the world."/>
|
||||
<string name="h1" value="Passively recover extra amounts of HP and MP by resting on map chairs."/>
|
||||
</imgdir>
|
||||
<imgdir name="1100">
|
||||
<string name="bookName" value="The Basics of a Dawn Warrior"/>
|
||||
@@ -12709,4 +12690,38 @@
|
||||
<string name="desc" value="[Master Level : 1]\nAllows you to move around while being mounted on a Barlog."/>
|
||||
<string name="h1" value="Consumes 10 MP, Weapon and Magic Defense +10, Speed 120, Jump 120"/>
|
||||
</imgdir>
|
||||
<imgdir name="10000012">
|
||||
<string name="name" value="Blessing of the Fairy"/>
|
||||
<string name="desc" value="[Master Level : 20]\nSkill Point will increase by 1 when the related character reaches above Lv.10."/>
|
||||
<string name="h1" value="WA +1, MA +2, Accuracy and Avoidability +1"/>
|
||||
<string name="h2" value="WA +2, MA +4, Accuracy and Avoidability +2"/>
|
||||
<string name="h3" value="WA +3, MA +6, Accuracy and Avoidability +3"/>
|
||||
<string name="h4" value="WA +4, MA +8, Accuracy and Avoidability +4"/>
|
||||
<string name="h5" value="WA +5, MA +10, Accuracy and Avoidability +5"/>
|
||||
<string name="h6" value="WA +6, MA +12, Accuracy and Avoidability +6"/>
|
||||
<string name="h7" value="WA +7, MA +14, Accuracy and Avoidability +7"/>
|
||||
<string name="h8" value="WA +8, MA +16, Accuracy and Avoidability +8"/>
|
||||
<string name="h9" value="WA +9, MA +18, Accuracy and Avoidability +9"/>
|
||||
<string name="h10" value="WA +10, MA +20, Accuracy and Avoidability +10"/>
|
||||
<string name="h11" value="WA +11, MA +22, Accuracy and Avoidability +11"/>
|
||||
<string name="h12" value="WA +12, MA +24, Accuracy and Avoidability +12"/>
|
||||
<string name="h13" value="WA +13, MA +26, Accuracy and Avoidability +13"/>
|
||||
<string name="h14" value="WA +14, MA +28, Accuracy and Avoidability +14"/>
|
||||
<string name="h15" value="WA +15, MA +30, Accuracy and Avoidability +15"/>
|
||||
<string name="h16" value="WA +16, MA +32, Accuracy and Avoidability +16"/>
|
||||
<string name="h17" value="WA +17, MA +34, Accuracy and Avoidability +17"/>
|
||||
<string name="h18" value="WA +18, MA +36, Accuracy and Avoidability +18"/>
|
||||
<string name="h19" value="WA +19, MA +38, Accuracy and Avoidability +19"/>
|
||||
<string name="h20" value="WA +20, MA +40, Accuracy and Avoidability +20"/>
|
||||
</imgdir>
|
||||
<imgdir name="0000100">
|
||||
<string name="name" value="Chair Mastery"/>
|
||||
<string name="desc" value="[Master Level : 1]\nBonus recovery gain from using map chairs throughout the world."/>
|
||||
<string name="h1" value="Passively recover extra amounts of HP and MP by resting on map chairs."/>
|
||||
</imgdir>
|
||||
<imgdir name="10000100">
|
||||
<string name="name" value="Chair Mastery"/>
|
||||
<string name="desc" value="[Master Level : 1]\nBonus recovery gain from using map chairs throughout the world."/>
|
||||
<string name="h1" value="Passively recover extra amounts of HP and MP by resting on map chairs."/>
|
||||
</imgdir>
|
||||
</imgdir>
|
||||
|
||||
Reference in New Issue
Block a user