Originally Posted by CrazyDutchGuy
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.