Mercurial > wow > wowdb-profiler
diff Main.lua @ 454:af5a61f38aaa 6.2.0-2
Added support for recording the results of item tokens that create other items based on your class.
author | MMOSimca <MMOSimca@gmail.com> |
---|---|
date | Wed, 24 Jun 2015 21:58:31 -0400 |
parents | c24871c25f05 |
children | 866bba4d8ab6 |
line wrap: on
line diff
--- a/Main.lua Wed Jun 24 20:48:35 2015 -0400 +++ b/Main.lua Wed Jun 24 21:58:31 2015 -0400 @@ -47,7 +47,7 @@ local OBJECT_ID_FISHING_BOBBER = 35591 local OBJECT_ID_FORGE = 1685 -local PLAYER_CLASS = _G.select(2, _G.UnitClass("player")) +local PLAYER_CLASS, PLAYER_CLASS_ID = _G.select(2, _G.UnitClass("player")) local PLAYER_FACTION = _G.UnitFactionGroup("player") local PLAYER_GUID local PLAYER_NAME = _G.UnitName("player") @@ -2910,12 +2910,16 @@ end -- For spells cast by items that don't usually trigger loot toasts - if private.DELAYED_CONTAINER_SPELL_ID_TO_ITEM_ID_MAP[spell_id] and not block_chat_loot_data then + if not block_chat_loot_data and (private.DELAYED_CONTAINER_SPELL_ID_TO_ITEM_ID_MAP[spell_id] or (private.CLASS_BASED_DELAYED_CONTAINER_SPELL_ID_TO_ITEM_ID_BY_CLASS_ID_MAP[spell_id] and private.CLASS_BASED_DELAYED_CONTAINER_SPELL_ID_TO_ITEM_ID_BY_CLASS_ID_MAP[spell_id][PLAYER_CLASS_ID])) then -- Set up timer ClearChatLootData() Debug("%s: Beginning chat-based loot timer for spellID %d", event_name, spell_id) chat_loot_timer_handle = C_Timer.NewTimer(1.5, ClearChatLootData) - chat_loot_data.identifier = private.DELAYED_CONTAINER_SPELL_ID_TO_ITEM_ID_MAP[spell_id] + if (private.CLASS_BASED_DELAYED_CONTAINER_SPELL_ID_TO_ITEM_ID_BY_CLASS_ID_MAP[spell_id] and private.CLASS_BASED_DELAYED_CONTAINER_SPELL_ID_TO_ITEM_ID_BY_CLASS_ID_MAP[spell_id][PLAYER_CLASS_ID]) then + chat_loot_data.identifier = private.CLASS_BASED_DELAYED_CONTAINER_SPELL_ID_TO_ITEM_ID_BY_CLASS_ID_MAP[spell_id][PLAYER_CLASS_ID] + else + chat_loot_data.identifier = private.DELAYED_CONTAINER_SPELL_ID_TO_ITEM_ID_MAP[spell_id] + end return end