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 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 |
local g_forceCenterResultsText = false
local pulseTexture = CreateControlFromVirtual ( "$(parent)PulseTexture" , control , "ZO_CraftingResultPulseTexture" )
control . pulseAnimation = ANIMATION_MANAGER : CreateTimelineFromVirtual ( "CraftingResultPulse" , pulseTexture )
end
end
end
return craftingResults
end
control : RegisterForEvent ( EVENT_CRAFT_STARTED , function ( eventCode , ... ) self : OnCraftStarted ( ... ) end )
control : RegisterForEvent ( EVENT_CRAFT_COMPLETED , function ( eventCode , ... ) self : OnCraftCompleted ( ... ) end )
self . enchantSoundPlayer : SetFinishedAllSoundsCallback ( function ( ) self : OnAllEnchantSoundsFinished ( ) end )
end
end
end
end
function ZO_CraftingResults_Base : SetTooltipAnimationSounds ( tooltipAnimationSuccessSound , tooltipAnimationFailureSound )
end
end
end
self . resultTooltipAnimation = ANIMATION_MANAGER : CreateTimelineFromVirtual ( "CraftingResultTooltipAnimation" )
end
self . resultTooltipAnimation : GetAnimationTimeline ( 1 ) : GetAnimation ( 1 ) : SetAnimatedControl ( tooltipBurst1 )
self . resultTooltipAnimation : GetAnimationTimeline ( 1 ) : GetAnimation ( 2 ) : SetAnimatedControl ( tooltipBurst2 )
end
end
end
end
end
if craftingType == CRAFTING_TYPE_PROVISIONING then
return false
elseif craftingType == CRAFTING_TYPE_ENCHANTING then
return true
elseif craftingType == CRAFTING_TYPE_ALCHEMY then
return true
if activeSmithing then
else
return true
end
end
end
--The result of DoesCraftingTypeHaveSlotAnimations for smithing depends on having an active smithing object. There is no such object if the smithing UI
--is closed. This means that the result of the function can change between OnCraftStarted and OnCraftEnded if the smithing UI is closed during a crafting
--operation. So store the results off here and don't call it later on.
local potencySound , potencyLength , essenceSound , essenceLength , aspectSound , aspectLength = ZO_Enchanting_GetVisibleEnchanting ( ) : GetLastRunestoneSoundParams ( )
end
end
end
self . tooltipGlow : SetEdgeTexture ( failure and "EsoUI/Art/Crafting/crafting_toolTip_glow_edge_red64.dds" or "EsoUI/Art/Crafting/crafting_toolTip_glow_edge_blue64.dds" , 512 , 64 )
if failure then
else
end
else
end
end
else
end
end
end
end
end
end
end
if craftingType == CRAFTING_TYPE_BLACKSMITHING then
return ITEMTYPE_BLACKSMITHING_BOOSTER
elseif craftingType == CRAFTING_TYPE_CLOTHIER then
return ITEMTYPE_CLOTHIER_BOOSTER
elseif craftingType == CRAFTING_TYPE_WOODWORKING then
return ITEMTYPE_WOODWORKING_BOOSTER
end
end
if craftingType == CRAFTING_TYPE_BLACKSMITHING then
return SOUNDS . BLACKSMITH_EXTRACTED_BOOSTER
elseif craftingType == CRAFTING_TYPE_CLOTHIER then
return SOUNDS . CLOTHIER_EXTRACTED_BOOSTER
elseif craftingType == CRAFTING_TYPE_WOODWORKING then
return SOUNDS . WOODWORKER_EXTRACTED_BOOSTER
end
end
if craftingType == CRAFTING_TYPE_BLACKSMITHING then
return SI_SMITHING_BLACKSMITH_EXTRACTION_FAILED , SOUNDS . BLACKSMITH_FAILED_EXTRACTION
elseif craftingType == CRAFTING_TYPE_CLOTHIER then
return SI_SMITHING_CLOTHIER_EXTRACTION_FAILED , SOUNDS . CLOTHIER_FAILED_EXTRACTION
elseif craftingType == CRAFTING_TYPE_WOODWORKING then
return SI_SMITHING_WOODWORKING_EXTRACTION_FAILED , SOUNDS . WOODWORKER_FAILED_EXTRACTION
end
end
for i = 1 , numItemsGained do
local name , icon , stack , sellPrice , meetsUsageRequirement , equipType , itemType , itemStyle , quality , itemSoundCategory , itemInstanceId = GetLastCraftingResultItemInfo ( i )
if itemType == boosterItemType then
return true
end
end
end
return false
end
g_forceCenterResultsText = forceCenterResultsText
end
end
end
end
if penaltyApplied then
end
if numItemsGained == 0 then
elseif isImproving then
if penaltyApplied then
ZO_AlertNoSuppression ( UI_ALERT_CATEGORY_ALERT , failedExtractionSoundName , SI_SMITHING_DECONSTRUCTION_LEVEL_PENALTY )
else
end
end
else
for i = 1 , numItemsGained do
local name , icon , stack , sellPrice , meetsUsageRequirement , equipType , itemType , itemStyle , quality , itemSoundCategory , itemInstanceId = GetLastCraftingResultItemInfo ( i )
-- Don't save messages if we can't display them immediately
if shouldDisplayMessages then
local itemInfo = {
icon = icon ,
stack = stack ,
sellPrice = sellPrice ,
meetsUsageRequirement = meetsUsageRequirement ,
equipType = equipType ,
itemType = itemType ,
itemStyle = itemStyle ,
quality = quality ,
itemSoundCategory = itemSoundCategory ,
itemInstanceId = itemInstanceId ,
}
end
if not gainedBooster then
end
end
if gainedBooster then
end
if penaltyApplied then
end
end
if totalInspiration > 0 then
end
end
end
end |