Mercurial > wow > itemauditor
comparison Core.lua @ 159:fbfd9dfa6d2b tip
[mq]: minorStuff
| author | Asa Ayers <Asa.Ayers@Gmail.com> |
|---|---|
| date | Sun, 09 Jan 2011 07:38:22 -0800 |
| parents | 7ebe0a85d539 |
| children |
comparison
equal
deleted
inserted
replaced
| 158:7ebe0a85d539 | 159:fbfd9dfa6d2b |
|---|---|
| 532 end | 532 end |
| 533 end | 533 end |
| 534 | 534 |
| 535 function ItemAuditor:SaveValue(link, value, countChange) | 535 function ItemAuditor:SaveValue(link, value, countChange) |
| 536 self:Debug("SaveValue(%s, %s, %s)", tostring(link), value, (countChange or 'default')) | 536 self:Debug("SaveValue(%s, %s, %s)", tostring(link), value, (countChange or 'default')) |
| 537 assert(link, "invalid link") | |
| 537 countChange = countChange or 0 | 538 countChange = countChange or 0 |
| 538 local item = nil | 539 local item = nil |
| 539 local realLink = self:GetSafeLink(link) | 540 local realLink = self:GetSafeLink(link) |
| 540 local itemName = nil | 541 local itemName = nil |
| 541 if realLink == nil then | 542 if realLink == nil then |
| 621 local _, _, _, _, Id = string.find(link, "|?c?f?f?(%x*)|?H?([^:]*):?(%d+):?(%d*):?(%d*):?(%d*):?(%d*):?(%d*):?(%-?%d*):?(%-?%d*):?(%d*)|?h?%[?([^%[%]]*)%]?|?h?|?r?") | 622 local _, _, _, _, Id = string.find(link, "|?c?f?f?(%x*)|?H?([^:]*):?(%d+):?(%d*):?(%d*):?(%d*):?(%d*):?(%d*):?(%-?%d*):?(%-?%d*):?(%d*)|?h?%[?([^%[%]]*)%]?|?h?|?r?") |
| 622 return tonumber(Id) | 623 return tonumber(Id) |
| 623 end | 624 end |
| 624 | 625 |
| 625 function ItemAuditor:GetItemCost(link, countModifier) | 626 function ItemAuditor:GetItemCost(link, countModifier) |
| 627 assert(link, format('invalid link: %s', tostring(link))) | |
| 626 local item = self:GetItem(link, true) | 628 local item = self:GetItem(link, true) |
| 627 | 629 |
| 628 if item.invested > 0 then | 630 if item.invested > 0 then |
| 629 local count = item.count | 631 local count = item.count |
| 630 | 632 |
