Jump to content

multiple combo's discussion


Ind

Recommended Posts


  • Group:  Members
  • Topic Count:  169
  • Topics Per Day:  0.04
  • Content Count:  1260
  • Reputation:   750
  • Joined:  11/19/11
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  67
  • Reputation:   75
  • Joined:  12/18/11
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  764
  • Reputation:   220
  • Joined:  11/14/11
  • Last Seen:  

Basically a combo ID like in AEGIS...

Yes, I like the idea.

  • Upvote 2
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  764
  • Reputation:   220
  • Joined:  11/14/11
  • Last Seen:  

BUMP!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  169
  • Topics Per Day:  0.04
  • Content Count:  1260
  • Reputation:   750
  • Joined:  11/19/11
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  764
  • Reputation:   220
  • Joined:  11/14/11
  • Last Seen:  

Great, darling!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  427
  • Reputation:   123
  • Joined:  11/17/11
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  764
  • Reputation:   220
  • Joined:  11/14/11
  • Last Seen:  

Thanks xazax. I'll convert the TXT DBs later today.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  427
  • Reputation:   123
  • Joined:  11/17/11
  • Last Seen:  

np:)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  764
  • Reputation:   220
  • Joined:  11/14/11
  • Last Seen:  

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  427
  • Reputation:   123
  • Joined:  11/17/11
  • Last Seen:  

how do we handle atk:matk stuff in item_db-re.sql?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  764
  • Reputation:   220
  • Joined:  11/14/11
  • Last Seen:  

Exactly as in the TXT version. The only difference to item_db.sql is that it's stored in a VARCHAR field instead of INT.

Finally done in r16523 and r16524.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  427
  • Reputation:   123
  • Joined:  11/17/11
  • Last Seen:  

the "-s in itemscripts are not escaped. Is this intentional?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  764
  • Reputation:   220
  • Joined:  11/14/11
  • Last Seen:  

Actually it's not required excepting they are included in double quotes themself.

Link to comment
Share on other sites

×
×
  • Create New...