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 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 |
local FORCE_FULL_DURABILITY = true
local DONT_FORCE_FULL_DURABILITY = false
local NOT_EQUIPPED = false
local NO_CREATOR_NAME = nil
local DONT_SHOW_PLAYER_LOCKED = false
local NO_PREVIEW_VALUE = nil
local NO_ITEM_NAME = nil
local NO_TRADE_BOP_DATA = nil
local ITEM_MYTHIC_BORDER_FILE = "EsoUI/Art/Tooltips/Gamepad/GP_UI-Border_Mythic_64px.dds"
local ITEM_MYTHIC_BORDER_RED_FILE = "EsoUI/Art/Tooltips/Gamepad/GP_UI-Border_Mythic_RED_64px.dds"
local ITEM_MYTHIC_FILE_WIDTH = 512
local ITEM_MYTHIC_FILE_HEIGHT = 64
ZO_ENCHANT_DIFF_ADD = "add"
ZO_ENCHANT_DIFF_REMOVE = "remove"
ZO_ENCHANT_DIFF_NONE = "none"
ZO_ITEM_TOOLTIP_INVENTORY_TITLE_COUNT = "inventory"
ZO_ITEM_TOOLTIP_BANK_TITLE_COUNT = "bank"
ZO_ITEM_TOOLTIP_INVENTORY_AND_BANK_TITLE_COUNT = "inventoryAndBank"
ZO_ITEM_TOOLTIP_CRAFTBAG_TITLE_COUNT = "craftbag"
ZO_ITEM_TOOLTIP_INVENTORY_AND_BANK_AND_CRAFTBAG_TITLE_COUNT = "inventoryAndBankAndCraftbag"
--Section Generators
end
if not text1 then
return
end
if unique then
elseif uniqueEquipped then
end
local lineText
if itemType == ITEMTYPE_ARMOR then
if text2 and armorType ~= ARMORTYPE_NONE then
if showInTooltip and itemStyle > 0 then
lineText = zo_strformat ( SI_ITEM_FORMAT_STR_TEXT1_TEXT2_ITEMSTYLE , text1 , text2 , GetItemStyleName ( itemStyle ) )
else
end
end
elseif text2 then
if showInTooltip and itemStyle > 0 then
lineText = zo_strformat ( SI_ITEM_FORMAT_STR_TEXT1_TEXT2_ITEMSTYLE , text1 , text2 , GetItemStyleName ( itemStyle ) )
else
end
end
if not lineText then
end
end
--Item Type Info
if ( itemType == ITEMTYPE_SIEGE ) then
if ( siegeType ~= SIEGE_TYPE_NONE ) then
end
elseif ( itemType == ITEMTYPE_COSTUME ) then
elseif ( itemType == ITEMTYPE_RECIPE ) then
self : AddTypeSlotUniqueLine ( itemLink , itemType , topSection , specializedItemTypeText , GetCraftingSkillName ( craftingSkillType ) )
else
self : AddTypeSlotUniqueLine ( itemLink , itemType , topSection , GetString ( SI_ITEM_FORMAT_STR_UNKNOWN_RECIPE ) , GetCraftingSkillName ( craftingSkillType ) )
end
elseif itemType == ITEMTYPE_FURNISHING then
if specializedItemType ~= SPECIALIZED_ITEMTYPE_FURNISHING_ORNAMENTAL then
else
end
elseif ( itemType ~= ITEMTYPE_NONE and equipType ~= EQUIP_TYPE_INVALID ) then
if itemType == ITEMTYPE_ARMOR and weaponType == WEAPONTYPE_NONE then
self : AddTypeSlotUniqueLine ( itemLink , itemType , topSection , GetString ( "SI_EQUIPTYPE" , equipType ) , GetString ( "SI_ARMORTYPE" , armorType ) )
elseif weaponType ~= WEAPONTYPE_NONE then
self : AddTypeSlotUniqueLine ( itemLink , itemType , topSection , GetString ( "SI_WEAPONTYPE" , weaponType ) , GetString ( "SI_EQUIPTYPE" , equipType ) )
elseif itemType == ITEMTYPE_POISON or itemType == ITEMTYPE_DISGUISE then
end
local itemTypeText = ( specializedItemType ~= SPECIALIZED_ITEMTYPE_NONE ) and specializedItemTypeText or GetString ( SI_ITEM_SUB_TYPE_BOOK )
self : AddTypeSlotUniqueLine ( itemLink , itemType , topSection , GetString ( SI_ITEM_FORMAT_STR_QUEST_STARTER_ITEM ) )
self : AddTypeSlotUniqueLine ( itemLink , itemType , topSection , GetString ( SI_ITEM_FORMAT_STR_QUEST_ITEM ) )
else
if ( craftingSkillType ~= CRAFTING_TYPE_INVALID ) then
self : AddTypeSlotUniqueLine ( itemLink , itemType , topSection , specializedItemTypeText , craftingSkillName )
elseif ( itemType ~= ITEMTYPE_NONE ) then
end
end
end
-- Bound and/or Player Locked
local boundLabel
if tradeBoPData then
else
if isBound and bindType == BIND_TYPE_ON_PICKUP_BACKPACK then
elseif isBound then
elseif bindType ~= BIND_TYPE_NONE and bindType ~= BIND_TYPE_UNSET then
end
end
if showPlayerLocked then
local lineText
if boundLabel then
else
end
elseif boundLabel then
end
-- Stolen
topSubsection : AddLine ( zo_iconTextFormat ( "EsoUI/Art/Inventory/inventory_stolenItem_icon.dds" , 24 , 24 , GetString ( SI_GAMEPAD_ITEM_STOLEN_LABEL ) ) , self : GetStyle ( "stolen" ) )
end
--Item counts
if bagCount > 0 then
end
if bankCount > 0 then
end
if craftBagCount > 0 then
topSubsection : AddLine ( zo_iconTextFormat ( "EsoUI/Art/Tooltips/icon_craft_bag.dds" , 24 , 24 , craftBagCount ) )
end
end
--Damage/Armor
if ( weaponPower > 0 ) then
else
local CONSIDER_CONDITION = true
if ( armorRating > 0 ) then
local valueText
local damagedStyle
if ( effectiveArmorRating == armorRating ) then
valueText = effectiveArmorRating
damagedStyle = nil
else
valueText = zo_strformat ( SI_ITEM_FORMAT_STR_EFFECTIVE_VALUE_OF_MAX , effectiveArmorRating , armorRating )
end
end
end
--Required Level/Champ Rank
if ( not hideItemLevel ) then
if ( requiredLevel > 0 or requiredChampionPoints > 0 ) then
if requiredLevel > 0 then
end
if requiredChampionPoints > 0 then
championStatValuePair : SetStat ( zo_iconTextFormatNoSpace ( GetGamepadChampionPointsIcon ( ) , 32 , 32 , GetString ( SI_ITEM_FORMAT_STR_CHAMPION ) ) , self : GetStyle ( "statValuePairStat" ) )
local failedStyle = requiredChampionPoints > GetPlayerChampionPointsEarned ( ) and self : GetStyle ( "failed" ) or nil
championStatValuePair : SetValue ( requiredChampionPoints , failedStyle , self : GetStyle ( "statValuePairValue" ) )
end
end
end
end
--Value
local CONSIDER_CONDITION = true
local lineText
lineText = zo_strformat ( SI_GAMEPAD_TOOLTIP_EFFECTIVE_ITEM_VALUE_FORMAT , effectiveValueString , valueString , currencyIcon )
else
end
end
end
local MIN_CONDITION_OR_CHARGE = 0
local MAX_CONDITION = 100
end
end
if hasPoison then
--Poison Count
local poisonCountString = zo_iconTextFormatNoSpace ( "EsoUI/Art/Tooltips/icon_poison.dds" , 40 , 40 , poisonCount )
--Poison Name
--Poison Ability
end
end
local bar = nil
if previewValueToAdd then
else
end
end
return improvementBar
end
enchantDiffMode = enchantDiffMode or ZO_ENCHANT_DIFF_NONE
if hasEnchant then
if enchantDiffMode == ZO_ENCHANT_DIFF_NONE then
enchantSection : AddLine ( GetString ( SI_TOOLTIP_ENCHANT_SUPPRESSED_BY_POISON ) , suppressedStyle , self : GetStyle ( "bodyDescription" ) )
else
end
end
end
if hasEnchant and enchantDiffMode ~= ZO_ENCHANT_DIFF_NONE then
local diffColorStyle , icon
if enchantDiffMode == ZO_ENCHANT_DIFF_ADD then
icon = "EsoUI/Art/Buttons/pointsPlus_up.dds"
elseif enchantDiffMode == ZO_ENCHANT_DIFF_REMOVE then
icon = "EsoUI/Art/Buttons/pointsMinus_up.dds"
else
-- If this assert is hit, support needs to be added for the additional
-- enchant diff modes, which do not exist at the time of writing.
end
local enchantmentDescriptionSection = self : AcquireSection ( diffColorStyle , self : GetStyle ( "enchantDiff" ) )
end
end
if isChampionPoints then
text = zo_strformat ( SI_ITEM_ABILITY_SCALING_CHAMPION_POINTS_RANGE , zo_iconFormat ( GetGamepadChampionPointsIcon ( ) , 40 , 40 ) , minLevel , maxLevel )
else
end
end
local hasAbility , abilityHeader , abilityDescription , cooldown , hasScaling , minLevel , maxLevel , isChampionPoints , remainingCooldown = GetItemLinkOnUseAbilityInfo ( itemLink )
if hasAbility then
if abilityHeader ~= "" then
onUseAbilitySection : AddLine ( zo_strformat ( SI_ABILITY_TOOLTIP_DESCRIPTION_HEADER , abilityHeader ) , self : GetStyle ( "bodyHeader" ) )
end
if abilityDescription ~= "" then
if cooldown == 0 then
onUseAbilitySection : AddLine ( zo_strformat ( SI_ITEM_FORMAT_STR_ON_USE , abilityDescription ) , self : GetStyle ( "bodyDescription" ) )
else
local cooldownString = ZO_FormatTimeMilliseconds ( cooldown , TIME_FORMAT_STYLE_DESCRIPTIVE_MINIMAL_HIDE_ZEROES , TIME_FORMAT_PRECISION_SECONDS )
onUseAbilitySection : AddLine ( zo_strformat ( SI_ITEM_FORMAT_STR_ON_USE_COOLDOWN , abilityDescription , cooldownString ) , self : GetStyle ( "bodyDescription" ) )
end
if hasScaling then
end
if cooldown > ZO_ONE_MINUTE_IN_MILLISECONDS and remainingCooldown > 0 then
if remainingCooldown < ZO_ONE_MINUTE_IN_MILLISECONDS then
cooldownRemainingSection : AddLine ( zo_strformat ( SI_ITEM_FORMAT_STR_ON_USE_REMAINING_COOLDOWN , GetString ( SI_STR_TIME_LESS_THAN_MINUTE_SHORT ) ) , self : GetStyle ( "bodyDescription" ) )
else
local formattedRemainingCooldown = ZO_FormatTimeMilliseconds ( remainingCooldown , TIME_FORMAT_STYLE_SHOW_LARGEST_TWO_UNITS , TIME_FORMAT_PRECISION_SECONDS , TIME_FORMAT_DIRECTION_DESCENDING )
cooldownRemainingSection : AddLine ( zo_strformat ( SI_ITEM_FORMAT_STR_ON_USE_REMAINING_COOLDOWN , formattedRemainingCooldown ) , self : GetStyle ( "bodyDescription" ) )
end
end
end
else
local traitAbilities = { }
local maxCooldown = 0
local hasTraitAbility , traitAbilityDescription , traitCooldown , traitHasScaling , traitMinLevel , traitMaxLevel , traitIsChampionPoints = GetItemLinkTraitOnUseAbilityInfo ( itemLink , i )
if hasTraitAbility then
{
hasScaling = traitHasScaling ,
minLevel = traitMinLevel ,
maxLevel = traitMaxLevel ,
isChampionPoints = traitIsChampionPoints ,
} )
if traitCooldown > maxCooldown then
maxCooldown = traitCooldown
end
end
end
if i == # traitAbilities then
if maxCooldown == 0 then
else
local cooldownString = ZO_FormatTimeMilliseconds ( maxCooldown , TIME_FORMAT_STYLE_DESCRIPTIVE_MINIMAL_HIDE_ZEROES , TIME_FORMAT_PRECISION_SECONDS )
end
else
end
end
--We assume that if multiple trait abilities have scaling, they all have the same scaling
if traitAbility . hasScaling then
self : AddItemAbilityScalingRange ( onUseAbilitySection , traitAbility . minLevel , traitAbility . maxLevel , traitAbility . isChampionPoints )
break
end
end
end
end
if traitType ~= ITEM_TRAIT_TYPE_NONE and traitDescription ~= "" then
if traitName ~= "" then
local formattedTraitName
if traitInformationIconPath then
formattedTraitName = zo_strformat ( SI_ITEM_FORMAT_STR_ITEM_TRAIT_WITH_ICON_HEADER , zo_iconFormat ( traitInformationIconPath , 32 , 32 ) , traitName )
else
end
local additionalTooltipStyle
if extraData and extraData . showTraitAsNew then
end
end
end
end
if hasSet then
setSection : AddLine ( zo_strformat ( SI_ITEM_FORMAT_STR_SET_NAME , setName , numEquipped , maxEquipped ) , self : GetStyle ( "bodyHeader" ) )
for bonusIndex = 1 , numBonuses do
if numEquipped >= numRequired then
setSection : AddLine ( bonusDescription , self : GetStyle ( "activeBonus" ) , self : GetStyle ( "bodyDescription" ) )
else
setSection : AddLine ( bonusDescription , self : GetStyle ( "inactiveBonus" ) , self : GetStyle ( "bodyDescription" ) )
end
end
end
end
for setIndex = 1 , numContainerSets do
local hasSet , setName , numBonuses , numEquipped , maxEquipped = GetItemLinkContainerSetInfo ( itemLink , setIndex )
if hasSet then
if setIndex > 1 then
end
setSection : AddLine ( zo_strformat ( SI_ITEM_FORMAT_STR_SET_NAME , setName , numEquipped , maxEquipped ) , self : GetStyle ( "bodyHeader" ) )
for bonusIndex = 1 , numBonuses do
local numRequired , bonusDescription = GetItemLinkContainerSetBonusInfo ( itemLink , setIndex , bonusIndex )
if numEquipped >= numRequired then
setSection : AddLine ( bonusDescription , self : GetStyle ( "activeBonus" ) , self : GetStyle ( "bodyDescription" ) )
else
setSection : AddLine ( bonusDescription , self : GetStyle ( "inactiveBonus" ) , self : GetStyle ( "bodyDescription" ) )
end
end
end
end
end
poisonSystemDescriptionSection : AddLine ( GetString ( SI_POISON_SYSTEM_INFO ) , self : GetStyle ( "flavorText" ) )
end
if flavorText ~= "" then
end
end
prioritySellSection : AddLine ( GetString ( SI_ITEM_FORMAT_STR_PRIORITY_SELL ) , self : GetStyle ( "prioritySellText" ) )
end
end
if collectibleId ~= 0 then
if collectibleName ~= "" then
local formatterStringId
if collectibleCategory == COLLECTIBLE_CATEGORY_TYPE_CHAPTER then
formatterStringId = SI_COLLECTIBLE_REQUIRED_TO_USE_ITEM_UPGRADE
formatterStringId = SI_COLLECTIBLE_REQUIRED_TO_USE_ITEM_CROWN_STORE
else
formatterStringId = SI_COLLECTIBLE_REQUIRED_TO_USE_ITEM
end
end
end
return ""
end
if collectibleId ~= 0 then
local colorStyle = IsCollectibleUnlocked ( collectibleId ) and self : GetStyle ( "succeeded" ) or self : GetStyle ( "failed" )
end
end
end
combinationSection : AddLine ( zo_strformat ( SI_ITEM_FORMAT_STR_COMBINATION , description ) , self : GetStyle ( "bodyDescription" ) )
end
end
if grantedCollectibleId > 0 then
bodySection : AddLine ( GetString ( SI_ITEM_FORMAT_STR_ALREADY_IN_COLLECTION ) , self : GetStyle ( "bodyDescription" ) )
elseif collectibleCategory == COLLECTIBLE_CATEGORY_TYPE_COMBINATION_FRAGMENT and not CanCombinationFragmentBeUnlocked ( grantedCollectibleId ) then
bodySection : AddLine ( GetString ( SI_ITEM_FORMAT_STR_ALREADY_OWN_COMBINATION_RESULT ) , self : GetStyle ( "bodyDescription" ) , self : GetStyle ( "failed" ) )
else
bodySection : AddLine ( ZO_SUCCEEDED_TEXT : Colorize ( GetString ( SI_ITEM_FORMAT_STR_ADD_TO_COLLECTION ) ) , self : GetStyle ( "bodyDescription" ) )
end
end
end
if creatorName then
if ( creatorName ~= "" ) then
if ( itemType == ITEMTYPE_TABARD ) then
creatorSection : AddLine ( zo_strformat ( SI_ITEM_FORMAT_STR_TABARD , creatorName ) , self : GetStyle ( "bodyDescription" ) )
else
creatorSection : AddLine ( zo_strformat ( SI_ITEM_FORMAT_STR_CREATOR , creatorName ) , self : GetStyle ( "bodyDescription" ) )
end
else
end
end
end
end
if levelsDescription ~= "" then
end
end
if numItemTags > 0 then
local itemTagStrings = { }
-- Build a map of tag category -> table of tags in that category
for i = 1 , numItemTags do
if itemTagDescription ~= "" then
if not itemTagStrings [ itemTagCategory ] then
itemTagStrings [ itemTagCategory ] = { }
end
table . insert ( itemTagStrings [ itemTagCategory ] , zo_strformat ( SI_TOOLTIP_ITEM_TAG_FORMATER , itemTagDescription ) )
end
end
-- Iterate through categories, and build a section for each category with tags in it
for i = TAG_CATEGORY_MIN_VALUE , TAG_CATEGORY_MAX_VALUE do
if itemTagStrings [ i ] then
if categoryName ~= "" then
end
itemTagsSection : AddLine ( table . concat ( itemTagStrings [ i ] , GetString ( SI_LIST_COMMA_SEPARATOR ) ) , self : GetStyle ( "itemTagDescription" ) )
end
end
end
end
--Layout Functions
-- Self is an internal scroll tooltip control, but the border we want to set is on the
-- outer container control. That container control has been reference on the tooltip control self.
-- Set Mythic Border to show or hide depending on if the item is Mythic
local borderFile
borderFile = ITEM_MYTHIC_BORDER_RED_FILE
else
borderFile = ITEM_MYTHIC_BORDER_FILE
end
self . gamepadTooltipContainerBorderControl : SetEdgeTexture ( borderFile , ITEM_MYTHIC_FILE_WIDTH , ITEM_MYTHIC_FILE_HEIGHT )
end
end
function ZO_Tooltip : LayoutGenericItem ( itemLink , equipped , creatorName , forceFullDurability , previewValueToAdd , itemName , equipSlot , showPlayerLocked , tradeBoPData , extraData )
end
local enchantDiffMode
if extraData then
enchantDiffMode = extraData . enchantDiffMode
end
else
end
end
-- We don't want crafted furniture to show who made it, since it will get cleared once placed in a house
-- TODO: If we implement saving the creator name, add back in LayoutItemCreator call (ESO-495280)
if not isFurniture then
end
if isFurniture then
end
end
end
boosterDescriptionSection : AddLine ( zo_strformat ( SI_ENCHANTMENT_BOOSTER_DESCRIPTION , fromQualityText , toQualityText ) , self : GetStyle ( "bodyDescription" ) )
end
do
if minLevel or minChampionPoints then
if minChampionPoints then
requirementsSection : AddLine ( zo_strformat ( SI_ENCHANTING_GLYPH_REQUIRED_SINGLE_CHAMPION_POINTS_GAMEPAD , FORMATTED_CHAMPION_RANK_ICON , minChampionPoints ) , self : GetStyle ( "bodyDescription" ) )
else
requirementsSection : AddLine ( zo_strformat ( SI_ENCHANTING_GLYPH_REQUIRED_SINGLE_LEVEL , minLevel ) , self : GetStyle ( "bodyDescription" ) )
end
end
end
end
end
if maxHP > 0 then
statValuePair : SetValue ( zo_strformat ( SI_SIEGE_TOOLTIP_TOUGHNESS_FORMAT , maxHP ) , self : GetStyle ( "statValuePairValue" ) )
end
end
end
end
end
do
end
if onUseType == ITEM_USE_TYPE_ITEM_DYE_STAMP then
descriptionSection : AddLine ( GetString ( SI_DYE_STAMP_ITEM_DESCRIPTION ) , self : GetStyle ( "bodyDescription" ) )
elseif onUseType == ITEM_USE_TYPE_COSTUME_DYE_STAMP then
descriptionSection : AddLine ( GetString ( SI_DYE_STAMP_COSTUME_DESCRIPTION ) , self : GetStyle ( "bodyDescription" ) )
end
-- list of dyes in stamp
elseif onUseType == ITEM_USE_TYPE_ITEM_DYE_STAMP then
if useResult == DYE_STAMP_USE_RESULT_NO_VALID_ITEMS then
elseif useResult == DYE_STAMP_USE_RESULT_ITEMS_HAVE_SAME_DYES then
end
elseif onUseType == ITEM_USE_TYPE_COSTUME_DYE_STAMP then
if useResult == DYE_STAMP_USE_RESULT_NO_VALID_COLLECTIBLES then
elseif useResult == DYE_STAMP_USE_RESULT_COLLECTIBLES_HAVE_SAME_DYES then
elseif useResult == DYE_STAMP_USE_RESULT_COLLECTIBLES_NOT_ACTIVE then
end
end
end
end
end
else
knownSection : AddLine ( ZO_SUCCEEDED_TEXT : Colorize ( GetString ( SI_LORE_LIBRARY_USE_TO_LEARN ) ) , self : GetStyle ( "bodyDescription" ) )
end
end
end
end
end
local IGNORE_LEVEL = true
if ( resultItemLink ~= "" ) then
end
--Ingredients
if ( numIngredients > 0 ) then
ingredientsSection : AddLine ( GetString ( SI_PROVISIONER_INGREDIENTS_HEADER ) , self : GetStyle ( "bodyHeader" ) )
for i = 1 , numIngredients do
local hasIngredientStyle
if numOwned >= numRequired then
else
end
local ingredientNameWithRequiredQuantity = zo_strformat ( SI_RECIPE_INGREDIENT_WITH_COUNT , ingredientName , numRequired )
ingredientsSection : AddLine ( zo_strformat ( SI_NUMBERED_LIST_ENTRY , i , ingredientNameWithRequiredQuantity ) , hasIngredientStyle , self : GetStyle ( "bodyDescription" ) )
end
end
--Requirements
requirementsSection : AddLine ( GetString ( SI_PROVISIONER_REQUIREMENTS_HEADER ) , self : GetStyle ( "bodyHeader" ) )
local rankSuccessStyle
else
end
requirementsSection : AddLine ( zo_strformat ( SI_RECIPE_REQUIRES_LEVEL_PASSIVE , levelPassiveAbilityName , levelReq ) , rankSuccessStyle , self : GetStyle ( "bodyDescription" ) )
end
if requiredQuality > 0 then
local qualitySuccessStyle
if quality >= requiredQuality then
else
end
--Only exclusively provisioning system recipes have a quality requirement
requirementsSection : AddLine ( zo_strformat ( SI_PROVISIONER_REQUIRES_RECIPE_QUALITY , requiredQuality ) , qualitySuccessStyle , self : GetStyle ( "bodyDescription" ) )
end
--Use to learn
useToLearnOrKnownSection : AddLine ( GetString ( SI_RECIPE_ALREADY_KNOWN ) , self : GetStyle ( "bodyDescription" ) )
else
useToLearnOrKnownSection : AddLine ( ZO_SUCCEEDED_TEXT : Colorize ( GetString ( SI_USE_TO_LEARN_RECIPE ) ) , self : GetStyle ( "bodyDescription" ) )
end
end
local traitSection
if known ~= nil then
if not traitSection then
end
local displayName
local knownStyle
if known then
else
end
traitSection : AddLine ( zo_strformat ( SI_NUMBERED_LIST_ENTRY , i , displayName ) , knownStyle , self : GetStyle ( "bodyDescription" ) )
end
end
if traitSection then
end
end
if known ~= nil then
translationSection : AddLine ( GetString ( SI_ENCHANTING_TRANSLATION_HEADER ) , self : GetStyle ( "bodyHeader" ) )
if known then
translationSection : AddLine ( zo_strformat ( SI_ENCHANTING_TRANSLATION_KNOWN , name ) , self : GetStyle ( "bodyDescription" ) )
else
translationSection : AddLine ( GetString ( SI_ENCHANTING_TRANSLATION_UNKNOWN ) , self : GetStyle ( "bodyDescription" ) )
end
end
if runeClassification == ENCHANTING_RUNE_POTENCY then
local requiredRankStyle
else
end
requirementSection : AddLine ( zo_strformat ( SI_ENCHANTING_REQUIRES_POTENCY_IMPROVEMENT , requiredRank ) , requiredRankStyle , self : GetStyle ( "bodyDescription" ) )
elseif runeClassification == ENCHANTING_RUNE_ASPECT then
local requiredRankStyle
else
end
requirementSection : AddLine ( zo_strformat ( SI_ENCHANTING_REQUIRES_ASPECT_IMPROVEMENT , requiredRank ) , requiredRankStyle , self : GetStyle ( "bodyDescription" ) )
end
end
local itemTypeString = GetString ( ( itemType == ITEMTYPE_POTION_BASE ) and SI_ITEM_FORMAT_STR_POTION or SI_ITEM_FORMAT_STR_POISON )
if requiredLevel > 0 or requiredChampionPoints > 0 then
if requiredChampionPoints > 0 then
createsSection : AddLine ( zo_strformat ( SI_ITEM_FORMAT_STR_CREATES_ALCHEMY_ITEM_OF_CHAMPION_POINTS , requiredChampionPoints , itemTypeString ) , self : GetStyle ( "bodyDescription" ) )
else
createsSection : AddLine ( zo_strformat ( SI_ITEM_FORMAT_STR_CREATES_ALCHEMY_ITEM_OF_LEVEL , requiredLevel , itemTypeString ) , self : GetStyle ( "bodyDescription" ) )
end
end
local requirementStyle
else
end
requirementSection : AddLine ( zo_strformat ( SI_REQUIRES_ALCHEMY_SOLVENT_PURIFICATION , requiredRank ) , requirementStyle , self : GetStyle ( "bodyDescription" ) )
end
end
local descriptionString = SI_ITEM_FORMAT_STR_STYLE_MATERIAL
descriptionString = SI_ITEM_DESCRIPTION_UNIVERSAL_STYLE
end
styleSection : AddLine ( zo_strformat ( descriptionString , GetItemStyleName ( style ) ) , self : GetStyle ( "bodyDescription" ) )
end
if ( refinedItemLink ~= "" ) then
refinedSection : AddLine ( zo_strformat ( SI_TOOLTIP_ITEM_FORMAT_REFINES_TO , minRawMats , maxRawMats , qualityColor : Colorize ( refinedItemName ) ) , self : GetStyle ( "bodyDescription" ) )
end
end
if refinedItemLink ~= "" then
local toQualityText = GetItemQualityColor ( toDisplayQuality ) : Colorize ( GetString ( "SI_ITEMQUALITY" , toDisplayQuality ) )
local fromQualityText = GetItemQualityColor ( fromDisplayQuality ) : Colorize ( GetString ( "SI_ITEMQUALITY" , fromDisplayQuality ) )
boosterDescriptionSection : AddLine ( zo_strformat ( SI_RAW_BOOSTER_DESCRIPTION , requiredStackSize , refinedItemText , fromQualityText , toQualityText ) , self : GetStyle ( "bodyDescription" ) )
end
end
end
end
local ITEMTYPE_TRAIT_DESCRIPTIONS = {
[ ITEMTYPE_ARMOR_TRAIT ] = SI_ITEM_FORMAT_STR_ARMOR_TRAIT ,
[ ITEMTYPE_WEAPON_TRAIT ] = SI_ITEM_FORMAT_STR_WEAPON_TRAIT ,
[ ITEMTYPE_JEWELRY_TRAIT ] = SI_ITEM_FORMAT_STR_JEWELRY_TRAIT ,
}
local descriptionId = ITEMTYPE_TRAIT_DESCRIPTIONS [ itemType ]
end
if prospectiveAlchemyResult == PROSPECTIVE_ALCHEMY_RESULT_KNOWN and itemLink and itemLink ~= "" then
end
else
end
if prospectiveAlchemyResult == PROSPECTIVE_ALCHEMY_RESULT_UNCRAFTABLE then
else
end
end
end
if itemLink and itemLink ~= "" then
end
else
end
enchantingSection : AddLine ( GetString ( SI_ENCHANTING_UNKNOWN_RESULT ) , self : GetStyle ( "bodyDescription" ) )
end
end
function ZO_Tooltip : LayoutEnchantingPreview ( potencyRuneBagId , potencyRuneSlotIndex , essenceRuneBagId , essenceRuneSlotIndex , aspectRuneBagId , aspectRuneSlotIndex , extraData )
local _ , icon = GetEnchantingResultingItemInfo ( potencyRuneBagId , potencyRuneSlotIndex , essenceRuneBagId , essenceRuneSlotIndex , aspectRuneBagId , aspectRuneSlotIndex )
local itemLink = GetEnchantingResultingItemLink ( potencyRuneBagId , potencyRuneSlotIndex , essenceRuneBagId , essenceRuneSlotIndex , aspectRuneBagId , aspectRuneSlotIndex )
end
if itemLink and itemLink ~= "" then
end
local stackCount = 1 -- currently stores only sell single items not stacks
end
end
if itemData . entryType == STORE_ENTRY_TYPE_COLLECTIBLE then
elseif itemData . entryType == STORE_ENTRY_TYPE_QUEST_ITEM then
elseif itemData . entryType == STORE_ENTRY_TYPE_ANTIQUITY_LEAD then
else
end
local requiredToBuyErrorText = itemData . dataSource . requiredToBuyErrorText
if requiredToBuyErrorText ~= "" then
end
end
end
if itemLink and itemLink ~= "" then
end
end
end
if stackCount then
itemName = zo_strformat ( SI_GAMEPAD_SMITHING_TOOLTIP_UNIVERSAL_STYLE_ITEM_TITLE , itemName , stackCount )
end
styleSection : AddLine ( GetString ( SI_CRAFTING_UNIVERSAL_STYLE_ITEM_TOOLTIP ) , self : GetStyle ( "bodyDescription" ) )
styleSection : AddLine ( GetString ( SI_CRAFTING_UNIVERSAL_STYLE_ITEM_CROWN_STORE_TOOLTIP ) , self : GetStyle ( "bodyDescription" ) )
end
if tradeBoPData then
local timeRemaining = tradeBoPData . timeRemaining
local tradeBoPSection = self : AcquireSection ( self : GetStyle ( "bodySection" ) , self : GetStyle ( "itemTradeBoPSection" ) )
local formattedTimeRemaining
if timeRemaining > ZO_ONE_MINUTE_IN_SECONDS then
formattedTimeRemaining = zo_round ( timeRemaining / ZO_ONE_MINUTE_IN_SECONDS ) * ZO_ONE_MINUTE_IN_SECONDS
formattedTimeRemaining = ZO_FormatTime ( formattedTimeRemaining , TIME_FORMAT_STYLE_DESCRIPTIVE_SHORT , TIME_FORMAT_PRECISION_SECONDS , TIME_FORMAT_DIRECTION_DESCENDING )
else
end
local statValuePairTimer = tradeBoPSection : AcquireStatValuePair ( self : GetStyle ( "statValuePair" ) , self : GetStyle ( "fullWidth" ) )
statValuePairTimer : SetStat ( GetString ( SI_ITEM_FORMAT_STR_TRADE_BOP_TIMER_HEADER ) , self : GetStyle ( "statValuePairStat" ) , self : GetStyle ( "itemTradeBoPHeader" ) )
tradeBoPSection : AddLine ( GetString ( SI_ITEM_FORMAT_STR_TRADE_BOP_PLAYERS_HEADER ) , self : GetStyle ( "statValuePairStat" ) , self : GetStyle ( "itemTradeBoPHeader" ) )
tradeBoPSection : AddLine ( tradeBoPData . namesString , self : GetStyle ( "statValuePairValue" ) , self : GetStyle ( "fullWidth" ) )
end
end
statsSection : AddLine ( GetString ( SI_ITEM_FORMAT_STR_FORCED_NOT_DECONSTRUCTIBLE ) , self : GetStyle ( "bodyDescription" ) , self : GetStyle ( "notDeconstructable" ) )
end
end
if itemLink and itemLink ~= "" then
end
end
end
do
local LAYOUT_FUNCTIONS =
{
[ ITEMTYPE_RECIPE ] = function ( self , itemLink , creatorName , itemName , tradeBoPData , extraData ) self : LayoutProvisionerRecipe ( itemLink , itemName , tradeBoPData , extraData ) end ,
[ ITEMTYPE_BLACKSMITHING_BOOSTER ] = function ( self , itemLink , creatorName , itemName , tradeBoPData , extraData ) self : LayoutBooster ( itemLink , itemName , extraData ) end ,
[ ITEMTYPE_WOODWORKING_BOOSTER ] = function ( self , itemLink , creatorName , itemName , tradeBoPData , extraData ) self : LayoutBooster ( itemLink , itemName , extraData ) end ,
[ ITEMTYPE_CLOTHIER_BOOSTER ] = function ( self , itemLink , creatorName , itemName , tradeBoPData , extraData ) self : LayoutBooster ( itemLink , itemName , extraData ) end ,
[ ITEMTYPE_JEWELRYCRAFTING_BOOSTER ] = function ( self , itemLink , creatorName , itemName , tradeBoPData , extraData ) self : LayoutBooster ( itemLink , itemName , extraData ) end ,
[ ITEMTYPE_GLYPH_WEAPON ] = function ( self , itemLink , creatorName , itemName , tradeBoPData , extraData ) self : LayoutGlyph ( itemLink , creatorName , itemName , tradeBoPData , extraData ) end ,
[ ITEMTYPE_GLYPH_ARMOR ] = function ( self , itemLink , creatorName , itemName , tradeBoPData , extraData ) self : LayoutGlyph ( itemLink , creatorName , itemName , tradeBoPData , extraData ) end ,
[ ITEMTYPE_GLYPH_JEWELRY ] = function ( self , itemLink , creatorName , itemName , tradeBoPData , extraData ) self : LayoutGlyph ( itemLink , creatorName , itemName , tradeBoPData , extraData ) end ,
[ ITEMTYPE_REAGENT ] = function ( self , itemLink , creatorName , itemName , tradeBoPData , extraData ) self : LayoutReagent ( itemLink , itemName , extraData ) end ,
[ ITEMTYPE_POTION_BASE ] = function ( self , itemLink , creatorName , itemName , tradeBoPData , extraData ) self : LayoutAlchemyBase ( itemLink , itemName , extraData ) end ,
[ ITEMTYPE_POISON_BASE ] = function ( self , itemLink , creatorName , itemName , tradeBoPData , extraData ) self : LayoutAlchemyBase ( itemLink , itemName , extraData ) end ,
[ ITEMTYPE_INGREDIENT ] = function ( self , itemLink , creatorName , itemName , tradeBoPData , extraData ) self : LayoutIngredient ( itemLink , itemName , extraData ) end ,
[ ITEMTYPE_STYLE_MATERIAL ] = function ( self , itemLink , creatorName , itemName , tradeBoPData , extraData ) self : LayoutStyleMaterial ( itemLink , itemName , extraData ) end ,
[ ITEMTYPE_BLACKSMITHING_RAW_MATERIAL ] = function ( self , itemLink , creatorName , itemName , tradeBoPData , extraData ) self : LayoutRawBaseMaterial ( itemLink , itemName , extraData ) end ,
[ ITEMTYPE_CLOTHIER_RAW_MATERIAL ] = function ( self , itemLink , creatorName , itemName , tradeBoPData , extraData ) self : LayoutRawBaseMaterial ( itemLink , itemName , extraData ) end ,
[ ITEMTYPE_WOODWORKING_RAW_MATERIAL ] = function ( self , itemLink , creatorName , itemName , tradeBoPData , extraData ) self : LayoutRawBaseMaterial ( itemLink , itemName , extraData ) end ,
[ ITEMTYPE_JEWELRYCRAFTING_RAW_MATERIAL ] = function ( self , itemLink , creatorName , itemName , tradeBoPData , extraData ) self : LayoutRawBaseMaterial ( itemLink , itemName , extraData ) end ,
[ ITEMTYPE_RAW_MATERIAL ] = function ( self , itemLink , creatorName , itemName , tradeBoPData , extraData ) self : LayoutRawMaterial ( itemLink , itemName , extraData ) end ,
[ ITEMTYPE_JEWELRYCRAFTING_RAW_BOOSTER ] = function ( self , itemLink , creatorName , itemName , tradeBoPData , extraData ) self : LayoutRawBooster ( itemLink , itemName , extraData ) end ,
[ ITEMTYPE_JEWELRY_RAW_TRAIT ] = function ( self , itemLink , creatorName , itemName , tradeBoPData , extraData ) self : LayoutRawMaterial ( itemLink , itemName , extraData ) end ,
[ ITEMTYPE_BLACKSMITHING_MATERIAL ] = function ( self , itemLink , creatorName , itemName , tradeBoPData , extraData ) self : LayoutMaterial ( itemLink , itemName , extraData ) end ,
[ ITEMTYPE_CLOTHIER_MATERIAL ] = function ( self , itemLink , creatorName , itemName , tradeBoPData , extraData ) self : LayoutMaterial ( itemLink , itemName , extraData ) end ,
[ ITEMTYPE_WOODWORKING_MATERIAL ] = function ( self , itemLink , creatorName , itemName , tradeBoPData , extraData ) self : LayoutMaterial ( itemLink , itemName , extraData ) end ,
[ ITEMTYPE_JEWELRYCRAFTING_MATERIAL ] = function ( self , itemLink , creatorName , itemName , tradeBoPData , extraData ) self : LayoutMaterial ( itemLink , itemName , extraData ) end ,
[ ITEMTYPE_ARMOR_TRAIT ] = function ( self , itemLink , creatorName , itemName , tradeBoPData , extraData ) self : LayoutTrait ( itemLink , itemName , ITEMTYPE_ARMOR_TRAIT , extraData ) end ,
[ ITEMTYPE_WEAPON_TRAIT ] = function ( self , itemLink , creatorName , itemName , tradeBoPData , extraData ) self : LayoutTrait ( itemLink , itemName , ITEMTYPE_WEAPON_TRAIT , extraData ) end ,
[ ITEMTYPE_JEWELRY_TRAIT ] = function ( self , itemLink , creatorName , itemName , tradeBoPData , extraData ) self : LayoutTrait ( itemLink , itemName , ITEMTYPE_JEWELRY_TRAIT , extraData ) end ,
[ ITEMTYPE_SIEGE ] = function ( self , itemLink , creatorName , itemName , tradeBoPData , extraData ) self : LayoutSiege ( itemLink , itemName , tradeBoPData , extraData ) end ,
[ ITEMTYPE_TOOL ] = function ( self , itemLink , creatorName , itemName , tradeBoPData , extraData ) self : LayoutTool ( itemLink , itemName , tradeBoPData , extraData ) end ,
[ ITEMTYPE_SOUL_GEM ] = function ( self , itemLink , creatorName , itemName , tradeBoPData , extraData ) self : LayoutSoulGem ( itemLink , itemName , extraData ) end ,
[ ITEMTYPE_AVA_REPAIR ] = function ( self , itemLink , creatorName , itemName , tradeBoPData , extraData ) self : LayoutAvARepair ( itemLink , itemName , extraData ) end ,
[ ITEMTYPE_DYE_STAMP ] = function ( self , itemLink , creatorName , itemName , tradeBoPData , extraData ) self : LayoutDyeStamp ( itemLink , itemName , extraData ) end ,
}
--TODO: Get creatorName from itemLink?
-- extraData is a table of optional parameters or additional information for tooltip layouts that aren't generic or commonly used
-- AvailableOptions:
-- enchantDiffMode - Controls the display of enchantment information as being added, removed, or default
-- showTraitAsNew - Displays the trait information of an item as if it's being added to the item or otherwise new
function ZO_Tooltip : LayoutItem ( itemLink , equipped , creatorName , forceFullDurability , previewValueToAdd , itemName , equipSlot , showPlayerLocked , tradeBoPData , extraData )
local isValidItemLink = itemLink ~= ""
if isValidItemLink then
--first do checks that can't be determined from the item type
else
end
else
-- now attempt to layout the itemlink by the item type
else
else
else -- fallback to our default layout
if equipped == NOT_EQUIPPED then
equipSlot = EQUIP_SLOT_NONE
end
self : LayoutGenericItem ( itemLink , equipped , creatorName , forceFullDurability , previewValueToAdd , itemName , equipSlot , showPlayerLocked , tradeBoPData , extraData )
end
end
end
end
end
return isValidItemLink
end
end
function ZO_Tooltip : LayoutItemWithStackCount ( itemLink , equipped , creatorName , forceFullDurability , previewValueToAdd , customOrBagStackCount , equipSlot , showPlayerLocked , tradeBoPData , extraData )
local isValidItemLink = itemLink ~= ""
if isValidItemLink then
local stackCount
if customOrBagStackCount == ZO_ITEM_TOOLTIP_INVENTORY_TITLE_COUNT then
stackCount = bagCount
elseif customOrBagStackCount == ZO_ITEM_TOOLTIP_BANK_TITLE_COUNT then
stackCount = bankCount
elseif customOrBagStackCount == ZO_ITEM_TOOLTIP_INVENTORY_AND_BANK_TITLE_COUNT then
stackCount = bagCount + bankCount
elseif customOrBagStackCount == ZO_ITEM_TOOLTIP_CRAFTBAG_TITLE_COUNT then
stackCount = craftBagCount
elseif customOrBagStackCount == ZO_ITEM_TOOLTIP_INVENTORY_AND_BANK_AND_CRAFTBAG_TITLE_COUNT then
stackCount = bagCount + bankCount + craftBagCount
else
stackCount = customOrBagStackCount
end
if stackCount and stackCount > 1 then
end
return self : LayoutItem ( itemLink , equipped , creatorName , forceFullDurability , previewValueToAdd , itemName , equipSlot , showPlayerLocked , tradeBoPData , extraData )
end
end
return self : LayoutItemWithStackCount ( itemLink , NOT_EQUIPPED , NO_CREATOR_NAME , DONT_FORCE_FULL_DURABILITY , NO_PREVIEW_VALUE , customOrBagStackCount , EQUIP_SLOT_NONE )
end
-- "Specific Layout Functions"
local equipped = bagId == BAG_WORN
local equipSlot = equipped and slotIndex or EQUIP_SLOT_NONE
local stackCount = ZO_ITEM_TOOLTIP_INVENTORY_TITLE_COUNT
if showCombinedCount then
stackCount = ZO_ITEM_TOOLTIP_INVENTORY_AND_BANK_AND_CRAFTBAG_TITLE_COUNT
else
if bagId == BAG_BANK then
stackCount = ZO_ITEM_TOOLTIP_BANK_TITLE_COUNT
elseif bagId == BAG_BACKPACK then
stackCount = ZO_ITEM_TOOLTIP_INVENTORY_TITLE_COUNT
elseif bagId == BAG_VIRTUAL then
stackCount = ZO_ITEM_TOOLTIP_CRAFTBAG_TITLE_COUNT
elseif equipped then
if slotIndex == EQUIP_SLOT_POISON or slotIndex == EQUIP_SLOT_BACKUP_POISON then
else
stackCount = 1
end
end
end
local tradeBoPData
tradeBoPData =
{
}
end
return self : LayoutItemWithStackCount ( itemLink , equipped , GetItemCreatorName ( bagId , slotIndex ) , DONT_FORCE_FULL_DURABILITY , NO_PREVIEW_VALUE , stackCount , equipSlot , showPlayerLocked , tradeBoPData , extraData )
end
local equipped = false
local name , icon , stack , displayQuality , creator , sellPrice , meetsUsageRequirement , equipType , itemStyle = GetTradeItemInfo ( who , tradeIndex )
local tradeBoPData
tradeBoPData =
{
}
end
return self : LayoutItemWithStackCount ( itemLink , equipped , creator , DONT_FORCE_FULL_DURABILITY , NO_PREVIEW_VALUE , stack , EQUIP_SLOT_NONE , DONT_SHOW_PLAYER_LOCKED , tradeBoPData )
end
function ZO_Tooltip : LayoutPendingSmithingItem ( patternIndex , materialIndex , materialQuantity , styleIndex , traitIndex )
local _ , _ , icon = GetSmithingPatternInfo ( patternIndex , materialIndex , materialQuantity , styleIndex , traitIndex )
local itemLink = GetSmithingPatternResultLink ( patternIndex , materialIndex , materialQuantity , styleIndex , traitIndex )
if itemLink and itemLink ~= "" then
end
end
end
function ZO_Tooltip : LayoutPendingEnchantedItem ( itemBagId , itemIndex , enchantmentBagId , enchantmentIndex )
local itemLink = GetEnchantedItemResultingItemLink ( itemBagId , itemIndex , enchantmentBagId , enchantmentIndex )
local extraData =
{
enchantDiffMode = ZO_ENCHANT_DIFF_ADD ,
}
self : LayoutItem ( itemLink , NOT_EQUIPPED , NO_CREATOR_NAME , FORCE_FULL_DURABILITY , NO_PREVIEW_VALUE , NO_ITEM_NAME , EQUIP_SLOT_NONE , DONT_SHOW_PLAYER_LOCKED , NO_TRADE_BOP_DATA , extraData )
end
function ZO_Tooltip : LayoutPendingItemChargeOrRepair ( itemBagId , itemSlotIndex , improvementKitBagId , improvementKitIndex , improvementFunc )
local previewValueToAdd = improvementFunc ( itemBagId , itemSlotIndex , improvementKitBagId , improvementKitIndex )
local extraData =
{
enchantDiffMode = ZO_ENCHANT_DIFF_ADD ,
}
self : LayoutItem ( itemLink , NOT_EQUIPPED , NO_CREATOR_NAME , DONT_FORCE_FULL_DURABILITY , previewValueToAdd , NO_ITEM_NAME , EQUIP_SLOT_NONE , DONT_SHOW_PLAYER_LOCKED , NO_TRADE_BOP_DATA , extraData )
end
function ZO_Tooltip : LayoutPendingItemCharge ( itemBagId , itemSlotIndex , improvementKitBagId , improvementKitIndex )
self : LayoutPendingItemChargeOrRepair ( itemBagId , itemSlotIndex , improvementKitBagId , improvementKitIndex , GetAmountSoulGemWouldChargeItem )
end
function ZO_Tooltip : LayoutPendingItemRepair ( itemBagId , itemSlotIndex , improvementKitBagId , improvementKitIndex )
self : LayoutPendingItemChargeOrRepair ( itemBagId , itemSlotIndex , improvementKitBagId , improvementKitIndex , GetAmountRepairKitWouldRepairItem )
end
local tradeBoPData
tradeBoPData =
{
}
end
return self : LayoutItem ( itemLink , NOT_EQUIPPED , GetItemCreatorName ( bagId , slotIndex ) , DONT_FORCE_FULL_DURABILITY , NO_PREVIEW_VALUE , NO_ITEM_NAME , EQUIP_SLOT_NONE , showPlayerLocked , tradeBoPData )
end
function ZO_Tooltip : LayoutImproveResultSmithingItem ( itemToImproveBagId , itemToImproveSlotIndex , craftingSkillType )
local _ , icon = GetSmithingImprovedItemInfo ( itemToImproveBagId , itemToImproveSlotIndex , craftingSkillType )
local itemLink = GetSmithingImprovedItemLink ( itemToImproveBagId , itemToImproveSlotIndex , craftingSkillType )
if itemLink and itemLink ~= "" then
end
end
--Add line for tradeable loss
section : AddLine ( GetString ( SI_SMITHING_IMPROVEMENT_TRADE_BOP_WILL_BECOME_UNTRADEABLE ) , self : GetStyle ( "bodyDescription" ) , self : GetStyle ( "failed" ) )
end
end
function ZO_Tooltip : LayoutResearchSmithingItem ( traitType , traitDescription , traitResearchSourceDescription , traitMaterialSourceDescription )
end
if traitResearchSourceDescription then
bodySection : AddLine ( zo_strformat ( SI_SMITHING_TRAIT_RESEARCH_SOURCE_DESCRIPTION , traitResearchSourceDescription ) , self : GetStyle ( "bodyDescription" ) )
bodySection : AddLine ( zo_strformat ( SI_SMITHING_TRAIT_MATERIAL_SOURCE_DESCRIPTION , traitMaterialSourceDescription ) , self : GetStyle ( "bodyDescription" ) )
end
end
end
local statDeltaLookup = ZO_GetStatDeltaLookupFromItemComparisonReturns ( CompareBagItemToCurrentlyEquipped ( bagId , slotId , comparisonSlot ) )
local statDelta = statDeltaLookup [ stat ] or 0
local valueToShow = currentValue + statDelta
if stat == STAT_SPELL_CRITICAL or stat == STAT_CRITICAL_STRIKE then
end
if statDelta ~= 0 then
local icon
if statDelta > 0 then
icon = "EsoUI/Art/Buttons/Gamepad/gp_upArrow.dds"
else
icon = "EsoUI/Art/Buttons/Gamepad/gp_downArrow.dds"
end
end
local statValuePair = statSection : AcquireStatValuePair ( self : GetStyle ( "itemComparisonStatValuePair" ) )
end
end
end
do
local FORMAT_EXTRA_OPTIONS =
{
showCap = true ,
}
local IS_PLURAL = false
local IS_UPPER = false
local locationSection
local locationCurrenciesSection
for currencyType = CURT_ITERATION_BEGIN , CURT_ITERATION_END do
if not locationCurrenciesSection then
--Title
locationSection : AddLine ( GetString ( "SI_CURRENCYLOCATION" , currencyLocation ) , self : GetStyle ( "currencyLocationTitle" ) )
--Currencies Section
locationCurrenciesSection = locationSection : AcquireSection ( self : GetStyle ( "currencyLocationCurrenciesSection" ) )
end
--Currency Count
local statValuePair = locationCurrenciesSection : AcquireStatValuePair ( self : GetStyle ( "currencyStatValuePair" ) )
statValuePair : SetStat ( zo_strformat ( SI_CURRENCY_NAME_FORMAT , GetCurrencyName ( currencyType , IS_PLURAL , IS_UPPER ) ) , self : GetStyle ( "currencyStatValuePairStat" ) )
FORMAT_EXTRA_OPTIONS . currencyLocation = currencyLocation
local valueString = ZO_Currency_FormatGamepad ( currencyType , amount , ZO_CURRENCY_FORMAT_WHITE_AMOUNT_ICON , FORMAT_EXTRA_OPTIONS )
statValuePair : SetValue ( zo_strformat ( SI_NUMBER_FORMAT , valueString ) , self : GetStyle ( "currencyStatValuePairValue" ) )
end
end
if locationSection then
end
end
end
end
local IS_PLURAL = false
local IS_UPPER = false
for currencyType = CURT_ITERATION_BEGIN , CURT_ITERATION_END do
local bankedStatValuePair = currencySection : AcquireStatValuePair ( self : GetStyle ( "currencyStatValuePair" ) )
local valueString = zo_strformat ( SI_GAMEPAD_TOOLTIP_ITEM_VALUE_FORMAT , ZO_CommaDelimitNumber ( GetCurrencyAmount ( currencyType , CURRENCY_LOCATION_BANK ) ) , ZO_Currency_GetPlatformFormattedCurrencyIcon ( currencyType ) )
local carriedStatValuePair = currencySection : AcquireStatValuePair ( self : GetStyle ( "currencyStatValuePair" ) )
local valueString = zo_strformat ( SI_GAMEPAD_TOOLTIP_ITEM_VALUE_FORMAT , ZO_CommaDelimitNumber ( GetCurrencyAmount ( currencyType , GetCurrencyPlayerStoredLocation ( currencyType ) ) ) , ZO_Currency_GetPlatformFormattedCurrencyIcon ( currencyType ) )
end
end
end
if sellerName then
sellerNameSection : AddLine ( zo_strformat ( SI_TRADING_HOUSE_SEARCH_RESULT_SELLER_FORMATTER , userFacingSellerName ) , self : GetStyle ( "bodyDescription" ) )
end
end
bodySection : AddLine ( requiredResearchString , self : GetStyle ( "bodyDescription" ) , self : GetStyle ( "failed" ) )
end
furnishingLimitTypeSection : AddLine ( GetString ( SI_TOOLTIP_FURNISHING_LIMIT_TYPE ) , self : GetStyle ( "furnishingLimitTypeTitle" ) )
furnishingLimitTypeSection : AddLine ( furnishingLimitName , self : GetStyle ( "furnishingLimitTypeDescription" ) )
end
end |