Mercurial > wow > itemauditor
comparison Core.lua @ 35:aaa716c93fb2 v0.1.1
Added the ability to change the price of an item. You can click the Total Invested or the Invested Each to change the value.
| author | Asa Ayers <Asa.Ayers@Gmail.com> |
|---|---|
| date | Sun, 18 Jul 2010 16:43:03 -0700 |
| parents | f99b9602bdab |
| children | 9bd18fce8498 |
comparison
equal
deleted
inserted
replaced
| 34:d21d202f3b3d | 35:aaa716c93fb2 |
|---|---|
| 246 | 246 |
| 247 function addon:RemoveItem(link) | 247 function addon:RemoveItem(link) |
| 248 self.db.factionrealm.item_account[link] = nil | 248 self.db.factionrealm.item_account[link] = nil |
| 249 link = self:GetSafeLink(link) | 249 link = self:GetSafeLink(link) |
| 250 if link ~= nil then | 250 if link ~= nil then |
| 251 self.items[link] = nil | 251 local item = addon:GetItem(link) |
| 252 item.invested = 0 | |
| 252 else | 253 else |
| 253 self:Debug('Failed to convert link' .. tostring(link)) | 254 self:Debug('Failed to convert link' .. tostring(link)) |
| 254 end | 255 end |
| 255 end | 256 end |
| 256 | 257 |
| 299 end | 300 end |
| 300 | 301 |
| 301 if realLink ~= nil then | 302 if realLink ~= nil then |
| 302 addon:UpdateQAThreshold(realLink) | 303 addon:UpdateQAThreshold(realLink) |
| 303 end | 304 end |
| 305 UpdateInvestedData() | |
| 304 end | 306 end |
| 305 | 307 |
| 306 | 308 |
| 307 function addon:WatchBags() | 309 function addon:WatchBags() |
| 308 if self.watch_handle == nil then | 310 if self.watch_handle == nil then |
| 354 if count > 0 then | 356 if count > 0 then |
| 355 return ceil(item.invested), ceil(item.invested/item.count), count | 357 return ceil(item.invested), ceil(item.invested/item.count), count |
| 356 end | 358 end |
| 357 | 359 |
| 358 end | 360 end |
| 359 return 0, 0, 0 | 361 return 0, 0, Altoholic:GetItemCount(ItemAuditor:GetIDFromLink(link)) |
| 360 end | 362 end |
