Mercurial > wow > wowdb-profiler
comparison 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 |
comparison
equal
deleted
inserted
replaced
453:75c0e5d93957 | 454:af5a61f38aaa |
---|---|
45 | 45 |
46 local OBJECT_ID_ANVIL = 192628 | 46 local OBJECT_ID_ANVIL = 192628 |
47 local OBJECT_ID_FISHING_BOBBER = 35591 | 47 local OBJECT_ID_FISHING_BOBBER = 35591 |
48 local OBJECT_ID_FORGE = 1685 | 48 local OBJECT_ID_FORGE = 1685 |
49 | 49 |
50 local PLAYER_CLASS = _G.select(2, _G.UnitClass("player")) | 50 local PLAYER_CLASS, PLAYER_CLASS_ID = _G.select(2, _G.UnitClass("player")) |
51 local PLAYER_FACTION = _G.UnitFactionGroup("player") | 51 local PLAYER_FACTION = _G.UnitFactionGroup("player") |
52 local PLAYER_GUID | 52 local PLAYER_GUID |
53 local PLAYER_NAME = _G.UnitName("player") | 53 local PLAYER_NAME = _G.UnitName("player") |
54 local PLAYER_RACE = _G.select(2, _G.UnitRace("player")) | 54 local PLAYER_RACE = _G.select(2, _G.UnitRace("player")) |
55 | 55 |
2908 loot_toast_container_timer_handle = C_Timer.NewTimer(1, ClearLootToastContainerID) -- we need to assign a handle here to cancel it later | 2908 loot_toast_container_timer_handle = C_Timer.NewTimer(1, ClearLootToastContainerID) -- we need to assign a handle here to cancel it later |
2909 return | 2909 return |
2910 end | 2910 end |
2911 | 2911 |
2912 -- For spells cast by items that don't usually trigger loot toasts | 2912 -- For spells cast by items that don't usually trigger loot toasts |
2913 if private.DELAYED_CONTAINER_SPELL_ID_TO_ITEM_ID_MAP[spell_id] and not block_chat_loot_data then | 2913 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 |
2914 -- Set up timer | 2914 -- Set up timer |
2915 ClearChatLootData() | 2915 ClearChatLootData() |
2916 Debug("%s: Beginning chat-based loot timer for spellID %d", event_name, spell_id) | 2916 Debug("%s: Beginning chat-based loot timer for spellID %d", event_name, spell_id) |
2917 chat_loot_timer_handle = C_Timer.NewTimer(1.5, ClearChatLootData) | 2917 chat_loot_timer_handle = C_Timer.NewTimer(1.5, ClearChatLootData) |
2918 chat_loot_data.identifier = private.DELAYED_CONTAINER_SPELL_ID_TO_ITEM_ID_MAP[spell_id] | 2918 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 |
2919 chat_loot_data.identifier = private.CLASS_BASED_DELAYED_CONTAINER_SPELL_ID_TO_ITEM_ID_BY_CLASS_ID_MAP[spell_id][PLAYER_CLASS_ID] | |
2920 else | |
2921 chat_loot_data.identifier = private.DELAYED_CONTAINER_SPELL_ID_TO_ITEM_ID_MAP[spell_id] | |
2922 end | |
2919 return | 2923 return |
2920 end | 2924 end |
2921 | 2925 |
2922 if anvil_spell_ids[spell_id] then | 2926 if anvil_spell_ids[spell_id] then |
2923 UpdateDBEntryLocation("objects", OBJECT_ID_ANVIL) | 2927 UpdateDBEntryLocation("objects", OBJECT_ID_ANVIL) |