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 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
local GAMEPAD_LOOT_HISTORY_ENTRY_TEMPLATE = "ZO_LootGamepad_HistoryEntry"
return history
end
end
local MONEY_TEXT = {
}
local MONEY_ICONS = {
[ CURT_MONEY ] = LOOT_MONEY_ICON ,
[ CURT_ALLIANCE_POINTS ] = "EsoUI/Art/currency/gamepad/gp_alliancePoints.dds" ,
[ CURT_TELVAR_STONES ] = LOOT_TELVAR_STONE_ICON ,
}
local MONEY_TEXT_COLOR = ZO_SELECTED_TEXT
local MONEY_BACKGROUND_COLORS = {
[ CURT_MONEY ] = ZO_ColorDef : New ( GetInterfaceColor ( INTERFACE_COLOR_TYPE_CURRENCY , CURRENCY_COLOR_GOLD ) ) ,
[ CURT_ALLIANCE_POINTS ] = ZO_ColorDef : New ( GetInterfaceColor ( INTERFACE_COLOR_TYPE_CURRENCY , CURRENCY_COLOR_ALLIANCE_POINTS ) ) ,
[ CURT_TELVAR_STONES ] = ZO_ColorDef : New ( GetInterfaceColor ( INTERFACE_COLOR_TYPE_CURRENCY , CURRENCY_COLOR_TELVAR_STONES ) ) ,
}
else
end
end
local function OnLootReceived ( _ , _ , itemLink , stackCount , _ , lootType , lootedBySelf , _ , questItemIcon , itemId )
local itemName
local icon
local quality
if lootType == LOOT_TYPE_QUEST_ITEM then
itemName = itemLink --quest items don't support item linking, this just returns their name.
icon = questItemIcon
color = ZO_ColorDef : New ( GetInterfaceColor ( INTERFACE_COLOR_TYPE_ITEM_TOOLTIP , ITEM_TOOLTIP_COLOR_QUEST_ITEM_NAME ) )
else
end
local lootData = {
lines = {
{ text = zo_strformat ( SI_TOOLTIP_ITEM_NAME , itemName ) , icon = icon , stackCount = stackCount , color = color , backgroundColor = color , itemId = itemId , quality = quality }
}
}
end
end
local lootData = {
lines = {
{ text = MONEY_TEXT [ moneyType ] , icon = MONEY_ICONS [ moneyType ] , stackCount = moneyAdded , color = MONEY_TEXT_COLOR , backgroundColor = MONEY_BACKGROUND_COLORS [ moneyType ] , moneyType = moneyType }
}
}
end
if reason == CURRENCY_CHANGE_REASON_LOOT or reason == CURRENCY_CHANGE_REASON_LOOT_STOLEN or reason == CURRENCY_CHANGE_REASON_QUESTREWARD then
local goldAdded = newGold - oldGold
end
end
end
end
end
end
if reason == CURRENCY_CHANGE_REASON_LOOT or reason == CURRENCY_CHANGE_REASON_PVP_KILL_TRANSFER then
local tvStonesAdded = newTelvarStones - oldTelvarStones
if tvStonesAdded > 0 then
end
end
end
end
end
if newState == SCENE_FRAGMENT_SHOWN then
elseif newState == SCENE_FRAGMENT_HIDING then
end
end )
end
do
end
-- entry1 and entry2 are tables of one item
local data1 = entry1 [ 1 ]
local data2 = entry2 [ 1 ]
if data1 . moneyType then
return data1 . moneyType == data2 . moneyType
elseif data1 . itemId then
local itemIdsMatch = data1 . itemId == data2 . itemId
if data1 . quality or data2 . quality then
return itemIdsMatch and data1 . quality == data2 . quality
else
return itemIdsMatch
end
else
return false
end
end
local currentEntryData = currentEntry . lines [ 1 ]
local newEntryData = newEntry . lines [ 1 ]
currentEntryData . stackCount = currentEntryData . stackCount + newEntryData . stackCount
end
local MAX_HEIGHT = 364
local HORIZ_OFFSET = ZO_GAMEPAD_SCREEN_PADDING + ZO_GAMEPAD_CONTENT_INSET_X
local VERTICAL_OFFSET = - 164
local MAX_LINES_PER_ENTRY = 1
self . loot = ZO_FadingControlBuffer : New ( control , nil , MAX_HEIGHT , MAX_LINES_PER_ENTRY , "AlertFadeGamepad" , "AlertTranslateGamepad" , anchor )
self . loot : AddTemplate ( GAMEPAD_LOOT_HISTORY_ENTRY_TEMPLATE , { setup = LootSetupFunction , equalityCheck = AreEntriesEqual , equalitySetup = EqualitySetup } )
end
end
end
end
end |