I got this error when I was trying to add Torva
http://prntscr.com/2twd6
This is my void in wear item
Code:
public class WearItem implements PacketType {
@Override
public void processPacket(Client c, int packetType, int packetSize) {
c.wearId = c.getInStream().readUnsignedWord();
c.wearSlot = c.getInStream().readUnsignedWordA();
c.interfaceId = c.getInStream().readUnsignedWordA();
boolean torvaChanged = false;
if (!c.getItems().playerHasItem(c.wearId, 1, c.wearSlot)) {
return;
}
if (c.playerIndex > 0 || c.npcIndex > 0)
c.getCombat().resetPlayerAttack();
if (c.wearId >= 5509 && c.wearId <= 5515) {
int pouch = -1;
int a = c.wearId;
if (a == 5509)
pouch = 0;
if (a == 5510)
pouch = 1;
if (a == 5512)
pouch = 2;
if (a == 5514)
pouch = 3;
c.getPA().emptyPouch(pouch);
return;
}
if (c.wearSlot == 0 || c.wearSlot == 4 || c.wearSlot == 7) {
if (c.playerEquipment[c.wearSlot] == 20143 || c.playerEquipment[c.wearSlot] == 20139 || c.playerEquipment[c.wearSlot] == 20135)
torvaChanged = true;
}
c.getItems().wearItem(c.wearId, c.wearSlot);
if (torvaChanged && c.playerLevel[3] > c.calculateMaxLifePoints()) {
c.playerLevel[3] = c.calculateMaxLifePoints();
c.getPA().refreshSkill(3);
}
}
}
This is my item assistant void
Code:
public boolean wearItem(int wearID, int slot, String itemName) {
synchronized(c) {
int targetSlot=0;
boolean canWearItem = true;
if(c.playerItems[slot] == (wearID+1)) {
getRequirements(getItemName(wearID).toLowerCase(), wearID);
targetSlot = Item.targetSlots[wearID];
if (wearID > 15085 && wearID < 15102){
if (c.clanId >= 0){
c.useDice(wearID, true);
}else{
c.sendMessage("You must be in a clan chat channel to do that.");
}
return false;
}
Theirs more to the item assistant its just mainly items.
Anyway, anyone can help? Rep + thanks.