Mercurial > wow > wowdb-profiler
comparison Main.lua @ 520:3fee2a08fdaa 7.1.0-4
Attempted a hacky workaround for detecting Ephemeral Crystals (English clients only).
| author | MMOSimca <mmosimca@gmail.com> |
|---|---|
| date | Tue, 08 Nov 2016 19:06:58 -0500 |
| parents | 2325dbe5c10a |
| children | 39c3576943ba |
comparison
equal
deleted
inserted
replaced
| 519:2325dbe5c10a | 520:3fee2a08fdaa |
|---|---|
| 46 local DELAY_PROCESS_ITEMS = 30 | 46 local DELAY_PROCESS_ITEMS = 30 |
| 47 local DELAY_PROCESS_WORLD_QUESTS = 60 | 47 local DELAY_PROCESS_WORLD_QUESTS = 60 |
| 48 local DELAY_UPDATE_TARGET_LOCATION = 0.5 | 48 local DELAY_UPDATE_TARGET_LOCATION = 0.5 |
| 49 | 49 |
| 50 local ITEM_ID_TIMBER = 114781 | 50 local ITEM_ID_TIMBER = 114781 |
| 51 | |
| 52 local LOOT_SLOT_CURRENCY = _G.LOOT_SLOT_CURRENCY | |
| 53 local LOOT_SLOT_ITEM = _G.LOOT_SLOT_ITEM | |
| 54 local LOOT_SLOT_MONEY = _G.LOOT_SLOT_MONEY | |
| 51 | 55 |
| 52 local LOOT_SOURCE_ID_REDUNDANT = 3 | 56 local LOOT_SOURCE_ID_REDUNDANT = 3 |
| 53 local LOOT_SOURCE_ID_GARRISON_CACHE = 10 | 57 local LOOT_SOURCE_ID_GARRISON_CACHE = 10 |
| 54 | 58 |
| 55 local OBJECT_ID_ANVIL = 192628 | 59 local OBJECT_ID_ANVIL = 192628 |
| 61 local PLAYER_GUID | 65 local PLAYER_GUID |
| 62 local PLAYER_LEVEL = _G.UnitLevel("player") | 66 local PLAYER_LEVEL = _G.UnitLevel("player") |
| 63 local PLAYER_NAME = _G.UnitName("player") | 67 local PLAYER_NAME = _G.UnitName("player") |
| 64 local PLAYER_RACE = _G.select(2, _G.UnitRace("player")) | 68 local PLAYER_RACE = _G.select(2, _G.UnitRace("player")) |
| 65 | 69 |
| 66 local LOOT_SLOT_CURRENCY = _G.LOOT_SLOT_CURRENCY | 70 local SPELL_ID_UPDATE_INTERACTIONS = 161006 |
| 67 local LOOT_SLOT_ITEM = _G.LOOT_SLOT_ITEM | |
| 68 local LOOT_SLOT_MONEY = _G.LOOT_SLOT_MONEY | |
| 69 | 71 |
| 70 local WORLD_MAP_ID_BROKEN_ISLES = 1007 | 72 local WORLD_MAP_ID_BROKEN_ISLES = 1007 |
| 71 | 73 |
| 72 -- Removed in Patch 7.0.3; previously used to determine if a system message was a quest reward or not | 74 -- Removed in Patch 7.0.3; previously used to determine if a system message was a quest reward or not |
| 73 local ERR_QUEST_REWARD_ITEM_MULT_IS = _G.ERR_QUEST_REWARD_ITEM_MULT_IS or "Received %d of item: %s." | 75 local ERR_QUEST_REWARD_ITEM_MULT_IS = _G.ERR_QUEST_REWARD_ITEM_MULT_IS or "Received %d of item: %s." |
| 3008 chat_loot_data.identifier = private.DELAYED_CONTAINER_SPELL_ID_TO_ITEM_ID_MAP[spell_id] | 3010 chat_loot_data.identifier = private.DELAYED_CONTAINER_SPELL_ID_TO_ITEM_ID_MAP[spell_id] |
| 3009 end | 3011 end |
| 3010 return | 3012 return |
| 3011 end | 3013 end |
| 3012 | 3014 |
| 3015 -- For Ephemeral Crystals (uses a combination of mouseover text and a 'Update Interactions' spell cast to detect the object - this is incredibly hacky but there is no alternative) | |
| 3016 local text = _G["GameTooltipTextLeft1"] and _G["GameTooltipTextLeft1"]:GetText() or nil | |
| 3017 if spell_id == SPELL_ID_UPDATE_INTERACTIONS and text and text == "Ephemeral Crystal" then | |
| 3018 for index = 1, #private.EPHEMERAL_CRYSTAL_OBJECT_IDS do | |
| 3019 UpdateDBEntryLocation("objects", private.EPHEMERAL_CRYSTAL_OBJECT_IDS[index]) | |
| 3020 end | |
| 3021 end | |
| 3022 | |
| 3013 if anvil_spell_ids[spell_id] then | 3023 if anvil_spell_ids[spell_id] then |
| 3014 UpdateDBEntryLocation("objects", OBJECT_ID_ANVIL) | 3024 UpdateDBEntryLocation("objects", OBJECT_ID_ANVIL) |
| 3015 elseif forge_spell_ids[spell_id] then | 3025 elseif forge_spell_ids[spell_id] then |
| 3016 UpdateDBEntryLocation("objects", OBJECT_ID_FORGE) | 3026 UpdateDBEntryLocation("objects", OBJECT_ID_FORGE) |
| 3017 elseif spell_name:match("^Harvest.+") then | 3027 elseif spell_name:match("^Harvest.+") then |
