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 |
local SHOW_BACK_TO_TOC_OPTION = true
local HIDE_BACK_TO_TOC_OPTION = false
local COST_OPTION_TO_PROMPT =
{
}
local COST_OPTION_TO_PROMPT_TITLE =
{
}
local CHATTER_OPTION_SHOWS_GOLD_COST =
{
[ CHATTER_TALK_CHOICE_MONEY ] = true ,
[ CHATTER_TALK_CHOICE_PAY_BOUNTY ] = true ,
[ CHATTER_TALK_CHOICE_BEGIN_SKILL_RESPEC ] = true ,
[ CHATTER_TALK_CHOICE_ATTRIBUTE_RESPEC ] = true ,
}
CHATTER_OPTION_ERROR =
{
[ CHATTER_TALK_CHOICE_MONEY ] = SI_ERROR_CANT_AFFORD_OPTION ,
[ CHATTER_TALK_CHOICE_INTIMIDATE_DISABLED ] = SI_ERROR_NEED_INTIMIDATE ,
[ CHATTER_TALK_CHOICE_PERSUADE_DISABLED ] = SI_ERROR_NEED_PERSUADE ,
[ CHATTER_GUILDKIOSK_IN_TRANSITION ] = SI_INTERACT_TRADER_BIDDING_CLOSED_DURING_BID_TRANSITIONING_PERIOD ,
[ CHATTER_TALK_CHOICE_PAY_BOUNTY ] = SI_ERROR_CANT_AFFORD_OPTION ,
[ CHATTER_TALK_CHOICE_CLEMENCY_DISABLED ] = SI_ERROR_NEED_CLEMENCY ,
[ CHATTER_TALK_CHOICE_CLEMENCY_COOLDOWN ] = SI_ERROR_CLEMENCY_ON_COOLDOWN ,
[ CHATTER_TALK_CHOICE_BEGIN_SKILL_RESPEC ] = SI_ERROR_CANT_AFFORD_OPTION ,
[ CHATTER_TALK_CHOICE_ATTRIBUTE_RESPEC ] = SI_ERROR_CANT_AFFORD_OPTION ,
}
--Event Handlers
----------------
ZO_Alert ( UI_ALERT_CATEGORY_ERROR , SOUNDS . NEGATIVE_CLICK , GetString ( SI_INVENTORY_ERROR_INVENTORY_FULL ) )
end
ZO_Alert ( UI_ALERT_CATEGORY_ERROR , SOUNDS . NEGATIVE_CLICK , GetString ( SI_INVENTORY_ERROR_INVENTORY_FULL ) )
end
end
ZO_Dialogs_ShowPlatformDialog ( "CONFIRM_INTERACTION" , nil , { mainTextParams = { bodyText } , titleParams = { titleText } , buttonTextOverrides = { acceptText , cancelText } } )
end
end
-- This will wrap the callback so that it gets called with the control
return function ( ... )
if ( obj == object ) then
end
end
end
end
if ( confirmComplete == "" ) then confirmComplete = GetString ( SI_DEFAULT_QUEST_COMPLETE_CONFIRM_TEXT ) end
if ( declineComplete == "" ) then declineComplete = GetString ( SI_DEFAULT_QUEST_COMPLETE_DECLINE_TEXT ) end
local confirmError , currenciesWithMaxWarning , amountsAcquiredWithMaxWarning = self : ShowQuestRewards ( journalQuestIndex )
if confirmError then
end
if confirmError then
ZO_Dialogs_ShowPlatformDialog ( "CONFIRM_COMPLETE_QUEST_MAX_WARNINGS" , { journalQuestIndex = journalQuestIndex , currenciesWithMaxWarning = currenciesWithMaxWarning , amountsAcquiredWithMaxWarning = amountsAcquiredWithMaxWarning } )
else
end
end
end
-- Catching a rogue event coming down that causes a UI error when a bad option count is passed down. Root cause still unknown, this will just suppress the error.
-- ESO-692130
if internalassert ( chatterOptionCount <= MAX_CHATTER_OPTIONS , string . format ( "Tried to begin a chatter from source type %d with %d chatter options, which is invalid. Please notify a UI engineer." , debugSource , chatterOptionCount ) ) then
end
end
end
-- hmm, this seems wrong; should it happen as part of closing interact?
-- why would a dead party member not be able to accept a shared quest?
end
end
end
end
{
-- Handle the layout of the interaction window proportional to the available space
}
end
end
local CONVERSATION_INTERACTION =
{
interactTypes = { INTERACTION_CONVERSATION , INTERACTION_QUEST } ,
}
end
end
local activeAssistantId = GetActiveCollectibleByType ( COLLECTIBLE_CATEGORY_TYPE_ASSISTANT , GAMEPLAY_ACTOR_CATEGORY_PLAYER )
if activeAssistantId ~= 0 then
end
end
end
end
do
ZO_CurrencyControl_SetSimpleCurrency ( control , CURT_MONEY , GetCurrencyAmount ( CURT_MONEY , CURRENCY_LOCATION_CHARACTER ) , ZO_GAMEPAD_CURRENCY_OPTIONS_LONG_FORMAT )
return true
end
--if it's not enabled, report why it cant be used and return
local errorStringId = CHATTER_OPTION_ERROR [ label . optionType ]
if ( errorStringId ) then
end
return
end
if ( oiType == "number" ) then
--popup a dialog if it's an option with a cost and the cost is greater than free
if ( COST_OPTION_TO_PROMPT [ label . optionType ] and label . gold and label . gold > 0 ) then
"PAY_FOR_CONVERSATION" ,
{
data1 = {
} ,
} ,
{
titleParams = { COST_OPTION_TO_PROMPT_TITLE [ label . optionType ] } ,
mainTextParams = { COST_OPTION_TO_PROMPT [ label . optionType ] , ZO_Currency_FormatPlatform ( CURT_MONEY , label . gold , ZO_CURRENCY_FORMAT_WHITE_AMOUNT_ICON ) }
}
)
--otherwise just do it
else
end
elseif ( oiType == "function" ) then
end
else
end
end
end
CHATTER_GENERIC_ACCEPT = 42
CHATTER_COMPLETE_QUEST = 43
end
elseif clemencyTimeRemaningSeconds > 0 then
local formattedString = zo_strformat ( SI_INTERACT_OPTION_USE_CLEMENCY_COOLDOWN , control . optionText , ZO_FormatTimeLargestTwo ( clemencyTimeRemaningSeconds , TIME_FORMAT_STYLE_DESCRIPTIVE_MINIMAL ) )
end
end
elseif timeRemaining > 0 then
local formattedString = zo_strformat ( SI_INTERACT_OPTION_USE_SHADOWY_CONNECTIONS_COOLDOWN , control . optionText , ZO_FormatTimeLargestTwo ( timeRemaining , TIME_FORMAT_STYLE_DESCRIPTIVE_MINIMAL ) )
end
end
function ZO_SharedInteraction : GetChatterOptionData ( optionIndex , optionText , optionType , optionalArg , isImportant , chosenBefore , teleportNPCId , waypointIdTable )
optionType = optionType or CHATTER_START_TALK
local chatterData =
{
optionType = optionType ,
optionText = optionText ,
isImportant = isImportant ,
chosenBefore = chosenBefore ,
teleportNPCId = teleportNPCId ,
waypointIdTable = waypointIdTable ,
gold = nil ,
iconFiles = { } ,
isChatterOption = true ,
optionEnabled = false ,
optionUsable = false ,
recolorIfUnusable = false ,
}
if optionText and optionType then
chatterData . optionsEnabled = true
chatterData . optionUsable = true
chatterData . recolorIfUnusable = true
end
if CHATTER_OPTION_SHOWS_GOLD_COST [ optionType ] then
--optional arg is the cost in gold
chatterData . gold = optionalArg
if optionalArg > 0 then
chatterData . optionUsable = false
end
--Determine rules for suppressing the cost suffix
local suppressCostSuffix = ( optionType == CHATTER_TALK_CHOICE_PAY_BOUNTY )
if not suppressCostSuffix then
local currencyText
if chatterData . optionUsable then
currencyText = ZO_Currency_FormatPlatform ( CURT_MONEY , chatterData . gold , ZO_CURRENCY_FORMAT_WHITE_AMOUNT_ICON )
else
currencyText = ZO_Currency_FormatPlatform ( CURT_MONEY , chatterData . gold , ZO_CURRENCY_FORMAT_ERROR_AMOUNT_ICON )
end
end
end
elseif optionType == CHATTER_TALK_CHOICE_INTIMIDATE_DISABLED
or optionType == CHATTER_TALK_CHOICE_PERSUADE_DISABLED
or optionType == CHATTER_TALK_CHOICE_CLEMENCY_DISABLED
or optionType == CHATTER_GUILDKIOSK_IN_TRANSITION then
chatterData . optionUsable = false
chatterData . recolorIfUnusable = false
elseif optionType == CHATTER_TALK_CHOICE_CLEMENCY_COOLDOWN then
if clemencyTimeRemaningSeconds <= 0 then
chatterData . optionUsable = true
else
end
chatterData . optionUsable = false
end
elseif optionType == CHATTER_TALK_CHOICE_SHADOWY_CONNECTIONS_UNAVAILABLE then
if timeRemaining <= 0 then
-- We're not on cooldown, but the option is otherwise unusable (most likely, the player hasn't unlocked this passive)
chatterData . optionUsable = false
else
end
chatterData . optionUsable = false
end
elseif ( optionType == CHATTER_START_TALK or optionType == CHATTER_TALK_CHOICE ) and chatterData . teleportNPCId ~= 0 and chatterData . waypointIdTable and # chatterData . waypointIdTable > 0 then
-- TODO: Handle zone guide quest tracked but not in journal
-- Consider breadcrumb pathing for group members
for groupCharId , groupMember in pairs ( WORLD_MAP_QUEST_BREADCRUMBS : GetGroupMemberBreadcrumbingData ( ) ) do
if groupMember . teleportNPCId == chatterData . teleportNPCId then
if groupMember . waypointId == waypointId then
if groupMember . isGroupLeader then
if # chatterData . iconFiles == 0 then
else
chatterData . iconFiles [ 1 ] = "EsoUI/Art/Compass/groupLeader_door.dds"
end
break
else
if # chatterData . iconFiles == 0 then
end
end
end
end
end
end
local previousIconCount = # chatterData . iconFiles
-- Consider breadcrumb pathing in journal quests
-- Check against nil since not every quest is pathable
if stepsTable then
if condition . teleportNPCId == chatterData . teleportNPCId and ZO_IsElementInNumericallyIndexedTable ( chatterData . waypointIdTable , condition . waypointId ) then
if # chatterData . iconFiles == previousIconCount then
else
chatterData . iconFiles [ previousIconCount + 1 ] = "EsoUI/Art/Compass/zoneStoryQuest_icon_door_assisted.dds"
end
break
elseif # chatterData . iconFiles == previousIconCount then
end
else
if # chatterData . iconFiles == previousIconCount then
else
chatterData . iconFiles [ previousIconCount + 1 ] = "EsoUI/Art/Compass/quest_icon_door_assisted.dds"
end
break
elseif # chatterData . iconFiles == previousIconCount then
end
end
end
end
end
end
end
end
end
return chatterData
end
local importantOptions = { }
for i = 1 , optionCount do
local optionString , optionType , optionalArg , isImportant , chosenBefore , teleportNPCId = GetChatterOption ( i )
local controlID = i
self : PopulateChatterOption ( controlID , i , optionString , optionType , optionalArg , isImportant , chosenBefore , importantOptions , teleportNPCId , waypointIdTable )
end
if ( backToTOCOption == SHOW_BACK_TO_TOC_OPTION and backToTOC ~= "" ) then
optionCount = optionCount + 1
end
optionCount = optionCount + 1
self : PopulateChatterOption ( optionCount , function ( ) self : CloseChatter ( ) end , farewell , CHATTER_GOODBYE , nil , isImportant , nil , importantOptions )
local collectibleData = ZO_COLLECTIBLE_DATA_MANAGER : GetCollectibleDataById ( GetActiveCollectibleByType ( COLLECTIBLE_CATEGORY_TYPE_ASSISTANT , GAMEPLAY_ACTOR_CATEGORY_PLAYER ) )
optionCount = optionCount + 1
self : PopulateChatterOption ( optionCount , function ( ) self : CloseChatterAndDismissAssistant ( ) end , farewell , CHATTER_GOODBYE , nil , isImportant , nil , importantOptions )
end
return optionCount , importantOptions
end
--Reward Creator
local USE_LOWERCASE_NUMBER_SUFFIXES = false
if meetsUsageRequirement then
else
end
if stackSize > 1 then
local stackSizeString = ZO_AbbreviateAndLocalizeNumber ( stackSize , NUMBER_ABBREVIATION_PRECISION_TENTHS , USE_LOWERCASE_NUMBER_SUFFIXES )
else
end
end
end
if numPartialSkillPoints >= NUM_PARTIAL_SKILL_POINTS_FOR_FULL then
local remainingPartialSkillPoints = numPartialSkillPoints % NUM_PARTIAL_SKILL_POINTS_FOR_FULL
if remainingPartialSkillPoints == 0 then
end
return zo_strformat ( SI_QUEST_REWARD_SKILL_POINTS_MIXED , fullSkillPoints , remainingPartialSkillPoints )
end
end
nameControl : SetColor ( GetInterfaceColor ( INTERFACE_COLOR_TYPE_TEXT_COLORS , INTERFACE_TEXT_COLOR_SELECTED ) )
end
nameControl : SetColor ( GetInterfaceColor ( INTERFACE_COLOR_TYPE_TEXT_COLORS , INTERFACE_TEXT_COLOR_SELECTED ) )
end
end
nameControl : SetColor ( GetInterfaceColor ( INTERFACE_COLOR_TYPE_TEXT_COLORS , INTERFACE_TEXT_COLOR_SELECTED ) )
end
local REWARD_CREATORS =
{
[ REWARD_TYPE_AUTO_ITEM ] =
--Collectibles should display as the default text color, white.
if itemType == REWARD_ITEM_TYPE_COLLECTIBLE then
else
end
end ,
[ REWARD_TYPE_INSPIRATION ] =
local MEETS_USAGE_REQUIREMENTS = true
end ,
[ REWARD_TYPE_ALLIANCE_POINTS ] =
end ,
[ REWARD_TYPE_TELVAR_STONES ] =
end ,
[ REWARD_TYPE_EVENT_TICKETS ] =
end ,
[ REWARD_TYPE_MONEY ] =
end ,
[ REWARD_TYPE_PARTIAL_SKILL_POINTS ] =
end ,
[ REWARD_TYPE_WRIT_VOUCHERS ] =
end ,
[ REWARD_TYPE_SKILL_LINE ] =
end ,
[ REWARD_TYPE_CHAOTIC_CREATIA ] =
end ,
[ REWARD_TYPE_STYLE_STONES ] =
end ,
[ REWARD_TYPE_UNDAUNTED_KEYS ] =
end ,
[ REWARD_TYPE_TRIBUTE_CLUB_EXPERIENCE ] =
end ,
}
local currencyRewards =
{
[ REWARD_TYPE_MONEY ] = true ,
[ REWARD_TYPE_ALLIANCE_POINTS ] = true ,
[ REWARD_TYPE_TELVAR_STONES ] = true ,
[ REWARD_TYPE_WRIT_VOUCHERS ] = true ,
[ REWARD_TYPE_CHAOTIC_CREATIA ] = true ,
[ REWARD_TYPE_STYLE_STONES ] = true ,
[ REWARD_TYPE_EVENT_TICKETS ] = true ,
[ REWARD_TYPE_UNDAUNTED_KEYS ] = true ,
}
return currencyRewards [ rewardType ]
end
local currencyRewardToCurrencyType =
{
[ REWARD_TYPE_MONEY ] = CURT_MONEY ,
[ REWARD_TYPE_ALLIANCE_POINTS ] = CURT_ALLIANCE_POINTS ,
[ REWARD_TYPE_TELVAR_STONES ] = CURT_TELVAR_STONES ,
[ REWARD_TYPE_WRIT_VOUCHERS ] = CURT_WRIT_VOUCHERS ,
[ REWARD_TYPE_CHAOTIC_CREATIA ] = CURT_CHAOTIC_CREATIA ,
[ REWARD_TYPE_STYLE_STONES ] = CURT_STYLE_STONES ,
[ REWARD_TYPE_EVENT_TICKETS ] = CURT_EVENT_TICKETS ,
[ REWARD_TYPE_UNDAUNTED_KEYS ] = CURT_UNDAUNTED_KEYS ,
}
return currencyRewardToCurrencyType [ rewardType ]
end
local currencyType = currencyRewardToCurrencyType [ rewardType ]
if not currencyType then
return nil
end
return GetCurrencyAmount ( currencyType , playerStoredLocation ) + rewardAmount > GetMaxPossibleCurrency ( currencyType , playerStoredLocation )
end
end
end
return REWARD_CREATORS [ rewardType ]
end
for i = 1 , numRewards do
local rewardType , name , amount , icon , meetsUsageRequirement , itemDisplayQuality , itemType = GetJournalQuestRewardInfo ( journalQuestIndex , i )
--We don't want to show a collectible if we already own it
local isCollectible = rewardType == REWARD_TYPE_AUTO_ITEM and itemType == REWARD_ITEM_TYPE_COLLECTIBLE
local hideOwnedCollectible = isCollectible and not meetsUsageRequirement
if not hideOwnedCollectible then
local rewardData =
{
rewardType = rewardType ,
amount = amount ,
icon = icon ,
meetsUsageRequirement = meetsUsageRequirement ,
displayQuality = itemDisplayQuality ,
--This value is deprecated. Keeping it here to maintain backwards compatibility for add-ons
quality = itemDisplayQuality ,
index = i ,
itemType = itemType
}
if rewardType == REWARD_TYPE_SKILL_LINE then
rewardData . icon = announce
elseif rewardType == REWARD_TYPE_INSPIRATION then
if isGamepad then
rewardData . icon = "EsoUI/Art/currency/gamepad/gp_inspiration.dds"
else
rewardData . icon = "EsoUI/Art/currency/currency_inspiration.dds"
end
elseif rewardType == REWARD_TYPE_TRIBUTE_CLUB_EXPERIENCE then
rewardData . icon = "EsoUI/Art/Tribute/tributeRankPoints.dds"
end
end
end
end
-- Functions needing to be overridden
-------------------------------------
-- Should be overridden
end
-- Should be overridden
end
-- Should be overridden
end
-- Should be overridden
end
-- Should be overridden
end
-- Should be overridden
end
-- Should be overridden
end
-- Should be overridden
end
-- Should be overridden
end
--Should be overridden
end
--Should be overridden
end |