Mercurial > wow > wowdb-profiler
changeset 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 | cafa3a30dff8 |
files | Constants.lua Main.lua |
diffstat | 2 files changed, 21 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/Constants.lua Tue Nov 08 19:05:42 2016 -0500 +++ b/Constants.lua Tue Nov 08 19:06:58 2016 -0500 @@ -15,6 +15,14 @@ ----------------------------------------------------------------------- -- Boss/Loot Data Constants. ----------------------------------------------------------------------- +private.EPHEMERAL_CRYSTAL_OBJECT_IDS = { + 251168, + 251183, + 251185, + 251186, + 251187, +} + -- Map of Alliance Logging NPC Summon spells to all possible Timber objectIDs of the proper tree size private.LOGGING_SPELL_ID_TO_OBJECT_ID_MAP = { [167902] = 234021,
--- a/Main.lua Tue Nov 08 19:05:42 2016 -0500 +++ b/Main.lua Tue Nov 08 19:06:58 2016 -0500 @@ -49,6 +49,10 @@ local ITEM_ID_TIMBER = 114781 +local LOOT_SLOT_CURRENCY = _G.LOOT_SLOT_CURRENCY +local LOOT_SLOT_ITEM = _G.LOOT_SLOT_ITEM +local LOOT_SLOT_MONEY = _G.LOOT_SLOT_MONEY + local LOOT_SOURCE_ID_REDUNDANT = 3 local LOOT_SOURCE_ID_GARRISON_CACHE = 10 @@ -63,9 +67,7 @@ local PLAYER_NAME = _G.UnitName("player") local PLAYER_RACE = _G.select(2, _G.UnitRace("player")) -local LOOT_SLOT_CURRENCY = _G.LOOT_SLOT_CURRENCY -local LOOT_SLOT_ITEM = _G.LOOT_SLOT_ITEM -local LOOT_SLOT_MONEY = _G.LOOT_SLOT_MONEY +local SPELL_ID_UPDATE_INTERACTIONS = 161006 local WORLD_MAP_ID_BROKEN_ISLES = 1007 @@ -3010,6 +3012,14 @@ return end + -- 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) + local text = _G["GameTooltipTextLeft1"] and _G["GameTooltipTextLeft1"]:GetText() or nil + if spell_id == SPELL_ID_UPDATE_INTERACTIONS and text and text == "Ephemeral Crystal" then + for index = 1, #private.EPHEMERAL_CRYSTAL_OBJECT_IDS do + UpdateDBEntryLocation("objects", private.EPHEMERAL_CRYSTAL_OBJECT_IDS[index]) + end + end + if anvil_spell_ids[spell_id] then UpdateDBEntryLocation("objects", OBJECT_ID_ANVIL) elseif forge_spell_ids[spell_id] then