1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
ZO_LOOT_HISTORY_NAME = "ZO_LootHistory"
--
--[[ LootHistory_Manager ]] --
--
-- TODO: change into a callback object so that we don't have to keep using systems for the callback functions
return lootHistory
end
end
end
end
end
end
local function OnCurrencyUpdate ( currencyType , currencyLocation , newAmount , oldAmount , reason , reasonInfo )
SYSTEMS : GetObject ( ZO_LOOT_HISTORY_NAME ) : OnCurrencyUpdate ( currencyType , currencyLocation , newAmount , oldAmount , reason , reasonInfo )
end
if reason == CURRENCY_CHANGE_REASON_DEFENSIVE_KEEP_REWARD or reason == CURRENCY_CHANGE_REASON_OFFENSIVE_KEEP_REWARD then
end
end
end
end
end
end
end
if newState == BATTLEGROUND_STATE_FINISHED then
end
end
end
local function OnInventorySlotUpdate ( bagId , slotId , isNewItem , itemSound , inventoryUpdateReason , stackCountChange , _ , _ , _ , bonusDropSource )
-- This includes any inventory item update, only display if the item was new
if isNewItem and stackCountChange > 0 then
-- cover the case where we got an inventory item update but then the item got whisked away somewhere else
-- before we had a chance to get the info out of it
if itemLink ~= nil and itemLink ~= "" then
local lootType = LOOT_TYPE_ITEM
local isVirtual = bagId == BAG_VIRTUAL
local NO_QUEST_ITEM_ICON = nil
OnNewItemReceived ( itemLink , stackCountChange , itemSound , lootType , NO_QUEST_ITEM_ICON , itemId , isVirtual , isStolen , bonusDropSource )
end
end
end
local function OnQuestToolUpdate ( questIndex , questName , countDelta , questItemIcon , questItemId , questItemName )
if countDelta > 0 then
local NO_ITEM_SOUND = nil
local IS_NOT_VIRTUAL = false
local IS_NOT_STOLEN = false
OnNewItemReceived ( questItemName , countDelta , NO_ITEM_SOUND , LOOT_TYPE_QUEST_ITEM , questItemIcon , questItemId , IS_NOT_VIRTUAL , IS_NOT_STOLEN , BONUS_DROP_SOURCE_NONE )
end
end
end
end
SYSTEMS : GetObject ( ZO_LOOT_HISTORY_NAME ) : OnCrownCrateQuantityUpdated ( lootCrateId , oldCount , newCount )
end
end
end
end
end
end
end
end
end
end
EVENT_MANAGER : RegisterForEvent ( ZO_LOOT_HISTORY_NAME , EVENT_INVENTORY_SINGLE_SLOT_UPDATE , function ( eventId , ... ) OnInventorySlotUpdate ( ... ) end )
EVENT_MANAGER : RegisterForEvent ( ZO_LOOT_HISTORY_NAME , EVENT_CURRENCY_UPDATE , function ( eventId , ... ) OnCurrencyUpdate ( ... ) end )
EVENT_MANAGER : RegisterForEvent ( ZO_LOOT_HISTORY_NAME , EVENT_EXPERIENCE_GAIN , function ( eventId , ... ) OnExperienceGainUpdate ( ... ) end )
EVENT_MANAGER : RegisterForEvent ( ZO_LOOT_HISTORY_NAME , EVENT_QUEST_TOOL_UPDATED , function ( eventId , ... ) OnQuestToolUpdate ( ... ) end )
EVENT_MANAGER : RegisterForEvent ( ZO_LOOT_HISTORY_NAME , EVENT_MEDAL_AWARDED , function ( eventId , ... ) OnMedalAwarded ( ... ) end )
EVENT_MANAGER : RegisterForEvent ( ZO_LOOT_HISTORY_NAME , EVENT_BATTLEGROUND_STATE_CHANGED , function ( eventId , ... ) OnBattlegroundStateChanged ( ... ) end )
EVENT_MANAGER : RegisterForEvent ( ZO_LOOT_HISTORY_NAME , EVENT_CROWN_CRATE_QUANTITY_UPDATE , function ( eventId , ... ) OnCrownCrateQuantityUpdate ( ... ) end )
ZO_COLLECTIBLE_DATA_MANAGER : RegisterCallback ( "OnCollectibleNotificationNew" , function ( ... ) OnNewCollectibleReceived ( ... ) end )
EVENT_MANAGER : RegisterForEvent ( ZO_LOOT_HISTORY_NAME , EVENT_SKILL_XP_UPDATE , function ( eventId , ... ) OnSkillExperienceUpdated ( ... ) end )
EVENT_MANAGER : RegisterForEvent ( ZO_LOOT_HISTORY_NAME , EVENT_ANTIQUITY_LEAD_ACQUIRED , function ( eventId , ... ) OnAntiquityLeadAcquired ( ... ) end )
EVENT_MANAGER : RegisterForEvent ( ZO_LOOT_HISTORY_NAME , EVENT_COMPANION_EXPERIENCE_GAIN , function ( eventId , ... ) OnCompanionExperienceGainUpdate ( ... ) end )
EVENT_MANAGER : RegisterForEvent ( ZO_LOOT_HISTORY_NAME , EVENT_COMPANION_RAPPORT_UPDATE , function ( eventId , ... ) OnCompanionRapportUpdate ( ... ) end )
TRIBUTE_DATA_MANAGER : RegisterCallback ( "ProgressionUpgradeStatusChanged" , function ( ... ) OnTributeProgressionUpgradeStatusChanged ( ... ) end )
end
|