Mercurial > wow > wowdb-profiler
comparison Main.lua @ 411:4adc1fa4ddba
Increased duration of chat-based loot recording from 1 second to 1.5 seconds. Fixed some comments.
author | MMOSimca <MMOSimca@gmail.com> |
---|---|
date | Sat, 03 Jan 2015 02:34:09 -0500 |
parents | ad8323486561 |
children | e2f7f33cf5f7 |
comparison
equal
deleted
inserted
replaced
410:ad8323486561 | 411:4adc1fa4ddba |
---|---|
575 end | 575 end |
576 end | 576 end |
577 | 577 |
578 local any_loot = false | 578 local any_loot = false |
579 | 579 |
580 -- Check if Blizzard has marked this item has officially having a chance of containing loot | 580 -- Check if Blizzard has marked this item as officially having a chance of containing loot |
581 if bag_index and slot_index then | 581 if bag_index and slot_index then |
582 local _, _, _, _, _, is_lootable = _G.GetContainerItemInfo(bag_index, slot_index) | 582 local _, _, _, _, _, is_lootable = _G.GetContainerItemInfo(bag_index, slot_index) |
583 if is_lootable then | 583 if is_lootable then |
584 any_loot = true | 584 any_loot = true |
585 end | 585 end |
603 Debug("HandleItemUse: Beginning chat-based loot timer for item with ID %d.", item_id) | 603 Debug("HandleItemUse: Beginning chat-based loot timer for item with ID %d.", item_id) |
604 chat_loot_timer_handle = C_Timer.NewTimer(1, ClearChatLootData) | 604 chat_loot_timer_handle = C_Timer.NewTimer(1, ClearChatLootData) |
605 InitializeCurrentLoot() | 605 InitializeCurrentLoot() |
606 end | 606 end |
607 end | 607 end |
608 | |
609 --[[DatamineTT:ClearLines() | |
610 DatamineTT:SetBagItem(bag_index, slot_index) | |
611 | |
612 for line_index = 1, DatamineTT:NumLines() do | |
613 local current_line = _G["WDPDatamineTTTextLeft" .. line_index] | |
614 | |
615 if not current_line then | |
616 Debug("HandleItemUse: Item with ID %d and link %s had an invalid tooltip.", item_id, item_link) | |
617 return | |
618 end | |
619 | |
620 if current_line:GetText() == _G.ITEM_OPENABLE then | |
621 table.wipe(current_action) | |
622 current_loot = nil | |
623 | |
624 current_action.target_type = AF.ITEM | |
625 current_action.identifier = item_id | |
626 current_action.loot_label = "contains" | |
627 return | |
628 end | |
629 end | |
630 Debug("HandleItemUse: Item with ID %d and link %s did not have a tooltip that contained the string %s.", item_id, item_link, _G.ITEM_OPENABLE)]]-- | |
631 end | 608 end |
632 | 609 |
633 | 610 |
634 local UnitFactionStanding | 611 local UnitFactionStanding |
635 local UpdateFactionData | 612 local UpdateFactionData |
1712 end | 1689 end |
1713 end | 1690 end |
1714 return | 1691 return |
1715 end | 1692 end |
1716 | 1693 |
1717 -- We only want to record the item's incoming data; no other need for system messages atm. | 1694 -- If it is an item, parse its link |
1718 RecordItemData(item_id, item_link, true) | 1695 RecordItemData(item_id, item_link, true) |
1719 end | 1696 end |
1720 end | 1697 end |
1721 | 1698 |
1722 | 1699 |
2866 -- For spells cast by items that don't usually trigger loot toasts | 2843 -- For spells cast by items that don't usually trigger loot toasts |
2867 if private.DELAYED_CONTAINER_SPELL_ID_TO_ITEM_ID_MAP[spell_id] then | 2844 if private.DELAYED_CONTAINER_SPELL_ID_TO_ITEM_ID_MAP[spell_id] then |
2868 -- Set up timer | 2845 -- Set up timer |
2869 ClearChatLootData() | 2846 ClearChatLootData() |
2870 Debug("%s: Beginning chat-based loot timer for spellID %d", event_name, spell_id) | 2847 Debug("%s: Beginning chat-based loot timer for spellID %d", event_name, spell_id) |
2871 chat_loot_timer_handle = C_Timer.NewTimer(1, ClearChatLootData) | 2848 chat_loot_timer_handle = C_Timer.NewTimer(1.5, ClearChatLootData) |
2872 | 2849 |
2873 -- Standard item handling setup | 2850 -- Standard item handling setup |
2874 table.wipe(current_action) | 2851 table.wipe(current_action) |
2875 current_loot = nil | 2852 current_loot = nil |
2876 current_action.target_type = AF.ITEM | 2853 current_action.target_type = AF.ITEM |