Lancer Posted March 15, 2016 Posted March 15, 2016 Hi there, I have a question. How add limit on item? Eg maximum arrows at inventory is 5000. acis server
0 Tryskell Posted March 15, 2016 Posted March 15, 2016 - Add a new int variable on (model.item.kind) Item _maxAmount, with getter. - Edit protected Item(StatsSet set) to load such variable from XML. Edit your items accordingly. - Refer to Item item = iteminstance.getItem(); with check such as : item.getCount() > item.getMaxAmount() wherever you need it (most probably L2PcInstance.addItem)
0 AccessDenied Posted March 15, 2016 Posted March 15, 2016 - Add a new int variable on (model.item.kind) Item _maxAmount, with getter. - Edit protected Item(StatsSet set) to load such variable from XML. Edit your items accordingly. - Refer to Item item = iteminstance.getItem(); with check such as : item.getCount() > item.getMaxAmount() wherever you need it (most probably L2PcInstance.addItem) wanna bet he didnt even understand what getItem(0 is ? xD
0 Tryskell Posted March 15, 2016 Posted March 15, 2016 wanna bet he didnt even understand what getItem(0 is ? xD But I answered, and I doubt he will get a better answer, either here or even on my forums.
0 Lancer Posted March 16, 2016 Author Posted March 16, 2016 - Add a new int variable on (model.item.kind) Item _maxAmount, with getter. - Edit protected Item(StatsSet set) to load such variable from XML. Edit your items accordingly. - Refer to Item item = iteminstance.getItem(); with check such as : item.getCount() > item.getMaxAmount() wherever you need it (most probably L2PcInstance.addItem) thx Tryskell we did it, but with little help :-beep- yeah:
Question
Lancer
Hi there, I have a question. How add limit on item? Eg maximum arrows at inventory is 5000.
acis server
5 answers to this question
Recommended Posts