Did you do anything to ItemDefenitions.java?
|
Whenever I try to equip an item it will just say "you can't wear that"
I fixed it sort of but all the items would just go into slot 3 so I reverted it back.
Heres my buttonhandler.java file where it is.
public static boolean sendWear(Player player, int slotId, int itemId) {
if (player.hasFinished() || player.isDead())
return false;
player.stopAll(false, false);
Item item = player.getInventory().getItem(slotId);
String itemName = item.getDefinitions() == null ? "" : item
.getDefinitions().getName().toLowerCase();
if (item == null || item.getId() != itemId)
return false;
if (item.getDefinitions().isNoted()
|| !item.getDefinitions().isWearItem(player.getAppear ence().isMale())) {
player.getPackets().sendGameMessage("You can't wear that.");
return true;
}int targetSlot = Equipment.getItemSlot(itemId);
if (targetSlot == -1) {
player.getPackets().sendGameMessage("You can't wear that.");
return true;
}if (item.getDefinitions().isNoted()
|| !item.getDefinitions().isWearItem(player.getAppear ence().isMale()) && itemId != 4084) {
player.getPackets().sendGameMessage("You can't wear that.");
return false;
}int targetSlot = Equipment.getItemSlot(itemId);
if(itemId == 4084)
targetSlot = 3;
if (targetSlot == -1) {
player.getPackets().sendGameMessage("You can't wear that.");
return false;
}
It's probably something retarded you didn't notice. Revert everything and you'll probably be better off.
Its the opcodes. Remove the opcodes you don't need and it should work fine.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |