Jump to content
  • 0

Split Armor Category To Armors And Accesories


Question

Posted

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

2 answers to this question

Recommended Posts

  • 0
Posted (edited)
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
  • 0
Posted (edited)

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

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock