Jump to content

Recommended Posts

Posted

this is a problem present since eAthena, bugreport:309 details it. the item hash or "tagging" prevents exploits like

card a combos with card b and gives 3 str when combod

w/o that hash code if you wear 2 of card a and 1 card b you get +6 str instead of 3

thanks to kenpachi's item_combo_db we can now store all combos away from the items preventing the above scenario from taking place w/o the hash stuff, e.g. looping through the combo db once and checking for matching pairs, however that is quite inefficient (you see, we have about to 200 pairs of combos and 14 equipment slots, the loop would be awful), we need a clever way to fix this bug (preferably away from that awfully huge loop). discuss / post your opinions / scream at me, whatever you like :3

Posted

What about a data structure with a link from every item_id in a combo to the combo struct information, then check for the presence of that combo?

combo_db:

...

14: 4001, 4002, 4003, 4004.

...

find equipment at slot 3: 4003.

Look at combo 14.

Look for equipment 4001, 4002, 4003, 4004.

If found, enable combo 14.

Also, this algorithm can be improved, but as a basis it's much faster than looping over all of them.

  • Upvote 1
Posted

there is no need for a id entry in the combo db -- since the id value is not used in any other files the reference is not required, we can assign ids for them as they are parsed. Applied the update here: r16508

Posted

Great, darling!

I had some spare minutes today in work, and implemented SQL export into my database editor, and I noticed a few diffs from item_db.The most important one, combo codes weren't removed from item_db.sql files, so maybe they are applied twice on some servers, using SQL item dbs.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...