Jump to content
  • 0

Unequip Item Or Weapon Request?


Afou To Patisa

Question

How to add a check when u want to unequip a weapon or an item?

UnEquipRequest.java is not used in l2j neither aCis, instead UseItem.java is used. But if you add check in UseItem.java then the player cannot wear or unequip

any item at all. 

What if we want just to no be able to unequip the current weapon but unequip or equip other items + potions? 

 

 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

OnEquipListener, check uses.

Nothing like this in L2J high5

you speak specific for acis thanks but there is nothing common in l2j.

 

Ps. i found them its' a bit in dif pos

 

public interface PaperdollListener
{
        public void notifyEquiped(int slot, L2ItemInstance inst, Inventory inventory);
        public void notifyUnequiped(int slot, L2ItemInstance inst, Inventory inventory);
}
 
 
but again how do i add proper checks for specific unequip item? I did check the uses, it has many overrided methods mostly to remove stats upon weapon remove such as passive skills
augmentations, stats e.t.c but it doesnt let u add check to block him from remove this. Am i right tryskel| ?
Edited by Afou To Patisa
Link to comment
Share on other sites

  • 0

If you want to restrict the whole behavior, you have to set it way before listeners. setPaperdoll is called by unEquipItemInSlot, and you got methods like checkItemRestriction checking conditions. Everything exists under a form or another. Basically check Inventory class to get it.

 

You don't say enough infos to be helped.

 

PS : while aCis got its own naming convention and things, everything exist on a form or another ; because no matter changes, you can't defeat "concepts" such as Inventory, paperdoll events onEquip / onUnequip, etc. If you expect to get correct syntax, obviously you will not find.

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...