Turn item id magic numbers into constants
This commit is contained in:
@@ -28,6 +28,7 @@ import client.Client;
|
||||
import client.command.Command;
|
||||
import client.inventory.Pet;
|
||||
import client.inventory.manipulator.InventoryManipulator;
|
||||
import constants.id.ItemId;
|
||||
import server.maps.MapItem;
|
||||
import server.maps.MapObject;
|
||||
import server.maps.MapObjectType;
|
||||
@@ -57,9 +58,9 @@ public class ForceVacCommand extends Command {
|
||||
if (mapItem.getMeso() > 0) {
|
||||
player.gainMeso(mapItem.getMeso(), true);
|
||||
} else if (player.applyConsumeOnPickup(mapItem.getItemId())) { // thanks Vcoc for pointing out consumables on pickup not being processed here
|
||||
} else if (mapItem.getItemId() == 4031865 || mapItem.getItemId() == 4031866) {
|
||||
} else if (ItemId.isNxCard(mapItem.getItemId())) {
|
||||
// Add NX to account, show effect and make item disappear
|
||||
player.getCashShop().gainCash(1, mapItem.getItemId() == 4031865 ? 100 : 250);
|
||||
player.getCashShop().gainCash(1, mapItem.getItemId() == ItemId.NX_CARD_100 ? 100 : 250);
|
||||
} else if (mapItem.getItem().getItemId() >= 5000000 && mapItem.getItem().getItemId() <= 5000100) {
|
||||
int petId = Pet.createPet(mapItem.getItem().getItemId());
|
||||
if (petId == -1) {
|
||||
@@ -67,7 +68,7 @@ public class ForceVacCommand extends Command {
|
||||
}
|
||||
InventoryManipulator.addById(c, mapItem.getItem().getItemId(), mapItem.getItem().getQuantity(), null, petId);
|
||||
} else if (InventoryManipulator.addFromDrop(c, mapItem.getItem(), true)) {
|
||||
if (mapItem.getItemId() == 4031868) {
|
||||
if (mapItem.getItemId() == ItemId.NX_CARD_100) {
|
||||
player.updateAriantScore();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user