Scrolls for spike/cold protection + quest completion with equipped items
Added mechanic for the scrolls for spikes on shoes and cold protection on capes. Fixed an issue where equipped items were being counted towards materials for quests, therefore showing odds behaviours when completing it. Fixed some minor issues on the dollhouse quest/event.
This commit is contained in:
@@ -239,4 +239,7 @@ Corre
|
||||
21 Maio 2017,
|
||||
Refatoração de código referente ao métodos de coleta de item pelos jogadores.
|
||||
Retiradas inconsistências entre infos de mobbook e "cartão-de-visitas" do jogador.
|
||||
Foi retirado o gargalo no sistema sempre que jogador incorpora um novo card ao mobbook.
|
||||
Foi retirado o gargalo no sistema sempre que jogador incorpora um novo card ao mobbook.
|
||||
Consertado bug em potencial ao tentar completar quest que requer item equipado.
|
||||
Adição de scrolls: Scroll for cold protection, Scroll for spike for shoes.
|
||||
Consertado quest-evento Dollhouse.
|
||||
@@ -3,8 +3,37 @@
|
||||
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
|
||||
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
|
||||
<group>
|
||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/net/server/channel/handlers/ItemPickupHandler.java</file>
|
||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/tools/MaplePacketCreator.java</file>
|
||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/client/command/Commands.java</file>
|
||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/maps/HiredMerchant.java</file>
|
||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/MapleStatEffect.java</file>
|
||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/scripting/AbstractPlayerInteraction.java</file>
|
||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/world0/2040020.js</file>
|
||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/world0/2040002.js</file>
|
||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/net/server/channel/handlers/PlayerInteractionHandler.java</file>
|
||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/MapleItemInformationProvider.java</file>
|
||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/net/server/channel/handlers/StorageHandler.java</file>
|
||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/net/server/channel/handlers/UseCashItemHandler.java</file>
|
||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/client/inventory/Equip.java</file>
|
||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/scripting/event/EventInstanceManager.java</file>
|
||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/client/MapleBuffStat.java</file>
|
||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/maps/MapleMap.java</file>
|
||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/client/MapleCharacter.java</file>
|
||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/world0/2040028.js</file>
|
||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/net/server/channel/handlers/PlayerLoggedinHandler.java</file>
|
||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/event/EllinPQ.js</file>
|
||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/constants/ItemConstants.java</file>
|
||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/maps/MapleReactor.java</file>
|
||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/maps/MapleDragon.java</file>
|
||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/world0/2133000.js</file>
|
||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/client/inventory/MapleInventory.java</file>
|
||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/event/DollHouse.js</file>
|
||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/net/server/channel/handlers/ScrollHandler.java</file>
|
||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/maps/AbstractMapleMapObject.java</file>
|
||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/quest/MapleQuestRequirementType.java</file>
|
||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/scripting/npc/NPCConversationManager.java</file>
|
||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/MapleInventoryManipulator.java</file>
|
||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/quest/actions/PetSkillAction.java</file>
|
||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/quest/MapleQuest.java</file>
|
||||
</group>
|
||||
</open-files>
|
||||
</project-private>
|
||||
|
||||
@@ -24,8 +24,9 @@
|
||||
**/
|
||||
importPackage(Packages.tools);
|
||||
|
||||
var returnMap;
|
||||
var map;
|
||||
var entryMap = 922000010;
|
||||
var exitMap = 221024400;
|
||||
var eventTime = 10; //10 minutes
|
||||
var eim;
|
||||
|
||||
function init() {
|
||||
@@ -33,59 +34,45 @@ function init() {
|
||||
}
|
||||
|
||||
function playerEntry(eim, player) {
|
||||
returnMap = em.getChannelServer().getMapFactory().getMap(221024400);
|
||||
eim = em.getInstance("DollHouse");
|
||||
map = eim.getMapFactory().getMap(922000010);
|
||||
player.changeMap(map, map.getPortal(0));
|
||||
map.shuffleReactors();
|
||||
eim.getInstanceMap(entryMap).shuffleReactors();
|
||||
eim.setExclusiveItems([4031094]);
|
||||
|
||||
player.changeMap(entryMap, 0);
|
||||
em.setProperty("noEntry","true");
|
||||
em.schedule("timeOut", 600000);
|
||||
player.getClient().getSession().write(MaplePacketCreator.getClock(600));
|
||||
|
||||
player.getClient().getSession().write(MaplePacketCreator.getClock(eventTime * 60));
|
||||
eim.startEventTimer(eventTime * 60000);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function playerExit(eim, player) {
|
||||
em.setProperty("noEntry","false");
|
||||
player.changeMap(returnMap, returnMap.getPortal(4));
|
||||
//eim.unregisterPlayer(player); needed no more
|
||||
em.cancel();
|
||||
em.disposeInstance("DollHouse");
|
||||
eim.unregisterPlayer(player);
|
||||
eim.dispose();
|
||||
em.setProperty("noEntry","false");
|
||||
}
|
||||
|
||||
function timeOut() {
|
||||
em.setProperty("noEntry","false");
|
||||
function scheduledTimeout(eim) {
|
||||
var player = eim.getPlayers().get(0);
|
||||
player.changeMap(returnMap, returnMap.getPortal(4));
|
||||
//eim.unregisterPlayer(player);
|
||||
em.cancel();
|
||||
em.disposeInstance("DollHouse");
|
||||
eim.dispose();
|
||||
playerExit(eim, eim.getPlayers().get(0));
|
||||
player.changeMap(exitMap, 4);
|
||||
}
|
||||
|
||||
function playerDisconnected(eim, player) {
|
||||
em.setProperty("noEntry","false");
|
||||
player.getMap().removePlayer(player);
|
||||
player.setMap(returnMap);
|
||||
//eim.unregisterPlayer(player);
|
||||
em.cancel();
|
||||
em.disposeInstance("DollHouse");
|
||||
eim.dispose();
|
||||
playerExit(eim, player);
|
||||
}
|
||||
|
||||
function clear(eim) {
|
||||
em.setProperty("noEntry","false");
|
||||
var player = eim.getPlayers().get(0);
|
||||
player.changeMap(returnMap, returnMap.getPortal(4));
|
||||
//eim.unregisterPlayer(player);
|
||||
em.cancel();
|
||||
em.disposeInstance("DollHouse");
|
||||
eim.unregisterPlayer(player);
|
||||
player.changeMap(exitMap, 4);
|
||||
|
||||
eim.dispose();
|
||||
em.setProperty("noEntry","false");
|
||||
}
|
||||
|
||||
function cancelSchedule() {
|
||||
function changedMap(eim, chr, mapid) {
|
||||
if(mapid != entryMap) playerExit(eim, chr);
|
||||
}
|
||||
|
||||
function dispose() {
|
||||
}
|
||||
function cancelSchedule() {}
|
||||
|
||||
function dispose() {}
|
||||
|
||||
@@ -24,24 +24,39 @@
|
||||
*/
|
||||
|
||||
var greeting;
|
||||
var status;
|
||||
|
||||
function start() {
|
||||
var greeting = "Thank you for finding the pendulum. Are you ready to return to Eos Tower?";
|
||||
if (cm.isQuestStarted(3230)) {
|
||||
if (cm.haveItem(4031094)) {
|
||||
cm.completeQuest(3230);
|
||||
cm.gainItem(4031094, -1);
|
||||
} else
|
||||
greeting = "You haven't found the pendulum yet. Do you want to go back to Eos Tower?";
|
||||
}
|
||||
cm.sendYesNo(greeting);
|
||||
status = -1;
|
||||
action(1, 0, 0);
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode > 0) {
|
||||
var em = cm.getEventManager("DollHouse");
|
||||
var eim = em.getInstance("DollHouse");
|
||||
eim.exitPlayer(cm.getPlayer());
|
||||
if (mode == -1) {
|
||||
cm.dispose();
|
||||
} else {
|
||||
if (mode == 0 && status == 0) {
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
if (mode == 1)
|
||||
status++;
|
||||
else
|
||||
status--;
|
||||
|
||||
if(status == 0) {
|
||||
var greeting = "Thank you for finding the pendulum. Are you ready to return to Eos Tower?";
|
||||
if (cm.isQuestStarted(3230)) {
|
||||
if (cm.haveItem(4031094)) {
|
||||
cm.completeQuest(3230);
|
||||
cm.gainItem(4031094, -1);
|
||||
} else
|
||||
greeting = "You haven't found the pendulum yet. Do you want to go back to Eos Tower?";
|
||||
}
|
||||
cm.sendYesNo(greeting);
|
||||
} else if(status == 1) {
|
||||
cm.warp(221024400, 4);
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
cm.dispose();
|
||||
}
|
||||
@@ -35,49 +35,50 @@ INSERT IGNORE INTO `shopitems` (`shopitemid`, `shopid`, `itemid`, `price`, `pitc
|
||||
(995055, 9201082, 2043001, 520000, 0, 24),
|
||||
(995056, 9201082, 2043801, 520000, 0, 25),
|
||||
(995057, 9201082, 2044601, 520000, 0, 26),
|
||||
(995058, 9201082, 2040727, 10000, 0, 27),
|
||||
(995059, 9201082, 2040807, 1000000, 0, 28),
|
||||
(995060, 9201082, 2040026, 15000, 0, 29),
|
||||
(995061, 9201082, 2040031, 15000, 0, 30),
|
||||
(995062, 9201082, 2040302, 25000, 0, 31),
|
||||
(995063, 9201082, 2040318, 25000, 0, 32),
|
||||
(995064, 9201082, 2040323, 25000, 0, 33),
|
||||
(995065, 9201082, 2040412, 20000, 0, 34),
|
||||
(995066, 9201082, 2040419, 20000, 0, 35),
|
||||
(995067, 9201082, 2040502, 25000, 0, 36),
|
||||
(995068, 9201082, 2040514, 25000, 0, 37),
|
||||
(995069, 9201082, 2040517, 25000, 0, 38),
|
||||
(995070, 9201082, 2040534, 25000, 0, 39),
|
||||
(995071, 9201082, 2040612, 20000, 0, 40),
|
||||
(995072, 9201082, 2040702, 20000, 0, 41),
|
||||
(995073, 9201082, 2040705, 25000, 0, 42),
|
||||
(995074, 9201082, 2040805, 100000, 0, 43),
|
||||
(995075, 9201082, 2040915, 55000, 0, 44),
|
||||
(995076, 9201082, 2040920, 55000, 0, 45),
|
||||
(995077, 9201082, 2041014, 30000, 0, 46),
|
||||
(995078, 9201082, 2041017, 30000, 0, 47),
|
||||
(995079, 9201082, 2041020, 30000, 0, 48),
|
||||
(995080, 9201082, 2041023, 30000, 0, 49),
|
||||
(995081, 9201082, 2044902, 50000, 0, 50),
|
||||
(995082, 9201082, 2044702, 50000, 0, 51),
|
||||
(995083, 9201082, 2043002, 50000, 0, 52),
|
||||
(995084, 9201082, 2043802, 50000, 0, 53),
|
||||
(995085, 9201082, 2044602, 50000, 0, 54),
|
||||
(996000, 9201082, 2049200, 170000, 0, 55),
|
||||
(996001, 9201082, 2049201, 220000, 0, 56),
|
||||
(996002, 9201082, 2049202, 170000, 0, 57),
|
||||
(996003, 9201082, 2049203, 220000, 0, 58),
|
||||
(996004, 9201082, 2049204, 170000, 0, 59),
|
||||
(996005, 9201082, 2049205, 220000, 0, 60),
|
||||
(996006, 9201082, 2049206, 170000, 0, 61),
|
||||
(996007, 9201082, 2049207, 220000, 0, 62),
|
||||
(996008, 9201082, 2049208, 140000, 0, 63),
|
||||
(996009, 9201082, 2049209, 170000, 0, 64),
|
||||
(996010, 9201082, 2049210, 140000, 0, 65),
|
||||
(996011, 9201082, 2049211, 170000, 0, 66),
|
||||
(996196, 9201082, 2070016, 120000000, 0, 67),
|
||||
(996197, 9201082, 2070018, 190000000, 0, 68),
|
||||
(994782, 9201082, 2030007, 1800000, 0, 69),
|
||||
(994783, 9201082, 4001017, 60000000, 0, 70);
|
||||
(995058, 9201082, 2040727, 50000, 0, 27),
|
||||
(995059, 9201082, 2041058, 50000, 0, 28),
|
||||
(995060, 9201082, 2040807, 1000000, 0, 29),
|
||||
(995061, 9201082, 2040026, 15000, 0, 30),
|
||||
(995062, 9201082, 2040031, 15000, 0, 31),
|
||||
(995063, 9201082, 2040302, 25000, 0, 32),
|
||||
(995064, 9201082, 2040318, 25000, 0, 33),
|
||||
(995065, 9201082, 2040323, 25000, 0, 34),
|
||||
(995066, 9201082, 2040412, 20000, 0, 35),
|
||||
(995067, 9201082, 2040419, 20000, 0, 36),
|
||||
(995068, 9201082, 2040502, 25000, 0, 37),
|
||||
(995069, 9201082, 2040514, 25000, 0, 38),
|
||||
(995070, 9201082, 2040517, 25000, 0, 39),
|
||||
(995071, 9201082, 2040534, 25000, 0, 40),
|
||||
(995072, 9201082, 2040612, 20000, 0, 41),
|
||||
(995073, 9201082, 2040702, 20000, 0, 42),
|
||||
(995074, 9201082, 2040705, 25000, 0, 43),
|
||||
(995075, 9201082, 2040805, 100000, 0, 44),
|
||||
(995076, 9201082, 2040915, 55000, 0, 45),
|
||||
(995077, 9201082, 2040920, 55000, 0, 46),
|
||||
(995078, 9201082, 2041014, 30000, 0, 47),
|
||||
(995079, 9201082, 2041017, 30000, 0, 48),
|
||||
(995080, 9201082, 2041020, 30000, 0, 49),
|
||||
(995081, 9201082, 2041023, 30000, 0, 50),
|
||||
(995082, 9201082, 2044902, 50000, 0, 51),
|
||||
(995083, 9201082, 2044702, 50000, 0, 52),
|
||||
(995084, 9201082, 2043002, 50000, 0, 53),
|
||||
(995085, 9201082, 2043802, 50000, 0, 54),
|
||||
(995086, 9201082, 2044602, 50000, 0, 55),
|
||||
(996000, 9201082, 2049200, 170000, 0, 56),
|
||||
(996001, 9201082, 2049201, 220000, 0, 57),
|
||||
(996002, 9201082, 2049202, 170000, 0, 58),
|
||||
(996003, 9201082, 2049203, 220000, 0, 59),
|
||||
(996004, 9201082, 2049204, 170000, 0, 60),
|
||||
(996005, 9201082, 2049205, 220000, 0, 61),
|
||||
(996006, 9201082, 2049206, 170000, 0, 62),
|
||||
(996007, 9201082, 2049207, 220000, 0, 63),
|
||||
(996008, 9201082, 2049208, 140000, 0, 64),
|
||||
(996009, 9201082, 2049209, 170000, 0, 65),
|
||||
(996010, 9201082, 2049210, 140000, 0, 66),
|
||||
(996011, 9201082, 2049211, 170000, 0, 67),
|
||||
(996196, 9201082, 2070016, 120000000, 0, 68),
|
||||
(996197, 9201082, 2070018, 190000000, 0, 69),
|
||||
(994782, 9201082, 2030007, 1800000, 0, 70),
|
||||
(994783, 9201082, 4001017, 60000000, 0, 71);
|
||||
|
||||
UPDATE shopitems SET price = 11*price WHERE (`position` >= 27 and `position` <= 66 and `shopid` = 9201082);
|
||||
UPDATE shopitems SET price = 11*price WHERE (`position` >= 27 and `position` <= 67 and `shopid` = 9201082);
|
||||
@@ -111,7 +111,7 @@ public enum MapleBuffStat {
|
||||
SMART_KNOCKBACK(0x10000000000L, true),
|
||||
PYRAMID_PQ(0x20000000000L, true),
|
||||
ENERGY_CHARGE(0x4000000000000L, true),
|
||||
DASH2(0x8000000000000L, true), // correct (speed)
|
||||
DASH2(0x8000000000000L, true), // correct (speed)
|
||||
DASH(0x10000000000000L, true), // correct (jump)
|
||||
MONSTER_RIDING(0x20000000000000L, true),
|
||||
SPEED_INFUSION(0x40000000000000L, true),
|
||||
|
||||
@@ -1197,6 +1197,10 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
|
||||
}
|
||||
}
|
||||
|
||||
for(Item it: this.getInventory(MapleInventoryType.EQUIPPED).list()) {
|
||||
if((it.getFlag() & ItemConstants.COLD) == ItemConstants.COLD && map.getReturnMapId() == 211000000) return(true); //protection from cold
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -415,7 +415,7 @@ public final class PlayerInteractionHandler extends AbstractMaplePacketHandler {
|
||||
if (chr.getTrade() != null) {
|
||||
if ((quantity <= item.getQuantity() && quantity >= 0) || ItemConstants.isRechargable(item.getItemId())) {
|
||||
if (ii.isDropRestricted(item.getItemId())) { // ensure that undroppable items do not make it to the trade window
|
||||
if (!((item.getFlag() & ItemConstants.KARMA) == ItemConstants.KARMA || (item.getFlag() & ItemConstants.SPIKES) == ItemConstants.SPIKES)) {
|
||||
if (!((item.getFlag() & ItemConstants.KARMA) == ItemConstants.KARMA)) {
|
||||
c.announce(MaplePacketCreator.enableActions());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ import client.inventory.Item;
|
||||
import client.inventory.MapleInventory;
|
||||
import client.inventory.MapleInventoryType;
|
||||
import client.inventory.ModifyInventory;
|
||||
import constants.ItemConstants;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import net.AbstractMaplePacketHandler;
|
||||
@@ -97,7 +98,7 @@ public final class ScrollHandler extends AbstractMaplePacketHandler {
|
||||
ScrollResult scrollSuccess = Equip.ScrollResult.FAIL; // fail
|
||||
if (scrolled == null) {
|
||||
scrollSuccess = Equip.ScrollResult.CURSE;
|
||||
} else if (scrolled.getLevel() > oldLevel || (isCleanSlate(scroll.getItemId()) && scrolled.getUpgradeSlots() == oldSlots + 1)) {
|
||||
} else if (scrolled.getLevel() > oldLevel || (isCleanSlate(scroll.getItemId()) && scrolled.getUpgradeSlots() == oldSlots + 1) || isFlagModifier(scroll.getItemId(), scrolled.getFlag())) {
|
||||
scrollSuccess = Equip.ScrollResult.SUCCESS;
|
||||
}
|
||||
MapleInventoryManipulator.removeFromSlot(c, MapleInventoryType.USE, scroll.getPosition(), (short) 1, false);
|
||||
@@ -123,6 +124,12 @@ public final class ScrollHandler extends AbstractMaplePacketHandler {
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isFlagModifier(int scrollId, byte flag) {
|
||||
if(scrollId == 2041058 && ((flag & ItemConstants.COLD) == ItemConstants.COLD)) return true;
|
||||
if(scrollId == 2040727 && ((flag & ItemConstants.SPIKES) == ItemConstants.SPIKES)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean isCleanSlate(int scrollId) {
|
||||
return scrollId > 2048999 && scrollId < 2049004;
|
||||
}
|
||||
|
||||
@@ -82,8 +82,6 @@ public final class StorageHandler extends AbstractMaplePacketHandler {
|
||||
FilePrinter.printError(FilePrinter.STORAGE + c.getAccountName() + ".txt", c.getPlayer().getName() + " took out " + item.getQuantity() + " " + itemName + " (" + item.getItemId() + ")\r\n");
|
||||
if ((item.getFlag() & ItemConstants.KARMA) == ItemConstants.KARMA) {
|
||||
item.setFlag((byte) (item.getFlag() ^ ItemConstants.KARMA)); //items with scissors of karma used on them are reset once traded
|
||||
} else if (item.getType() == 2 && (item.getFlag() & ItemConstants.SPIKES) == ItemConstants.SPIKES){
|
||||
item.setFlag((byte) (item.getFlag() ^ ItemConstants.SPIKES));
|
||||
}
|
||||
MapleInventoryManipulator.addFromDrop(c, item, false);
|
||||
storage.sendTakenOut(c, ii.getInventoryType(item.getItemId()));
|
||||
|
||||
@@ -490,9 +490,7 @@ public final class UseCashItemHandler extends AbstractMaplePacketHandler {
|
||||
c.announce(MaplePacketCreator.enableActions());
|
||||
return;
|
||||
}
|
||||
if (type.equals(MapleInventoryType.USE)) {
|
||||
item.setFlag((byte) ItemConstants.SPIKES);
|
||||
} else {
|
||||
if (!type.equals(MapleInventoryType.USE)) {
|
||||
item.setFlag((byte) ItemConstants.KARMA);
|
||||
}
|
||||
|
||||
|
||||
@@ -88,10 +88,8 @@ public class MapleTrade {
|
||||
for (Item item : exchangeItems) {
|
||||
if ((item.getFlag() & ItemConstants.KARMA) == ItemConstants.KARMA)
|
||||
item.setFlag((byte) (item.getFlag() ^ ItemConstants.KARMA)); //items with scissors of karma used on them are reset once traded
|
||||
else if (item.getType() == 2 && (item.getFlag() & ItemConstants.SPIKES) == ItemConstants.SPIKES)
|
||||
item.setFlag((byte) (item.getFlag() ^ ItemConstants.SPIKES));
|
||||
|
||||
MapleInventoryManipulator.addFromDrop(chr.getClient(), item, true);
|
||||
MapleInventoryManipulator.addFromDrop(chr.getClient(), item, true);
|
||||
}
|
||||
if (exchangeMeso > 0) {
|
||||
chr.gainMeso(exchangeMeso - getFee(exchangeMeso), true, true, true);
|
||||
|
||||
@@ -143,9 +143,6 @@ public class HiredMerchant extends AbstractMapleMapObject {
|
||||
if ((newItem.getFlag() & ItemConstants.KARMA) == ItemConstants.KARMA) {
|
||||
newItem.setFlag((byte) (newItem.getFlag() ^ ItemConstants.KARMA));
|
||||
}
|
||||
if (newItem.getType() == 2 && (newItem.getFlag() & ItemConstants.SPIKES) == ItemConstants.SPIKES) {
|
||||
newItem.setFlag((byte) (newItem.getFlag() ^ ItemConstants.SPIKES));
|
||||
}
|
||||
if (quantity < 1 || pItem.getBundles() < 1 || !pItem.isExist() || pItem.getBundles() < quantity) {
|
||||
c.announce(MaplePacketCreator.enableActions());
|
||||
return;
|
||||
|
||||
@@ -73,7 +73,7 @@ public class ItemRequirement extends MapleQuestRequirement {
|
||||
count += item.getQuantity();
|
||||
}
|
||||
//Weird stuff, nexon made some quests only available when wearing gm clothes. This enables us to accept it ><
|
||||
if (iType.equals(MapleInventoryType.EQUIP)) {
|
||||
if (iType.equals(MapleInventoryType.EQUIP) && chr.isGM()) {
|
||||
for (Item item : chr.getInventory(MapleInventoryType.EQUIPPED).listById(itemId)) {
|
||||
count += item.getQuantity();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user