Jump to content
  • 0

Split Armor Category To Armors And Accesories


lsj14

Question

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

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0
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
Link to comment
Share on other sites

  • 0

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...