Rename and clean up MapleKarmaManipulator
This commit is contained in:
@@ -28,7 +28,7 @@ import client.inventory.Inventory;
|
||||
import client.inventory.InventoryType;
|
||||
import client.inventory.Item;
|
||||
import client.inventory.manipulator.InventoryManipulator;
|
||||
import client.inventory.manipulator.MapleKarmaManipulator;
|
||||
import client.inventory.manipulator.KarmaManipulator;
|
||||
import config.YamlConfig;
|
||||
import constants.game.GameConstants;
|
||||
import constants.inventory.ItemConstants;
|
||||
@@ -511,7 +511,7 @@ public final class PlayerInteractionHandler extends AbstractPacketHandler {
|
||||
if (trade != null) {
|
||||
if ((quantity <= item.getQuantity() && quantity >= 0) || ItemConstants.isRechargeable(item.getItemId())) {
|
||||
if (ii.isDropRestricted(item.getItemId())) { // ensure that undroppable items do not make it to the trade window
|
||||
if (!MapleKarmaManipulator.hasKarmaFlag(item)) {
|
||||
if (!KarmaManipulator.hasKarmaFlag(item)) {
|
||||
c.sendPacket(PacketCreator.serverNotice(1, "That item is untradeable."));
|
||||
c.sendPacket(PacketCreator.enableActions());
|
||||
return;
|
||||
|
||||
@@ -26,7 +26,7 @@ import client.creator.veteran.*;
|
||||
import client.inventory.*;
|
||||
import client.inventory.Equip.ScrollResult;
|
||||
import client.inventory.manipulator.InventoryManipulator;
|
||||
import client.inventory.manipulator.MapleKarmaManipulator;
|
||||
import client.inventory.manipulator.KarmaManipulator;
|
||||
import client.processor.npc.DueyProcessor;
|
||||
import client.processor.stat.AssignAPProcessor;
|
||||
import client.processor.stat.AssignSPProcessor;
|
||||
@@ -507,12 +507,12 @@ public final class UseCashItemHandler extends AbstractPacketHandler {
|
||||
InventoryType type = InventoryType.getByType((byte) p.readInt());
|
||||
short slot = (short) p.readInt();
|
||||
Item item = player.getInventory(type).getItem(slot);
|
||||
if (item == null || item.getQuantity() <= 0 || MapleKarmaManipulator.hasKarmaFlag(item) || !ii.isKarmaAble(item.getItemId())) {
|
||||
if (item == null || item.getQuantity() <= 0 || KarmaManipulator.hasKarmaFlag(item) || !ii.isKarmaAble(item.getItemId())) {
|
||||
c.sendPacket(PacketCreator.enableActions());
|
||||
return;
|
||||
}
|
||||
|
||||
MapleKarmaManipulator.setKarmaFlag(item);
|
||||
KarmaManipulator.setKarmaFlag(item);
|
||||
player.forceUpdateItem(item);
|
||||
remove(c, position, itemId);
|
||||
c.sendPacket(PacketCreator.enableActions());
|
||||
|
||||
@@ -13,7 +13,7 @@ import client.inventory.Inventory;
|
||||
import client.inventory.InventoryType;
|
||||
import client.inventory.Item;
|
||||
import client.inventory.manipulator.InventoryManipulator;
|
||||
import client.inventory.manipulator.MapleKarmaManipulator;
|
||||
import client.inventory.manipulator.KarmaManipulator;
|
||||
import config.YamlConfig;
|
||||
import constants.inventory.ItemConstants;
|
||||
import net.AbstractPacketHandler;
|
||||
@@ -71,7 +71,7 @@ public final class WeddingHandler extends AbstractPacketHandler {
|
||||
marriage.addGiftItem(groomWishlist, newItem);
|
||||
InventoryManipulator.removeFromSlot(c, type, slot, quantity, false, false);
|
||||
|
||||
MapleKarmaManipulator.toggleKarmaFlagToUntradeable(newItem);
|
||||
KarmaManipulator.toggleKarmaFlagToUntradeable(newItem);
|
||||
marriage.setIntProperty(groomWishlistProp, giftCount + 1);
|
||||
|
||||
c.sendPacket(WeddingPackets.onWeddingGiftResult((byte) 0xB, marriage.getWishlistItems(groomWishlist), Collections.singletonList(newItem)));
|
||||
|
||||
Reference in New Issue
Block a user