View Single Post
03/16/16, 04:10 AM   #11
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
Originally Posted by CrazyDutchGuy View Post
Doh ... Been messing with so much code lately that i don't understand my own addons anymore ...
Who never stared at their own code asking "who wrote this mess?"

Anyway, I'd either use Ayantir's heuristics, perhaps include a check for "^treasuremap_" or "_survey_" in texture name to be sure; or build a lookup table {itemID=>pinData} from LOST_TREASURE_DATA at startup -- that way you could quickly check whether an item is a map your add-on knows. Also, I wouldn't put itemID in the slotData, it's a shared namespace; just extract it from the itemLink where it's needed.
  Reply With Quote