Welcome to MaxCheaters.com

Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads

quest related on latest rev


Recommended Posts

on your last quest update you should make a new ENUM type column into sql table 'character_quests' and update it CREATED, STARTED, COMPLETED with default value CREATED logic.

Share this post


Link to post
Share on other sites
16 minutes ago, Nightw0lf said:

on your last quest update you should make a new ENUM type column into sql table 'character_quests' and update it CREATED, STARTED, COMPLETED with default value CREATED logic.

 

No, for multiple reasons :

- if core side is edited you have to edit it here aswell (making 2 places to edit).

- while it's simple to manage with few entries and one or two enums, it becomes a burden to maintain when you got 5-10 enums with xx choices (case of characters table).

- ENUM implementation can evolve / differ from one db type to another (for exemple, ENUM doesn't exist in SQLSERVER).

- strictly no L2J forks use that consistantly, making it a questionable choice.

Share this post


Link to post
Share on other sites

i believe edits and maintain is not the main problem, but i taking the example of characters into consideration for future could be an example to avoid, but since server/client side wont be evolving anytime soon the only thing needs maintenance will be future sql storage updates, about sqlserver you might know better (in my opinion should not be taken into consideration) finally its up to developers perspective so its respectable.

 

Share this post


Link to post
Share on other sites
1 hour ago, Nightw0lf said:

on your last quest update you should make a new ENUM type column into sql table 'character_quests' and update it CREATED, STARTED, COMPLETED with default value CREATED logic.

 

There is no ENUM as you might think. Database contains the string values of "ENUM names" instead abstract digital values before. All strings can be easily interpreted in ENUM and back again if necessary. It's good developing practice and more readable if need make some changes or check something. Even L2OFF uses this trick.

Share this post


Link to post
Share on other sites
13 hours ago, Rootware said:

 

There is no ENUM as you might think. Database contains the string values of "ENUM names" instead abstract digital values before. All strings can be easily interpreted in ENUM and back again if necessary. It's good developing practice and more readable if need make some changes or check something. Even L2OFF uses this trick.

you are like a living wiki :D i mostly got covered by tryskel's answer but for example it would be better for me as i imagine if i'd use acis to check a quest or something else's state on navicat by viewing directly a column with state COMPLETED thats why i posted, thanks for the info tho, i am using on other projects that way of thinking and your info is good for me

Share this post


Link to post
Share on other sites
  • 1 month later...
On 11/13/2020 at 10:08 AM, Nightw0lf said:

by viewing directly a column with state COMPLETED

Obviously storing a string/enum on table column is "readable on first glance", BUT what if you actually edit core side and change COMPLETED into COMPLETE (or opposite).

 

What will happen? Shit will happen. 💩

 

Normally, you would / should have 2 tables, one storing the "enums" (key, value) and desired column, should hold the key (id). Soo, whenever you change the value, you are safe and won't face any problems.

 

Sure, you can have enums on core side, only, but that way when you execute manual SQL query, you won't know what means 1/2/3. With linked tables, you simply read from that table and voila, yet you have to write longer queries to find out what is what, but hey.. That's how it works 😅

Share this post


Link to post
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.

Guest
Reply to this topic...

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