Napster321 Posted December 8, 2012 Posted December 8, 2012 i want when (x) item its (y) enchanted to be untradeable, how can i make that possible? (different enchant level for different items) Quote
0 vampir Posted December 9, 2012 Posted December 9, 2012 just look how augmented items are connected with trade classes. Quote
0 Tryskell Posted December 9, 2012 Posted December 9, 2012 Edit isTradable() from L2ItemInstance, add a check which fits with your desire using getEnchantLevel(). Quote
0 Napster321 Posted December 10, 2012 Author Posted December 10, 2012 /** * Returns if item is tradeable. * * @return boolean */ public boolean isTradeable() { return isAugmented() ? false : _item.isTradeable(); } i found that in l2itemInstance i think i could add it over here because if an item is augmented is untradeable, but i can't understand the "return" Quote
0 Dεbian Posted December 10, 2012 Posted December 10, 2012 /** * Returns if item is tradeable. * * @return boolean */ public boolean isTradeable() { return isAugmented() ? false : _item.isTradeable(); } i found that in l2itemInstance i think i could add it over here because if an item is augmented is untradeable, but i can't understand the "return" /** * Returns if item is tradeable. * * @return boolean */ I think now you can understand. It means boolean (true/false). Quote
0 Napster321 Posted December 10, 2012 Author Posted December 10, 2012 /** * Returns if item is tradeable. * * @return boolean */ I think now you can understand. It means boolean (true/false). so if that was return isAugmented() ? true : _item.isTradeable(); the item would be tradeable? Quote
0 Dεbian Posted December 10, 2012 Posted December 10, 2012 so if that was return isAugmented() ? true : _item.isTradeable(); the item would be tradeable? I think yes. Quote
0 Napster321 Posted December 10, 2012 Author Posted December 10, 2012 return getEnchantLevel() ? false : _item.isTradeable(); where i can set the enchant level that will make the item untreadable? i have to set an int? Quote
0 Tryskell Posted December 10, 2012 Posted December 10, 2012 Sigh... public boolean isTradeable() { return isAugmented() ? false : _item.isTradeable(); } could be translated as public boolean isTradeable() { if (isAugmented()) return false; return _item.isTradeable(); } You need to do public boolean isTradeable() { if (isAugmented() || getEnchantLevel() >= XX) return false; return _item.isTradeable(); } Quote
0 Napster321 Posted December 10, 2012 Author Posted December 10, 2012 and in case i want to allow trading augmented items i can't have two boolean 1st for augment and 2nd for enchanted? Quote
Question
Napster321
i want when (x) item its (y) enchanted to be untradeable, how can i make that possible?
(different enchant level for different items)
9 answers to this question
Recommended Posts
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.