Skip to content

Split Armor Category To Armors And Accesories

Featured Replies

Hey, could someone help me a little with this ?

I'm using acis and I need to split armor category.

 

Because there is only item.isArmor / item.isWeapon / Item.isEtcItem and I would need something like  item.isAccesorie.

I tried doing like this:

if((item.isArmor() && item.getLocationSlot() == Inventory.PAPERDOLL_LFINGER || item.getLocationSlot() == Inventory.PAPERDOLL_RFINGER || item.getLocationSlot() == Inventory.PAPERDOLL_NECK || item.getLocationSlot() == Inventory.PAPERDOLL_LEAR || item.getLocationSlot() == Inventory.PAPERDOLL_REAR)
			{
				itemModel.setL2Type("Accesory");
			}

But this didn't work for me :S

if (armor && (choice1 || choice2 || choice3))

You lack of basic logic on conditional operators.

 

You can also probably simply use inventory slot checks, until you want to specifiy accessories types.

Edited by Tryskell

  • Author

Somehow if(item.getLocationSlot() == Inventory.PAPERDOLL_NECK) doesn't seem to work for me even thou item is necklace, neither using if(item.getLocationSlot() == Item.SLOT_NECK)

 

​Edit: Just noticed that getLocationSlot doesn't fit my needs :D

 

if(item.getItem().getBodyPart() == Item.SLOT_NECK)

worked fine.

Edited by lsj14

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.