Jump to content

Question

Posted

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? 

 

 

4 answers to this question

Recommended Posts

  • 0
Posted (edited)

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
  • 0
Posted

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.

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

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..