Mercurial > wow > itemauditor
comparison Modules/Utils.lua @ 87:26f45b6e8d4d
Removed some debugging code and added some code to prevent ItemAuditor from crashing if debug code gets released.
author | Asa Ayers <Asa.Ayers@Gmail.com> |
---|---|
date | Sun, 08 Aug 2010 07:57:45 -0700 |
parents | 8d5ad3b71f6f |
children | 4ec8611d9466 |
comparison
equal
deleted
inserted
replaced
86:8d5ad3b71f6f | 87:26f45b6e8d4d |
---|---|
70 return nil | 70 return nil |
71 end | 71 end |
72 | 72 |
73 if tmp_item_cache[item] == nil then | 73 if tmp_item_cache[item] == nil then |
74 -- Whether item is a link or a name, both should return the full link | 74 -- Whether item is a link or a name, both should return the full link |
75 DevTools_Dump(item) | |
76 local _, itemLink = GetItemInfo (item); | 75 local _, itemLink = GetItemInfo (item); |
77 if itemLink ~= nil then | 76 if itemLink ~= nil then |
78 local _, _, _, _, itemID = string.find(itemLink, "|?c?f?f?(%x*)|?H?([^:]*):?(%d+):?(%d*):?(%d*):?(%d*):?(%d*):?(%d*):?(%-?%d*):?(%-?%d*):?(%d*)|?h?%[?([^%[%]]*)%]?|?h?|?r?") | 77 local _, _, _, _, itemID = string.find(itemLink, "|?c?f?f?(%x*)|?H?([^:]*):?(%d+):?(%d*):?(%d*):?(%d*):?(%d*):?(%d*):?(%-?%d*):?(%-?%d*):?(%d*)|?h?%[?([^%[%]]*)%]?|?h?|?r?") |
79 tmp_item_cache[item] = tonumber(itemID) | 78 tmp_item_cache[item] = tonumber(itemID) |
80 end | 79 end |