Rename and clean up MaplePet

This commit is contained in:
P0nk
2021-09-09 20:51:30 +02:00
parent 5ed7cf73d1
commit 6ca5abd896
25 changed files with 121 additions and 113 deletions

View File

@@ -26,7 +26,7 @@ package client.command.commands.gm2;
import client.MapleCharacter;
import client.MapleClient;
import client.command.Command;
import client.inventory.MaplePet;
import client.inventory.Pet;
import client.inventory.manipulator.MapleInventoryManipulator;
import config.YamlConfig;
import constants.inventory.ItemConstants;
@@ -67,7 +67,7 @@ public class ItemCommand extends Command {
quantity = 1;
long days = Math.max(1, Integer.parseInt(params[1]));
long expiration = System.currentTimeMillis() + (days * 24 * 60 * 60 * 1000);
int petid = MaplePet.createPet(itemId);
int petid = Pet.createPet(itemId);
MapleInventoryManipulator.addById(c, itemId, quantity, player.getName(), petid, expiration);
return;

View File

@@ -28,7 +28,7 @@ import client.MapleClient;
import client.command.Command;
import client.inventory.InventoryType;
import client.inventory.Item;
import client.inventory.MaplePet;
import client.inventory.Pet;
import config.YamlConfig;
import constants.inventory.ItemConstants;
import server.MapleItemInformationProvider;
@@ -68,7 +68,7 @@ public class ItemDropCommand extends Command {
quantity = 1;
long days = Math.max(1, Integer.parseInt(params[1]));
long expiration = System.currentTimeMillis() + (days * 24 * 60 * 60 * 1000);
int petid = MaplePet.createPet(itemId);
int petid = Pet.createPet(itemId);
Item toDrop = new Item(itemId, (short) 0, quantity, petid);
toDrop.setExpiration(expiration);

View File

@@ -26,7 +26,7 @@ package client.command.commands.gm4;
import client.MapleCharacter;
import client.MapleClient;
import client.command.Command;
import client.inventory.MaplePet;
import client.inventory.Pet;
import client.inventory.manipulator.MapleInventoryManipulator;
import server.maps.MapleMapItem;
import server.maps.MapleMapObject;
@@ -59,7 +59,7 @@ public class ForceVacCommand extends Command {
// Add NX to account, show effect and make item disappear
player.getCashShop().gainCash(1, mapItem.getItemId() == 4031865 ? 100 : 250);
} else if (mapItem.getItem().getItemId() >= 5000000 && mapItem.getItem().getItemId() <= 5000100) {
int petId = MaplePet.createPet(mapItem.getItem().getItemId());
int petId = Pet.createPet(mapItem.getItem().getItemId());
if (petId == -1) {
continue;
}