frozn / TipTac

WoW AddOn TipTac Reborn
GNU General Public License v3.0
107 stars 20 forks source link

Fixed difficulty color for ClassicEra #269

Closed ZuggieTM closed 6 months ago

ZuggieTM commented 6 months ago

GetQuestDifficultyColor takes a quest ID as an argument in Classic Era, rather than a level to compare with the player's current level

frozn commented 6 months ago

In every place where GetQuestDifficultyColor() is used in blizzards classic code, the level is passed as a parameter. Also described here: https://wowpedia.fandom.com/wiki/API_GetQuestDifficultyColor

From where do you have the information about the quest id as parameter? 🤔

ZuggieTM commented 6 months ago

Nevermind. I noticed that level wasn't parsed into the function so it was nil. That is what's causing the issue.

frozn commented 6 months ago

To determin the quest difficulty in ttItemRef.lua I changed it to use function LibFroznFunctions:GetDifficultyColorForQuest(questID, questLevel) for this. Missing quest ids are considered there.

https://github.com/frozn/TipTac/blob/d6d54ff212699e9cc6d26100f5ffd4583d45b73d/TipTacItemRef/ttItemRef.lua#L2813-L2819

Will be included in the next release. Thanks for this hint! 👍