Mercurial > wow > wowdb-profiler
diff Main.lua @ 366:7e7d57948295
Removed disable statement since 6.0.2 is on all servers now and localized three frequently used global constants.
author | MMOSimca <MMOSimca@gmail.com> |
---|---|
date | Sun, 19 Oct 2014 07:33:07 -0400 |
parents | f8190e012c92 |
children | 1dc56d8e1260 |
line wrap: on
line diff
--- a/Main.lua Thu Oct 16 02:15:25 2014 -0400 +++ b/Main.lua Sun Oct 19 07:33:07 2014 -0400 @@ -14,6 +14,8 @@ local select = _G.select local unpack = _G.unpack +local LOOT_SLOT_CURRENCY, LOOT_SLOT_ITEM, LOOT_SLOT_MONEY = _G.LOOT_SLOT_CURRENCY, _G.LOOT_SLOT_ITEM, _G.LOOT_SLOT_MONEY + -- ADDON NAMESPACE ---------------------------------------------------- @@ -898,12 +900,6 @@ local raw_db = _G.WoWDBProfilerData local build_num = tonumber(private.build_num) - -- Disable if using a MoP build - if build_num < 19000 then - WDP:Disable() - return - end - if (raw_db.version and raw_db.version < DB_VERSION) or (raw_db.build_num and raw_db.build_num < build_num) then for entry in pairs(DATABASE_DEFAULTS.global) do global_db[entry] = {} @@ -2060,13 +2056,13 @@ local source_type, source_id = ParseGUID(source_guid) local source_key = ("%s:%d"):format(source_type, source_id) - if slot_type == _G.LOOT_SLOT_ITEM then + if slot_type == LOOT_SLOT_ITEM then local item_id = ItemLinkToID(_G.GetLootSlotLink(loot_slot)) Debug("GUID: %s - Type:ID: %s - ItemID: %d - Amount: %d (%d)", loot_info[loot_index], source_key, item_id, loot_info[loot_index + 1], slot_quantity) current_loot.sources[source_guid] = current_loot.sources[source_guid] or {} current_loot.sources[source_guid][item_id] = current_loot.sources[source_guid][item_id] or 0 + loot_quantity guids_used[source_guid] = true - elseif slot_type == _G.LOOT_SLOT_MONEY then + elseif slot_type == LOOT_SLOT_MONEY then Debug("GUID: %s - Type:ID: %s - Money - Amount: %d (%d)", loot_info[loot_index], source_key, loot_info[loot_index + 1], slot_quantity) if current_loot.target_type == AF.ZONE then table.insert(current_loot.list, ("money:%d"):format(loot_quantity)) @@ -2075,7 +2071,7 @@ current_loot.sources[source_guid]["money"] = current_loot.sources[source_guid]["money"] or 0 + loot_quantity guids_used[source_guid] = true end - elseif slot_type == _G.LOOT_SLOT_CURRENCY then + elseif slot_type == LOOT_SLOT_CURRENCY then -- Same bug with GetLootSlotInfo() will screw up currency when it happens, so we won't process this slot's loot. if icon_texture then Debug("GUID: %s - Type:ID: %s - Currency: %s - Amount: %d (%d)", loot_info[loot_index], source_key, icon_texture, loot_info[loot_index + 1], slot_quantity)