|
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 |
--Constantslocal MOUSE_ENTER = 1local MOUSE_EXIT = 2local DEFAULT_STYLE = 1local HINT_STYLE = 2local QUEST_TRACKER_TREE_HEADER = 1local QUEST_TRACKER_TREE_CONDITION = 2local QUEST_TRACKER_TREE_SUBCATEGORY_TITLE = 3local QUEST_TRACKER_TREE_SUBCATEGORY_CONDITION = 4--Stylelocal KEYBOARD_CONSTANTS ={ CONTAINER_ANCHOR_POINT = TOPLEFT, CONTAINER_ANCHOR_RELATIVE_POINT = BOTTOMLEFT, CONTAINER_OFFSET_X = 35, CONTAINER_OFFSET_Y = 5, QUEST_TIMER_ANCHOR_POINT = TOPLEFT, QUEST_TIMER_OFFSET_X = 10, QUEST_TIMER_OFFSET_Y = 0, FONT_HEADER = "ZoFontGameShadow", FONT_SUBCATEGORY = "ZoFontGameShadow", FONT_GENERAL = "ZoFontGameShadow", STEP_HORIZONTAL_ALIGNMENT = TEXT_ALIGN_LEFT, CONDITION_HORIZONTAL_ALIGNMENT = TEXT_ALIGN_LEFT, HEADER_INHERIT_ALPHA = true, TEXT_TYPE_HEADER = MODIFY_TEXT_TYPE_NONE, QUEST_LINE_BASE_WIDTH = 212, QUEST_LINE_HEADER_WIDTH = 222, QUEST_LINE_HEADER_ICON_WIDTH_AND_HEIGHT = 22, QUEST_TRACKER_TREE_INDENT = 10, QUEST_TRACKER_TREE_ANCHOR_POINT = TOPLEFT, QUEST_TRACKER_TREE_RELATIVE_POINT = BOTTOMLEFT, QUEST_TRACKER_TREE_LINE_SPACING = { [QUEST_TRACKER_TREE_HEADER] = 18, [QUEST_TRACKER_TREE_CONDITION] = 2, [QUEST_TRACKER_TREE_SUBCATEGORY_TITLE] = 2, [QUEST_TRACKER_TREE_SUBCATEGORY_CONDITION] = 2, }, QUEST_TRACKER_TREE_SUBCATEGORY_VERTICAL_ALIGNMENT = TEXT_ALIGN_TOP, ASSISTED_TEXTURE_ANCHOR_POINT = TOPRIGHT, ASSISTED_TEXTURE_RELATIVE_POINT = TOPLEFT, ASSISTED_TEXTURE_OFFSET_X = 0, ASSISTED_TEXTURE_OFFSET_Y = -7, HIDE_HEADER_TEXTURES = true,}local GAMEPAD_CONSTANTS ={ CONTAINER_ANCHOR_POINT = TOPRIGHT, CONTAINER_ANCHOR_RELATIVE_POINT = BOTTOMRIGHT, CONTAINER_OFFSET_X = -44, CONTAINER_OFFSET_Y = 15, QUEST_TIMER_ANCHOR_POINT = TOPRIGHT, QUEST_TIMER_OFFSET_X = 29, QUEST_TIMER_OFFSET_Y = 0, FONT_HEADER = "ZoFontGamepadBold27", FONT_SUBCATEGORY = "ZoFontGamepadBold22", FONT_GENERAL = "ZoFontGamepad34", STEP_HORIZONTAL_ALIGNMENT = TEXT_ALIGN_RIGHT, CONDITION_HORIZONTAL_ALIGNMENT = TEXT_ALIGN_RIGHT, HEADER_INHERIT_ALPHA = false, TEXT_TYPE_HEADER = MODIFY_TEXT_TYPE_UPPERCASE, QUEST_LINE_BASE_WIDTH = 350, QUEST_LINE_HEADER_ICON_WIDTH_AND_HEIGHT = 48, QUEST_HEADER_BASE_HEIGHT = 28, QUEST_TRACKER_TREE_INDENT = 0, QUEST_TRACKER_TREE_ANCHOR_POINT = TOPRIGHT, QUEST_TRACKER_TREE_RELATIVE_POINT = BOTTOMRIGHT, QUEST_TRACKER_TREE_SUBCATEGORY_VERTICAL_ALIGNMENT = TEXT_ALIGN_BOTTOM, QUEST_TRACKER_TREE_LINE_SPACING = { [QUEST_TRACKER_TREE_HEADER] = 0, [QUEST_TRACKER_TREE_CONDITION] = 16, [QUEST_TRACKER_TREE_SUBCATEGORY_TITLE] = 16, [QUEST_TRACKER_TREE_SUBCATEGORY_CONDITION] = 6, }, QUEST_TRACKER_EXTRA_STEP_OFFSET_Y = 6, ASSISTED_TEXTURE_ANCHOR_POINT = RIGHT, ASSISTED_TEXTURE_RELATIVE_POINT = LEFT, ASSISTED_TEXTURE_OFFSET_X = -5, ASSISTED_TEXTURE_OFFSET_Y = 5, HIDE_HEADER_TEXTURES = false, DISTANCE_BUTTON_TO_HEADER = 45,} if style == HINT_STYLE then elseif style == DEFAULT_STYLE then endendend control.icon:SetDimensions(constants.QUEST_LINE_HEADER_ICON_WIDTH_AND_HEIGHT, constants.QUEST_LINE_HEADER_ICON_WIDTH_AND_HEIGHT) --Text needs to be reset on the text type changing end -- control.instanceDisplayType is deprecated, included here for addon backwards compatibility end endendlocal UNCONSTRAINED_HEIGHT = 0 endend control.m_TreeNode:SetOffsetY(constants.QUEST_TRACKER_TREE_LINE_SPACING[QUEST_TRACKER_TREE_SUBCATEGORY_TITLE]) endend local targetRelativeTo = assistedHeader if assistedHeader.isUsingIcon then end assistedTexture:SetAnchor(constants.ASSISTED_TEXTURE_ANCHOR_POINT, targetRelativeTo, constants.ASSISTED_TEXTURE_RELATIVE_POINT, constants.ASSISTED_TEXTURE_OFFSET_X, constants.ASSISTED_TEXTURE_OFFSET_Y)end---- Tracked Data-- endendend if trackedData == nil then return false end return (self.trackType == trackedData.trackType and self.arg1 == trackedData.arg1 and self.arg2 == trackedData.arg2)end---- Tracker-- return trackerend end end end end end -- control.instanceDisplayType is deprecated, included here for addon backwards compatibility end self.stepDescriptionPool = ZO_ControlPool:New("ZO_QuestStepDescription", trackerControl, "QuestStepDescription") self.treeView = ZO_TreeControl:New(constants.QUEST_TRACKER_TREE_ANCHOR, constants.QUEST_TRACKER_TREE_INDENT) self.MAX_TRACKED = 1 -- never allow more than this many quests...this is only controlled by the UI, not the client if addOnName == "ZO_Ingame" then if settingType == SETTING_TYPE_UI then if settingId == UI_SETTING_SHOW_QUEST_TRACKER then end end end end trackerPanel:RegisterForEvent(EVENT_ZONE_STORY_QUEST_ACTIVITY_TRACKED, OnZoneStoryQuestActivityTracked) trackerPanel:RegisterForEvent(EVENT_QUEST_CONDITION_COUNTER_CHANGED, function(_, index) self:OnQuestConditionUpdated(index) end) trackerPanel:RegisterForEvent(EVENT_QUEST_CONDITION_OVERRIDE_TEXT_CHANGED, function(_, index) self:OnQuestConditionUpdated(index) end) trackerPanel:RegisterForEvent(EVENT_QUEST_ADVANCED, function(_, questIndex, questName, isPushed, isComplete, mainStepChanged) self:OnQuestAdvanced(questIndex, questName, isPushed, isComplete, mainStepChanged) end) trackerPanel:RegisterForEvent(EVENT_QUEST_ADDED, function(_, questIndex) self:OnQuestAdded(questIndex) end) trackerPanel:RegisterForEvent(EVENT_QUEST_REMOVED, function(_, completed, questIndex, questName, zoneIndex, poiIndex, questID) self:OnQuestRemoved(questIndex, completed, questID) end) trackerPanel:RegisterForEvent(EVENT_LEVEL_UPDATE, function(_, tag, level) self:OnLevelUpdated(tag) end) end end self.fragment:RegisterCallback("StateChange", function(oldState, newState) self:FireCallbacks("QuestTrackerFragmentStateChange", oldState, newState) end)endend self.trackerControl:RegisterForEvent(EVENT_GAMEPAD_PREFERRED_MODE_CHANGED, function() self:OnGamepadPreferredModeChanged() end)endend local allConstants = { KEYBOARD_CONSTANTS, GAMEPAD_CONSTANTS } constants.QUEST_TRACKER_TREE_ANCHOR = ZO_Anchor:New(constants.QUEST_TRACKER_TREE_ANCHOR_POINT, self.trackerControl, constants.QUEST_TRACKER_TREE_ANCHOR_POINT) constants.CONTAINER_ANCHOR = ZO_Anchor:New(constants.CONTAINER_ANCHOR_POINT, self.timerControl, constants.CONTAINER_ANCHOR_RELATIVE_POINT, constants.CONTAINER_OFFSET_X, constants.CONTAINER_OFFSET_Y) constants.QUEST_TIMER_ANCHOR = ZO_Anchor:New(constants.QUEST_TIMER_ANCHOR_POINT, self.trackerPanel, constants.QUEST_TIMER_ANCHOR_POINT, constants.QUEST_TIMER_OFFSET_X, constants.QUEST_TIMER_OFFSET_Y) endend -- Reanchor quest timer -- Reanchor the container -- Set the correct style for the controls end end end -- Anchor the face button if assistedData then local assistedHeader = self:GetHeaderForIndex(assistedData.trackType, assistedData.arg1, assistedData.arg2) end -- Update the quest tree anchorsendend --Received when we get new tracking data from the server. Even if we were initialized we need to re-init.end local previouslyAssistedQuestIndex previouslyAssistedQuestIndex = i break end end if previouslyAssistedQuestIndex == nil or not self:BeginTracking(TRACK_TYPE_QUEST, previouslyAssistedQuestIndex) then local IGNORE_SCENE_RESTRICTION = true end endendend FOCUSED_QUEST_TRACKER_FRAGMENT:SetHiddenForReason("NoTrackedQuests", numTrackedQuests == 0, DEFAULT_HUD_DURATION, DEFAULT_HUD_DURATION)endend --Even if we can't find a quest in the same quest journal category to, let's assist whatever other quests we might have in the journal instead local IGNORE_SCENE_RESTRICTION = true endend if wasZoneStoryAssisted then end if ignoreSceneRestriction or isShowingBase then --if we are showing one quest now, find the next one to show ordered by the order they appear in the quest journal local nextQuestIndex, wasShowingLastQuest = QUEST_JOURNAL_MANAGER:GetNextSortedQuestForQuestIndex(self.assistedData.arg1) if wasShowingLastQuest then -- Looped past all the quests. Check if we want to display a zone guide before displaying the first item. -- if the zone story was visible and we just closed it, don't reopen it. end return -- Don't advance the quest now, wait for the zone tracker to be hidden. end end if nextQuestIndex then return end end end --if we aren't showing any quest look for some quest to show for i = 1, MAX_JOURNAL_QUESTS do break end end end endend---- Header Management-- questHeader.m_TimerSlot = nil questHeader.m_TreeNode = treeNode questHeader.m_ObjectKey = questHeaderKey questHeader.m_ChildConditionControls = {} -- Stores interleaved ZO_QuestCondition/objectKey pairs in an array table (no nesting) -- so that the child conditions can be correctly released when -- no longer tracking this quest questHeader.m_StepDescriptionControls = {} return questHeader, treeNodeendfunction ZO_Tracker:InitializeQuestHeader(questName, questType, questHeader, isComplete, zoneDisplayType) -- add icon here questHeader.isUsingIcon = true else questHeader.isUsingIcon = false end --save the text and icon data off so it can be easily reset on the style changing questHeader.questType = questType -- questHeader.instanceDisplayType is deprecated, included here for addon backwards compatibility questHeader.instanceDisplayType = zoneDisplayType questHeader.displayType = zoneDisplayTypeendfunction ZO_Tracker:InitializeQuestCondition(questCondition, parentQuestHeader, questConditionKey, treeNode) questCondition.m_TreeNode = treeNode -- HACK? Unsure of why this is needed, but it prevents the condition from flickering between -- shown and hidden when the tracked quest's tree node is collapsed. The conditions are all -- shown properly when the tree node's expanded state is toggled.end stepDescription.m_TreeNode = stepDescriptionTreeNode stepDescriptionTreeNode:SetOffsetY(constants.QUEST_TRACKER_TREE_LINE_SPACING[QUEST_TRACKER_TREE_SUBCATEGORY_TITLE]) table.insert(questHeader.m_StepDescriptionControls, {control = stepDescription, key = stepDescriptionKey, treeNode = stepDescriptionTreeNode} ) endfunction ZO_Tracker:PopulateStepQuestConditions(questIndex, stepIndex, questHeader, treeNode, desiredVisibility, entryType) local _, visibility, stepType, stepOverrideText, conditionCount = GetJournalQuestStepInfo(questIndex, stepIndex) if((desiredVisibility ~= nil) and (desiredVisibility ~= visibility)) then return end local isOptionalStep = (stepIndex > 1) local style = DEFAULT_STYLE if visibility == QUEST_STEP_VISIBILITY_HINT then style = HINT_STYLE end -- Don't display endings of optional quest lines if(isOptionalStep) then if(stepType == QUEST_STEP_TYPE_END) then return else if(not questHeader.m_hasAddedSectionHeader) then questHeader.m_hasAddedSectionHeader = true if visibility == QUEST_STEP_VISIBILITY_HINT then elseif visibility == QUEST_STEP_VISIBILITY_OPTIONAL then InsertStepDescription(self, questHeader, treeNode, GetString(SI_QUEST_OPTIONAL_STEPS_DESCRIPTION), style) end end end end if(stepOverrideText ~= "") then -- Step override text condition stepOverride.entryType = entryType if(stepType ~= QUEST_STEP_TYPE_END) then -- A step type of OR is implied here...it's not legal to have an AND step with override text. -- Do a quick check to see if any of the conditions have been completed to determine the icon type. for conditionIndex = 1, conditionCount do local currentValue, maximumValue, isFailCondition, isComplete, isGroupCreditShared = GetJournalQuestConditionValues(questIndex, stepIndex, conditionIndex) -- We're going to ignore the individual conditions' isVisible field here, since we have override text for the whole step which we always want to show if(not isFailCondition and isComplete) then stepOverride.isGroupCreditShared = isGroupCreditShared break -- done, at least one non-fail condition was complete end end end if visibility == QUEST_STEP_VISIBILITY_HINT then else end --we don't hide complete override conditions. there is only one override line, so if it is complete, either: --1) the quest advances and it's gone anyway --2) it's an end step, so we need to show it until the quest is turned in stepOverride.m_TreeNode = conditionTreeNode else -- Process the conditions as usual if(stepType == QUEST_STEP_TYPE_OR) then local visibleConditionFound = false for conditionIndex = 1, conditionCount do if visibleConditionFound then -- We've already found one visible condition, insert the "Choose one" step description and quit break else visibleConditionFound = true end end end end for conditionIndex = 1, conditionCount do local conditionText, curCount, maxCount, isFailCondition, isComplete, isGroupCreditShared, isVisible = GetJournalQuestConditionInfo(questIndex, stepIndex, conditionIndex) questCondition.entryType = entryType questCondition.isGroupCreditShared = isGroupCreditShared if visibility == QUEST_STEP_VISIBILITY_HINT then elseif stepType == QUEST_STEP_TYPE_OR then else end questCondition.m_TreeNode = conditionTreeNode end end endendfunction ZO_Tracker:PopulateOptionalStepQuestConditionsForVisibility(questIndex, questHeader, treeNode, desiredVisibility, entryType) self:PopulateStepQuestConditions(questIndex, stepIndex, questHeader, treeNode, desiredVisibility, entryType) end questHeader.m_hasAddedSectionHeader = nilendfunction ZO_Tracker:PopulateQuestConditions(questIndex, questName, stepType, stepTrackerText, isComplete, tracked, questHeader, treeNode) self:PopulateStepQuestConditions(questIndex, QUEST_MAIN_STEP_INDEX, questHeader, treeNode, nil, QUEST_TRACKER_TREE_CONDITION) self:PopulateOptionalStepQuestConditionsForVisibility(questIndex, questHeader, treeNode, QUEST_STEP_VISIBILITY_OPTIONAL, QUEST_TRACKER_TREE_SUBCATEGORY_CONDITION) self:PopulateOptionalStepQuestConditionsForVisibility(questIndex, questHeader, treeNode, QUEST_STEP_VISIBILITY_HINT, QUEST_TRACKER_TREE_SUBCATEGORY_CONDITION)endfunction ZO_Tracker:RebuildConditions(questIndex, questHeader, questName, stepType, stepTrackerText, isComplete, tracked) if(questHeader == nil) then end if(questName == nil) then local _ end if(questHeader and questName) then if(questHeader.m_ChildConditionControls) then -- first thing...remove all conditions from the tree... -- then reset the condition table to an empty table questHeader.m_ChildConditionControls = {} end if(questHeader.m_StepDescriptionControls) then end questHeader.m_StepDescriptionControls = {} end -- then populate the conditions correctly self:PopulateQuestConditions(questIndex, questName, stepType, stepTrackerText, isComplete, tracked, questHeader, questHeader.m_TreeNode) end endend endend local childConditions = questHeader.m_ChildConditionControls local condition for i = 1, #childConditions, 2 do -- NOTE: The childConditions include the timer if the quest was timed. -- It should be the first condition if it was present. -- [i] = control, [i + 1] = controlKey condition = childConditions[i] end questHeader.m_ChildConditionControls = nil -- Reset any timer data...because timers are tracked like conditions, their tree nodes and pool objects -- have already been properly released, but the references to those objects on this quest header also need -- to be reset. questHeader.m_TimerSlot = nil questHeader.m_TimerKey = nilend----Events-- endend if self:GetNumTracked() == 0 or GetSetting_Bool(SETTING_TYPE_UI, UI_SETTING_AUTOMATIC_QUEST_TRACKING) then endend local DONT_UPDATE_VISIBILITY = false --Wait to see if we assist something to replace this before updating visibility endend if questHeader then end endend if(tag == "player") then endend---- Query-- end end return nilendendendend end return nilend---- Tracking--end if trackType == TRACK_TYPE_QUEST then end endend -- This is used to compute the Lua-assigned value for the tracker index. -- This logic needs to be run after quests are: -- 1. Added to the tracker -- 2. Removed from the tracker -- 3. Advanced because the player has done part of a quest -- 4. Abandoned -- 5. Completed return i end end return nilend if(trackedData.trackType == TRACK_TYPE_QUEST) then -- Found the quest, mark it complete. trackedData.isComplete = isComplete return end end endend return true end end return falseend local questName, _, _, stepType, stepTrackerText, isComplete, tracked, _, _, questType, zoneDisplayType = GetJournalQuestInfo(questIndex) -- This line prevents quests from being tracked multiple times but allows quests to be properly tracked -- when the UI is reloaded. --if this quest isnt on the c++ tracker or it isnt on the lua tracker then give up local questHeader, treeNode = self:CreateQuestHeader(data, questName, questType, isComplete, zoneDisplayType) self:PopulateQuestConditions(questIndex, questName, stepType, stepTrackerText, isComplete, tracked, questHeader, treeNode) return questHeaderend return false end --If we are already tracking this we are good to go return true end --We update visibility at the end of this. If we do it now we will trigger the fragment to start hiding local DONT_UPDATE_VISIBILITY = false self:StopTracking(previouslyTrackedData.trackType, previouslyTrackedData.arg1, previouslyTrackedData.arg2, DONT_UPDATE_VISIBILITY) end --setup specific data if trackType == TRACK_TYPE_QUEST then end --build visuals if trackType == TRACK_TYPE_QUEST then end end else end end return trueend end end break end end -- NOTE: This does not look at self.tracked, it looks at self.headerPool (which is a container of controls!) if removedHeader then end if updateVisibility == nil or updateVisibility == true then end return true end return falseend --iterate backwards because SetTracked will change the tracked array size end if(trackedData.trackType == TRACK_TYPE_QUEST) then end end end end endend local unassistingAssistedQuest = not assisted and self.assistedData and self.assistedData:EqualsTrackedData(data) if assistingDifferentQuest or unassistingAssistedQuest then --unassist the assisted quest local unassistedData self:SetTrackTypeAssisted(unassistedData.trackType, false, unassistedData.arg1, unassistedData.arg2) end --if we're assisting a new quest, assist that if assisted then end end endendenddo local width, height = 0, 0 -- Start at the second child control because the first is the Assisted Keybind Face Button if childHeight ~= 0 then height = height + childHeight end if child.extraWidth then childWidth = childWidth + child.extraWidth end end return width, height end local MAX_HEIGHT_NO_COLLISION = 300 return height > MAX_HEIGHT_NO_COLLISION endend---- XML handlers---- NOTE: This function takes a label because it is called from control script handlers... if(state == MOUSE_ENTER) then else endendendendendendend AddMenuItem(GetString(SI_QUEST_TRACKER_MENU_SHOW_IN_JOURNAL), function() ShowQuestInJournal(header) end) AddMenuItem(GetString(SI_QUEST_TRACKER_MENU_SHOW_ON_MAP), function() ZO_WorldMap_ShowQuestOnMap(header.m_Data:GetJournalIndex()) end) end end end end if(upInside) then end endendendendend FOCUSED_QUEST_TRACKER = ZO_Tracker:New(control, control:GetNamedChild("Container"):GetNamedChild("QuestContainer"))end |