Greetings people, I've got a question that I'd really like to answer by myself but I've only got basic java knowledge. Recently, I decided to categorise some custom made items. Here's an example of the method I chose to do it:
//This code was written inside L2ItemInstance class
public boolean isCustomItem()
{
switch(getId())
{
case 1311: //random item
case 2244: //random item
case 3554: //random item
return true;
}
return false;
}
This works completely fine but it seems pretty sloppy.
Now, I understand that there is another way of doing it through L2Item instead of L2ItemInstance class by creating booleans, updating StatsSet and working on xmls by adding the custom boolean to the respective items. However, I really can't tell whats the difference in terms of coding efficiency and reliability (if there is any). Has any of you fellows got this sorted out? Which way would you choose? Maybe another way not mentioned here? Thanks!
DISCORD :
utchiha_market
telegram :
https://t.me/utchiha_market
SELLIX STORE :
https://utchihamkt.mysellix.io/
Join our server for more products :
https://discord.gg/hood-services
https://campsite.bio/utchihaamkt
hello everyone !
I need help with a l2script Rev H5-Salvation/Classic build. I compiled the project, installed everything but I can't log in to the server, it won't log me in. I tried a thousand ways without good results. I leave you the error when logging in either with the H5-Salvation Client.
ERROR ---> WARN: IPBANMANAGER ---> IP !!!!
I'm waiting for help! Thank you!
Question
Meydex
Greetings people,
I've got a question that I'd really like to answer by myself but I've only got basic java knowledge.
Recently, I decided to categorise some custom made items. Here's an example of the method I chose to do it:
This works completely fine but it seems pretty sloppy.
Now, I understand that there is another way of doing it through L2Item instead of L2ItemInstance class by creating booleans, updating StatsSet and working on xmls by adding the custom boolean to the respective items.
However, I really can't tell whats the difference in terms of coding efficiency and reliability (if there is any).
Has any of you fellows got this sorted out?
Which way would you choose? Maybe another way not mentioned here?
Thanks!
7 answers to this question
Recommended Posts