Skip to content

Commit

Permalink
Add faction group quest type tag
Browse files Browse the repository at this point in the history
  • Loading branch information
erglo committed Jan 20, 2024
1 parent df7eae9 commit 59585e7
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

### Added

* Quest type tags: added faction group tags.
* Campaign: added optional `campaign description`. Some campaigns provide further information about themselves.
* Questlines: added highlight and counter for displaying the number of active (ongoing) quests.
* New `tooltip handler` [LibQTip](https://www.curseforge.com/wow/addons/libqtip-1-0) for better organizing and displaying the tooltip content.

### Changed

* Updated TOC file version to `WoW 10.2.5`.
* Quest tags: combined account-wide quest types with the player's faction group, when they are limited to that, as can be seen in the game's quest log tooltip.
* Quest type tags: combined account-wide quest types with the player's faction group, when they are limited to that, as can be seen in the game's quest log tooltip.
* Quest type tags: quest types shown by Blizzard in the active quest tooltip will be ignored since they're already shown, eg. raids or dungeons.
* Quest type tags: active (ongoing) quests now show a completed icon suitable for their own type.
* Quest type tags: active (ongoing) quests now show a completion icon suitable for their own type.
* Tooltip: content categories can now be separated into `multiple tooltips`.
* Tooltip: `tooltips are now scrollable` and clamped to the screen.
* Tooltip: the plugin name in active quests is now only showing when at least the "Ready for turn-in" message is activated. Without any tooltip content there's no need for the plugin name to be shown. In short: w/o content from this plugin, the tooltip mimics Blizzard's default look and feel.
Expand Down
17 changes: 14 additions & 3 deletions Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1051,10 +1051,11 @@ function LocalQuestUtils:AddQuestTagLinesToTooltip(tooltip, questInfo)
if (tagInfo and not ShouldIgnoreQuestTypeTag(questInfo)) then
local tagID = tagInfo.tagID
local tagName = tagInfo.tagName
-- Account-wide quest type are only shown in the questlog.
-- Account-wide quest type are usually only shown in the questlog
if (tagInfo.tagID == Enum.QuestTag.Account and questInfo.questFactionGroup ~= QuestFactionGroupID.Neutral) then
local factionString = questInfo.questFactionGroup == LE_QUEST_FACTION_HORDE and FACTION_HORDE or FACTION_ALLIANCE
tagID = questInfo.questFactionGroup == LE_QUEST_FACTION_HORDE and "HORDE" or "ALLIANCE"
tagName = tagInfo.tagName..L.TEXT_DELIMITER..PARENS_TEMPLATE:format( select(2, UnitFactionGroup("player")) )
tagName = tagInfo.tagName..L.TEXT_DELIMITER..PARENS_TEMPLATE:format(factionString)
end
LibQTipUtil:AddQuestTagTooltipLine(tooltip, tagName, tagID, tagInfo.worldQuestType, LineColor)
end
Expand Down Expand Up @@ -1098,6 +1099,12 @@ function LocalQuestUtils:AddQuestTagLinesToTooltip(tooltip, questInfo)
if questInfo.isStory then
LibQTipUtil:AddQuestTagTooltipLine(tooltip, STORY_PROGRESS, "STORY", nil, LineColor)
end
if (not tagInfo or tagInfo.tagID ~= Enum.QuestTag.Account) and (questInfo.questFactionGroup ~= QuestFactionGroupID.Neutral) then
-- Show faction group icon only when no tagInfo provided or not an account quest
local tagName = questInfo.questFactionGroup == LE_QUEST_FACTION_HORDE and ITEM_REQ_HORDE or ITEM_REQ_ALLIANCE
local tagID = questInfo.questFactionGroup == LE_QUEST_FACTION_HORDE and "HORDE" or "ALLIANCE"
LibQTipUtil:AddQuestTagTooltipLine(tooltip, tagName, tagID, nil, LineColor)
end
end

-- Retrieve different quest details.
Expand Down Expand Up @@ -1190,7 +1197,11 @@ function LocalQuestUtils:GetQuestInfo(questID, targetType, pinMapID)

questInfo.hasZoneStoryInfo = ZoneStoryUtils:HasZoneStoryInfo(pinMapID)
questInfo.hasQuestLineInfo = LocalQuestLineUtils:HasQuestLineInfo(questID, pinMapID)
questInfo.hasHiddenQuestType = questInfo.isTrivial or questInfo.isCampaign or questInfo.isStory
questInfo.hasHiddenQuestType = tContains({questInfo.isTrivial, questInfo.isCampaign, questInfo.isStory,
questInfo.isDaily, questInfo.isWeekly, questInfo.isLegendary,
questInfo.isBreadcrumbQuest, questInfo.isSequenced, questInfo.isImportant,
questInfo.questFactionGroup ~= QuestFactionGroupID.Neutral,
questInfo.isAccountQuest}, true)

return questInfo
end
Expand Down
3 changes: 2 additions & 1 deletion TODO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ Add right-click menu to continent pin @clickHandler +map +pin
Track minimap pins @hooks +minimap +pin
Show achievement completion date @tooltip +map +achievement +zoneStory
Don't show ZoneStoryTooltip in completed zones @tooltip +map +zoneStory
Show active QLs in world map button @worldMapButton +questLines +map +button
Show active QLs in world map button @worldMapButton +questLines +map +button
Combine trivial quest type tags with tagInfo tags. @tooltip +questType +questTags

0 comments on commit 59585e7

Please sign in to comment.