Skip to content

Instantly share code, notes, and snippets.

@mahmoudimus
Last active May 10, 2023 13:22
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mahmoudimus/24c0d7c57abf8118a67b3bf89f1308ba to your computer and use it in GitHub Desktop.
Save mahmoudimus/24c0d7c57abf8118a67b3bf89f1308ba to your computer and use it in GitHub Desktop.
Patch to upgrade Kaliel's Tracker to 10.1

How to apply this patch

On Windows

  1. Find out where your WoW directory is installed (i.e. C:\Blizzard\World of Warcraft\).
  2. Install Git for Windows.
  3. Download [https://gist.githubusercontent.com/mahmoudimus/24c0d7c57abf8118a67b3bf89f1308ba/raw/48cf40254f65d9f9febef4f2f3264b3c438bab27/Utils.lua.patch] to your _retail_/Interface/AddOns/!KalielsTracker folder.
  4. Run git apply --whitespace=fix Utils.lua.patch. You can read more about this here: stackoverflow.com/a/40919520/13351

On Mac

  1. Find out where your WoW directory is installed (i.e. /Applications/World of Warcraft/).
  2. Install Git for Mac.
  3. Download [https://gist.githubusercontent.com/mahmoudimus/24c0d7c57abf8118a67b3bf89f1308ba/raw/48cf40254f65d9f9febef4f2f3264b3c438bab27/Utils.lua.patch] to your _retail_/Interface/AddOns/!KalielsTracker folder.
  4. Run git apply --whitespace=fix Utils.lua.patch via Terminal.app

MacOS Fast For Developers

cd /Applications/World of Warcraft/_retail_/Interface/AddOns/!KalielsTracker
curl -O -L https://gist.githubusercontent.com/mahmoudimus/24c0d7c57abf8118a67b3bf89f1308ba/raw/48cf40254f65d9f9febef4f2f3264b3c438bab27/Utils.lua.patch
git apply --whitespace=fix Utils.lua.patch

Done.

--- Kaliel's Tracker
--- Copyright (c) 2012-2023, Marouan Sabbagh <mar.sabbagh@gmail.com>
--- All Rights Reserved.
---
--- This file is part of addon Kaliel's Tracker.
local addonName, KT = ...
KT.title = GetAddOnMetadata(addonName, "Title")
-- Lua API
local floor = math.floor
local fmod = math.fmod
local format = string.format
local next = next
local strfind = string.find
local strlen = string.len
local strsub = string.sub
local tonumber = tonumber
local mediaPath = "Interface\\AddOns\\"..addonName.."\\Media\\"
-- Version
function KT.IsHigherVersion(newVersion, oldVersion)
local result = false
if newVersion == "@project-version@" then
result = true
else
local _, _, nV1, nV2, nV3, nBuild = strfind(newVersion, "(%d+)%.?(%d*)%.?(%d*)(.*)")
local _, _, oV1, oV2, oV3, oBuild = strfind(oldVersion, "(%d+)%.?(%d*)%.?(%d*)(.*)")
local _, _, nBuildType, nBuildNumber = strfind(nBuild or "", "%-(%w+)%.(%d+)")
local _, _, oBuildType, oBuildNumber = strfind(oBuild or "", "%-(%w+)%.(%d+)")
nV1, nV2, nV3, nBuildNumber = tonumber(nV1) or 0, tonumber(nV2) or 0, tonumber(nV3) or 0, tonumber(nBuildNumber)
oV1, oV2, oV3, oBuildNumber = tonumber(oV1) or 0, tonumber(oV2) or 0, tonumber(oV3) or 0, tonumber(oBuildNumber)
if nV1 == oV1 then
if nV2 == oV2 then
if nV3 == oV3 then
-- no support for alpha vs beta builds
if nBuildType == nil then
result = true
elseif nBuildType == oBuildType then
if nBuildNumber and nBuildNumber >= oBuildNumber then
result = true
end
end
elseif nV3 > oV3 then
result = true
end
elseif nV2 > oV2 then
result = true
end
elseif nV1 > oV1 then
result = true
end
end
return result
end
-- Table
function KT.IsTableEmpty(table)
return (next(table) == nil)
end
-- Recipes
function KT.GetNumTrackedRecipes()
return #C_TradeSkillUI.GetRecipesTracked(true) + #C_TradeSkillUI.GetRecipesTracked(false)
end
-- Activities
function KT.GetNumTrackedActivities()
return #C_PerksActivities.GetTrackedPerksActivities().trackedIDs
end
-- Map
function KT.GetMapContinents()
return C_Map.GetMapChildrenInfo(946, Enum.UIMapType.Continent, true)
end
function KT.GetCurrentMapAreaID()
return C_Map.GetBestMapForUnit("player")
end
function KT.GetMapContinent(mapID)
if mapID then
if mapID == 1355 then -- Nazjatar
return C_Map.GetMapInfo(mapID) or {}
else
return MapUtil.GetMapParentInfo(mapID, Enum.UIMapType.Continent, true) or {}
end
end
return {}
end
function KT.GetCurrentMapContinent()
local mapID = C_Map.GetBestMapForUnit("player")
return KT.GetMapContinent(mapID)
end
function KT.GetMapNameByID(mapID)
if mapID then
local mapInfo = C_Map.GetMapInfo(mapID) or {}
return mapInfo.name
end
return nil
end
function KT.SetMapToCurrentZone()
local mapID = C_Map.GetBestMapForUnit("player")
WorldMapFrame:SetMapID(mapID)
end
function KT.GetMapID()
return WorldMapFrame:GetMapID()
end
function KT.SetMapID(mapID)
WorldMapFrame:SetMapID(mapID)
end
function KT.IsInBetween() -- Shadowlands
return (UnitOnTaxi("player") and KT.GetCurrentMapAreaID() == 1550)
end
-- RGB to Hex
local function DecToHex(num)
local b, k, hex, d = 16, "0123456789abcdef", "", 0
while num > 0 do
d = fmod(num, b) + 1
hex = strsub(k, d, d)..hex
num = floor(num/b)
end
hex = (hex == "") and "0" or hex
return hex
end
function KT.RgbToHex(color)
local r, g, b = DecToHex(color.r*255), DecToHex(color.g*255), DecToHex(color.b*255)
r = (strlen(r) < 2) and "0"..r or r
g = (strlen(g) < 2) and "0"..g or g
b = (strlen(b) < 2) and "0"..b or b
return r..g..b
end
-- GameTooltip
local colorNotUsable = { r = 1, g = 0, b = 0 }
function KT.GameTooltip_AddQuestRewardsToTooltip(tooltip, questID, isBonus)
local bckSelectedQuestID = C_QuestLog.GetSelectedQuest() -- backup selected Quest
C_QuestLog.SetSelectedQuest(questID) -- for num Choices
local xp = GetQuestLogRewardXP(questID)
local money = GetQuestLogRewardMoney(questID)
local artifactXP = GetQuestLogRewardArtifactXP(questID)
local numQuestCurrencies = GetNumQuestLogRewardCurrencies(questID)
local numQuestRewards = GetNumQuestLogRewards(questID)
local spellRewards = C_QuestInfoSystem.GetQuestRewardSpells(questID) or {}
local numQuestSpellRewards = #spellRewards
local numQuestChoices = GetNumQuestLogChoices(questID, true)
local honor = GetQuestLogRewardHonor(questID)
local majorFactionRepRewards = C_QuestLog.GetQuestLogMajorFactionReputationRewards(questID)
local rewardsTitle = REWARDS..":"
if not isBonus then
if numQuestChoices == 1 then
tooltip:AddLine(" ")
tooltip:AddLine(rewardsTitle)
elseif numQuestChoices > 1 then
tooltip:AddLine(" ")
tooltip:AddLine(CHOOSE_ONE_REWARD..":")
rewardsTitle = OTHER.." "..rewardsTitle
end
-- choices
for i = 1, numQuestChoices do
local lootType = GetQuestLogChoiceInfoLootType(i)
local text, color
if lootType == 0 then
-- item
local name, texture, numItems, quality, isUsable = GetQuestLogChoiceInfo(i)
if numItems > 1 then
text = format(BONUS_OBJECTIVE_REWARD_WITH_COUNT_FORMAT, texture, HIGHLIGHT_FONT_COLOR:WrapTextInColorCode(numItems), name)
elseif name and texture then
text = format(BONUS_OBJECTIVE_REWARD_FORMAT, texture, name)
end
color = isUsable and ITEM_QUALITY_COLORS[quality] or colorNotUsable
elseif lootType == 1 then
-- currency
local name, texture, amount, currencyID, quality = GetQuestLogRewardCurrencyInfo(i, questID, true)
amount = FormatLargeNumber(amount)
text = format(BONUS_OBJECTIVE_REWARD_WITH_COUNT_FORMAT, texture, HIGHLIGHT_FONT_COLOR:WrapTextInColorCode(amount), name)
color = ITEM_QUALITY_COLORS[quality]
end
if text and color then
tooltip:AddLine(text, color.r, color.g, color.b)
end
end
end
if xp > 0 or money > 0 or artifactXP > 0 or numQuestCurrencies > 0 or numQuestRewards > 0 or numQuestSpellRewards > 0 or honor > 0 or majorFactionRepRewards then
local isQuestWorldQuest = QuestUtils_IsQuestWorldQuest(questID)
local isWarModeDesired = C_PvP.IsWarModeDesired()
local questHasWarModeBonus = C_QuestLog.QuestCanHaveWarModeBonus(questID)
if numQuestChoices ~= 1 then
tooltip:AddLine(" ")
tooltip:AddLine(rewardsTitle)
end
-- xp
if xp > 0 then
tooltip:AddLine(format(BONUS_OBJECTIVE_EXPERIENCE_FORMAT, FormatLargeNumber(xp).."|c0000ff00"), 1, 1, 1)
if isWarModeDesired and isQuestWorldQuest and questHasWarModeBonus then
tooltip:AddLine(WAR_MODE_BONUS_PERCENTAGE_XP_FORMAT:format(C_PvP.GetWarModeRewardBonus()))
end
end
-- honor
if honor > 0 then
tooltip:AddLine(format(BONUS_OBJECTIVE_REWARD_WITH_COUNT_FORMAT, "Interface\\ICONS\\Achievement_LegionPVPTier4", honor, HONOR), 1, 1, 1)
end
-- money
if money > 0 then
tooltip:AddLine(GetCoinTextureString(money, 12), 1, 1, 1)
if isWarModeDesired and isQuestWorldQuest and questHasWarModeBonus then
tooltip:AddLine(WAR_MODE_BONUS_PERCENTAGE_FORMAT:format(C_PvP.GetWarModeRewardBonus()))
end
end
-- spells
for i = 1, numQuestSpellRewards do
repeat
local spellInfo = C_QuestInfoSystem.GetQuestRewardSpellInfo(questID, i)
if not spellInfo then
do break end
end
if not spellInfo.name or not spellInfo.texture then
do break end
end
local texture = spellInfo.texture
local name = spellInfo.name
tooltip:AddLine(format(BONUS_OBJECTIVE_REWARD_FORMAT, texture, name), 1, 1, 1)
do break end
until true
end
-- items
for i = 1, numQuestRewards do
local name, texture, numItems, quality, isUsable = GetQuestLogRewardInfo(i, questID)
local text
if numItems > 1 then
text = format(BONUS_OBJECTIVE_REWARD_WITH_COUNT_FORMAT, texture, HIGHLIGHT_FONT_COLOR:WrapTextInColorCode(numItems), name)
elseif texture and name then
text = format(BONUS_OBJECTIVE_REWARD_FORMAT, texture, name)
end
if text then
local color = isUsable and ITEM_QUALITY_COLORS[quality] or colorNotUsable
tooltip:AddLine(text, color.r, color.g, color.b)
end
end
-- artifact power
if artifactXP > 0 then
tooltip:AddLine(format(BONUS_OBJECTIVE_ARTIFACT_XP_FORMAT, FormatLargeNumber(artifactXP)), 1, 1, 1)
end
-- currencies
if numQuestCurrencies > 0 then
QuestUtils_AddQuestCurrencyRewardsToTooltip(questID, tooltip)
end
-- reputation
if majorFactionRepRewards then
for i, rewardInfo in ipairs(majorFactionRepRewards) do
local majorFactionData = C_MajorFactions.GetMajorFactionData(rewardInfo.factionID)
local text = FormatLargeNumber(rewardInfo.rewardAmount).." "..format(QUEST_REPUTATION_REWARD_TITLE, majorFactionData.name)
tooltip:AddLine(text, 1, 1, 1)
end
end
-- war mode bonus (quest only)
if isWarModeDesired and not isQuestWorldQuest and questHasWarModeBonus then
tooltip:AddLine(WAR_MODE_BONUS_PERCENTAGE_FORMAT:format(C_PvP.GetWarModeRewardBonus()))
end
end
C_QuestLog.SetSelectedQuest(bckSelectedQuestID) -- restore selected Quest
end
-- Quest
function KT.GetQuestTagInfo(questID)
return C_QuestLog.GetQuestTagInfo(questID) or {}
end
function KT.GetQuestLogSpecialItemInfo(questLogIndex)
local link, item, charges, showItemWhenComplete = GetQuestLogSpecialItemInfo(questLogIndex)
if charges and charges <= 0 then
charges = GetItemCount(link)
end
return link, item, charges, showItemWhenComplete
end
function KT.GetNumQuests()
local numQuests = 0
local numEntries = C_QuestLog.GetNumQuestLogEntries()
for i = 1, numEntries do
local info = C_QuestLog.GetInfo(i)
if not info.isHidden and not info.isHeader and not C_QuestLog.IsQuestCalling(info.questID) then
numQuests = numQuests + 1
end
end
return numQuests
end
function KT.GetNumQuestWatches()
local numWatches = C_QuestLog.GetNumQuestWatches()
for i = 1, C_QuestLog.GetNumQuestWatches() do
local questID = C_QuestLog.GetQuestIDForQuestWatchIndex(i)
if questID then
local quest = QuestCache:Get(questID)
if quest:IsDisabledForSession() then
numWatches = numWatches - 1
end
end
end
return numWatches
end
-- Scenario
function KT.IsScenarioHidden()
local _, _, numStages = C_Scenario.GetInfo()
return numStages == 0 or IsOnGroundFloorInJailersTower()
end
-- Time
function KT.SecondsToTime(seconds, noSeconds, maxCount, roundUp)
local time = "";
local count = 0;
local tempTime;
seconds = roundUp and ceil(seconds) or floor(seconds);
maxCount = maxCount or 2;
if ( seconds >= 86400 ) then
count = count + 1;
if ( count == maxCount and roundUp ) then
tempTime = ceil(seconds / 86400);
else
tempTime = floor(seconds / 86400);
end
time = tempTime.." Day";
seconds = mod(seconds, 86400);
end
if ( count < maxCount and seconds >= 3600 ) then
count = count + 1;
if ( time ~= "" ) then
time = time..TIME_UNIT_DELIMITER;
end
if ( count == maxCount and roundUp ) then
tempTime = ceil(seconds / 3600);
else
tempTime = floor(seconds / 3600);
end
time = time..tempTime.." Hr";
seconds = mod(seconds, 3600);
end
if ( count < maxCount and seconds >= 60 ) then
count = count + 1;
if ( time ~= "" ) then
time = time..TIME_UNIT_DELIMITER;
end
if ( count == maxCount and roundUp ) then
tempTime = ceil(seconds / 60);
else
tempTime = floor(seconds / 60);
end
time = time..tempTime.." Min";
seconds = mod(seconds, 60);
end
if ( count < maxCount and seconds > 0 and not noSeconds ) then
if ( time ~= "" ) then
time = time..TIME_UNIT_DELIMITER;
end
time = time..seconds.." Sec";
end
return time;
end
-- =====================================================================================================================
local function StatiPopup_OnShow(self)
if self.text.text_arg1 then
self.text:SetText(self.text:GetText().." - "..self.text.text_arg1)
end
if self.text.text_arg2 then
if self.data then
self.SubText:SetFormattedText(self.text.text_arg2, unpack(self.data))
else
self.SubText:SetText(self.text.text_arg2)
end
self.SubText:SetTextColor(1, 1, 1)
else
self.SubText:Hide()
end
end
StaticPopupDialogs[addonName.."_Info"] = {
text = "|T"..mediaPath.."KT_logo:22:22:0:0|t"..NORMAL_FONT_COLOR_CODE..KT.title.."|r",
subText = "...",
button2 = CLOSE,
OnShow = StatiPopup_OnShow,
timeout = 0,
whileDead = 1
}
StaticPopupDialogs[addonName.."_ReloadUI"] = {
text = "|T"..mediaPath.."KT_logo:22:22:0:0|t"..NORMAL_FONT_COLOR_CODE..KT.title.."|r",
subText = "...",
button1 = RELOADUI,
OnShow = StatiPopup_OnShow,
OnAccept = function()
ReloadUI()
end,
timeout = 0,
whileDead = 1
}
StaticPopupDialogs[addonName.."_LockUI"] = {
text = "|T"..mediaPath.."KT_logo:22:22:0:0|t"..NORMAL_FONT_COLOR_CODE..KT.title.."|r",
subText = "...",
button1 = LOCK,
OnShow = StatiPopup_OnShow,
OnAccept = function()
local overlay = KT.frame.ActiveFrame.overlay
overlay:Hide()
end,
timeout = 0,
whileDead = 1
}
StaticPopupDialogs[addonName.."_WowheadURL"] = {
text = "|T"..mediaPath.."KT_logo:22:22:0:-1|t"..NORMAL_FONT_COLOR_CODE..KT.title.."|r - Wowhead URL",
button2 = CLOSE,
hasEditBox = 1,
editBoxWidth = 300,
EditBoxOnTextChanged = function(self)
self:SetText(self.text)
self:HighlightText()
end,
EditBoxOnEnterPressed = function(self)
self:GetParent():Hide()
end,
EditBoxOnEscapePressed = function(self)
self:GetParent():Hide()
end,
OnShow = function(self)
local name = "..."
local urlText = self.text.text_arg1.."="..self.text.text_arg2
if self.text.text_arg1 == "quest" then
name = QuestUtils_GetQuestName(self.text.text_arg2)
elseif self.text.text_arg1 == "achievement" then
name = select(2, GetAchievementInfo(self.text.text_arg2))
elseif self.text.text_arg1 == "spell" then
name = GetSpellInfo(self.text.text_arg2)
elseif self.text.text_arg1 == "activity" then
local activityInfo = C_PerksActivities.GetPerksActivityInfo(self.text.text_arg2)
if activityInfo then
name = activityInfo.activityName
end
urlText = "trading-post-activity/"..self.text.text_arg2
end
local lang = KT.locale:sub(1, 2)
if lang == "zh" then lang = "cn" end
self.text:SetText(self.text:GetText().."\n|cffff7f00"..name.."|r")
self.editBox.text = "https://"..lang..".wowhead.com/"..urlText
self.editBox:SetText(self.editBox.text)
self.editBox:SetFocus()
end,
timeout = 0,
whileDead = 1,
hideOnEscape = 1
}
function KT:Alert_ResetIncompatibleProfiles(version)
if self.db.global.version and not self.IsHigherVersion(self.db.global.version, version) then
local profile
for _, v in ipairs(self.db:GetProfiles()) do
profile = self.db.profiles[v]
for k, _ in pairs(profile) do
profile[k] = nil
end
end
StaticPopup_Show(addonName.."_Info", nil, "All profiles have been reset, because the new version %s is not compatible with stored settings.", { self.version })
end
end
function KT:Alert_IncompatibleAddon(addon, version)
if not self.IsHigherVersion(GetAddOnMetadata(addon, "Version"), version) then
self.db.profile["addon"..addon] = false
StaticPopup_Show(addonName.."_ReloadUI", nil, "|cff00ffe3%s|r support has been disabled. Please install version |cff00ffe3%s|r or later and enable addon support.", { GetAddOnMetadata(addon, "Title"), version })
end
end
function KT:Alert_WowheadURL(type, id)
StaticPopup_Show(addonName.."_WowheadURL", type, id)
end
diff --git a/Utils.lua b/Utils.lua
index 5600a22..34afcf6 100755
--- a/Utils.lua
+++ b/Utils.lua
@@ -151,7 +151,8 @@ function KT.GameTooltip_AddQuestRewardsToTooltip(tooltip, questID, isBonus)
local artifactXP = GetQuestLogRewardArtifactXP(questID)
local numQuestCurrencies = GetNumQuestLogRewardCurrencies(questID)
local numQuestRewards = GetNumQuestLogRewards(questID)
- local numQuestSpellRewards = GetNumQuestLogRewardSpells(questID)
+ local spellRewards = C_QuestInfoSystem.GetQuestRewardSpells(questID) or {}
+ local numQuestSpellRewards = #spellRewards
local numQuestChoices = GetNumQuestLogChoices(questID, true)
local honor = GetQuestLogRewardHonor(questID)
local majorFactionRepRewards = C_QuestLog.GetQuestLogMajorFactionReputationRewards(questID)
@@ -226,10 +227,19 @@ function KT.GameTooltip_AddQuestRewardsToTooltip(tooltip, questID, isBonus)
-- spells
for i = 1, numQuestSpellRewards do
- local texture, name = GetQuestLogRewardSpell(i, questID)
- if name and texture then
- tooltip:AddLine(format(BONUS_OBJECTIVE_REWARD_FORMAT, texture, name), 1, 1, 1)
+ repeat
+ local spellInfo = C_QuestInfoSystem.GetQuestRewardSpellInfo(questID, i)
+ if not spellInfo then
+ do break end
end
+ if not spellInfo.name or not spellInfo.texture then
+ do break end
+ end
+ local texture = spellInfo.texture
+ local name = spellInfo.name
+ tooltip:AddLine(format(BONUS_OBJECTIVE_REWARD_FORMAT, texture, name), 1, 1, 1)
+ do break end
+ until true
end
-- items
@Panglis
Copy link

Panglis commented May 5, 2023

New guy here. Tried your fix. Still getting LUA errors. Don't know how to find the erros but here's what pops up in WoW:

#1
Message: Interface/AddOns/!KalielsTracker/Utils.lua:25: unexpected symbol near '@'
Time: Fri May  5 08:38:22 2023
Count: 1
Stack: Interface/AddOns/!KalielsTracker/Utils.lua:25: unexpected symbol near '@'

#2 
Message: Interface/AddOns/!KalielsTracker/Modules/Filters.lua:28: attempt to call field 'GetMapContinents' (a nil value)
Time: Fri May  5 08:38:22 2023
Count: 1
Stack: Interface/AddOns/!KalielsTracker/Modules/Filters.lua:28: attempt to call field 'GetMapContinents' (a nil value)
[string "@Interface/AddOns/!KalielsTracker/Modules/Filters.lua"]:28: in main chunk

Locals: addonName = "!KalielsTracker"
KT = <table> {
 SetDefaultModuleLibraries = <function> defined @Interface/AddOns/!KalielsTracker/Libs/AceAddon-3.0/AceAddon-3.0.lua:363
 SetQuestsHeaderText = <function> defined @Interface/AddOns/!KalielsTracker/KalielsTracker.lua:2590
 QUEST_DASH = "- "
 SetMessage = <function> defined @Interface/AddOns/!KalielsTracker/KalielsTracker.lua:2844
 QuestsCache_Init = <function> defined @Interface/AddOns/!KalielsTracker/KalielsTracker.lua:160
 modules = <table> {
 }
 WORLD_QUEST_REWARD_TYPE_FLAG_MATERIALS = 8
 SetHeaderText = <function> defined @Interface/AddOns/!KalielsTracker/KalielsTracker.lua:2582
 WORLD_QUEST_REWARD_TYPE_FLAG_EQUIPMENT = 16
 gameVersion = "10.1.0"
 SetDefaultModulePrototype = <function> defined @Interface/AddOns/!KalielsTracker/Libs/AceAddon-3.0/AceAddon-3.0.lua:405
 GetSinkAce3OptionsDataTable = <function> defined @Interface/AddOns/!KalielsTracker/Libs/LibSink-2.0/LibSink-2.0.lua:672
 defaultModuleState = false
 IsEnabled = <function> defined @Interface/AddOns/!KalielsTracker/Libs/AceAddon-3.0/AceAddon-3.0.lua:447
 QuestsCache_GetProperty = <function> defined @Interface/AddOns/!KalielsTracker/KalielsTracker.lua:145
 DisableModule = <function> defined @Interface/AddOns/!KalielsTracker/Libs/AceAddon-3.0/AceAddon-3.0.lua:346
 GetRecipeID = <function> defined @Interface/AddOns/!KalielsTracker/Core/Blizzard_ProfessionsRecipeTracker.lua:13
 PLAYER_FACTION_COLORS = <table> {
 }
 IsTrackerEmpty = <function> defined @Interface/AddOns/!KalielsTracker/KalielsTracker.lua:2796
 WORLD_QUEST_REWARD_TYPE_FLAG_REPUTATION = 32
 RegisterSink = <function> defined @Interface/AddOns/!KalielsTracker/Libs/LibSink-2.0/LibSink-2.0.lua:791
 forcedUpdate = false
 WAR_RESOURCES_CURRENCY_ID = 1560
 QUALITY_COLORS = <table> {
 }
 SetSize = <function> defined @Interface/AddOns/!KalielsTracker/KalielsTracker.lua:2373
 OpenOptions = <function> defined @Interface/AddOns/!KalielsTracker/Options.lua:1462
 SetEnabledState = <function> defined @Interface/AddOns/!KalielsTracker/Libs/AceAddon-3.0/AceAddon-3.0.lua:420
 enabledState = true
 ALL_BLIZZARD_MODULES = <table> {
 }
 CreateQuestTag = <function> defined @Interface/AddOns/!KalielsTracker/KalielsTracker.lua:2746
 IterateModules = <function> defined @Interface/AddOns/!KalielsTracker/Libs/AceAddon-3.0/AceAddon-3.0.lua:433
 frame = !KalielsTrackerFrame {
 }
 SetOtherButtons = <function> defined @Interface/AddOns/!KalielsTracker/KalielsTracker.lua:2606
 Enable = <function> defined @Interface/AddOns/!KalielsTracker/Libs/AceAddon-3.0/AceAddon-3.0.lua:290
 NewModule = <function> defined @Interface/AddOns/!KalielsTracker/Libs/AceAddon-3.0/AceAddon-3.0.lua:231
 GetModule = <function> defined @Interface/AddOns/!KalielsTracker/Libs/AceAddon-3.0/AceAddon-3.0.lua:206
 Hacks = <table> {
 }
 defaultModuleLibraries = <table> {
 }
 SetBackground = <function> defined @Interface/AddOns/!KalielsTracker/KalielsTracker.lua:2476
 Filters = <table> {
 }
 ToggleEmptyTracker = <function> defined @Interface/AddOns/!KalielsTracker/KalielsTracker.lua:2811
 GetName = <function> defined @Interface/AddOns/!KalielsTracker/Libs/AceAddon-3.0/AceAddon-3.0.lua:275
 WORLD_QUEST_REWARD_TYPE_FLAG_OTHERS = 65536
 SetText = <function> defined @Interface/AddOns/!KalielsTracker/KalielsTracker.lua:2524
 SetSinkStorage = <function> defined @Interface/AddOns/!KalielsTracker/Libs/LibSink-2.0/LibSink-2.0.lua:829
 version = "6.1.1"
 CheckAddOn = <function> defined @Interface/AddOns/!KalielsTracker/Options.lua:1439
 InitProfile = <function> defined @Interface/AddOns/!KalielsTracker/Options.lua:1468
 orderedModules = <table> {
 }
 GetSinkAce2OptionsDa

#3Message: Interface/AddOns/!KalielsTracker/Options.lua:1478: attempt to call field 'RgbToHex' (a nil value)
Time: Fri May  5 08:38:22 2023
Count: 1
Stack: Interface/AddOns/!KalielsTracker/Options.lua:1478: attempt to call field 'RgbToHex' (a nil value)
[string "@Interface/AddOns/!KalielsTracker/Options.lua"]:1478: in function `SetupOptions'
[string "@Interface/AddOns/!KalielsTracker/KalielsTracker.lua"]:2917: in function <Interface/AddOns/!KalielsTracker/KalielsTracker.lua:2886>
[string "=[C]"]: ?
[string "@Interface/AddOns/!KalielsTracker/Libs/AceAddon-3.0/AceAddon-3.0.lua"]:66: in function <...s/!KalielsTracker/Libs/AceAddon-3.0/AceAddon-3.0.lua:61>
[string "@Interface/AddOns/!KalielsTracker/Libs/AceAddon-3.0/AceAddon-3.0.lua"]:494: in function `InitializeAddon'
[string "@Interface/AddOns/!KalielsTracker/Libs/AceAddon-3.0/AceAddon-3.0.lua"]:619: in function <...s/!KalielsTracker/Libs/AceAddon-3.0/AceAddon-3.0.lua:611>

Locals: self = <table> {
 SetDefaultModuleLibraries = <function> defined @Interface/AddOns/!KalielsTracker/Libs/AceAddon-3.0/AceAddon-3.0.lua:363
 SetQuestsHeaderText = <function> defined @Interface/AddOns/!KalielsTracker/KalielsTracker.lua:2590
 QUEST_DASH = "- "
 SetMessage = <function> defined @Interface/AddOns/!KalielsTracker/KalielsTracker.lua:2844
 QuestsCache_Init = <function> defined @Interface/AddOns/!KalielsTracker/KalielsTracker.lua:160
 modules = <table> {
 }
 WORLD_QUEST_REWARD_TYPE_FLAG_MATERIALS = 8
 SetHeaderText = <function> defined @Interface/AddOns/!KalielsTracker/KalielsTracker.lua:2582
 borderColor = <table> {
 }
 locked = false
 WORLD_QUEST_REWARD_TYPE_FLAG_EQUIPMENT = 16
 gameVersion = "10.1.0"
 SetDefaultModulePrototype = <function> defined @Interface/AddOns/!KalielsTracker/Libs/AceAddon-3.0/AceAddon-3.0.lua:405
 GetSinkAce3OptionsDataTable = <function> defined @Interface/AddOns/!KalielsTracker/Libs/LibSink-2.0/LibSink-2.0.lua:672
 inInstance = false
 defaultModuleState = false
 IsEnabled = <function> defined @Interface/AddOns/!KalielsTracker/Libs/AceAddon-3.0/AceAddon-3.0.lua:447
 QuestsCache_GetProperty = <function> defined @Interface/AddOns/!KalielsTracker/KalielsTracker.lua:145
 DisableModule = <function> defined @Interface/AddOns/!KalielsTracker/Libs/AceAddon-3.0/AceAddon-3.0.lua:346
 GetRecipeID = <function> defined @Interface/AddOns/!KalielsTracker/Core/Blizzard_ProfessionsRecipeTracker.lua:13
 PLAYER_FACTION_COLORS = <table> {
 }
 IsTrackerEmpty = <function> defined @Interface/AddOns/!KalielsTracker/KalielsTracker.lua:2796
 WORLD_QUEST_REWARD_TYPE_FLAG_REPUTATION = 32
 RegisterSink = <function> defined @Interface/AddOns/!KalielsTracker/Libs/LibSink-2.0/LibSink-2.0.lua:791
 forcedUpdate = false
 WAR_RESOURCES_CURRENCY_ID = 1560
 QUALITY_COLORS = <table> {
 }
 SetSize = <function> defined @Interface/AddOns/!KalielsTracker/KalielsTracker.lua:2373
 OpenOptions = <function> defined @Interface/AddOns/!KalielsTracker/Options.lua:1462
 AddonPetTracker = <table> {
 }
 SetEnabledState = <function> defined @Interface/AddOns/!KalielsTracker/Libs/AceAddon-3.0/AceAddon-3.0.lua:420
 AddonTomTom = <table> {
 }
 enabledState = true
 db = <table> {
 }
 playerName = "Nuggets"
 initialized = false
 wqInitialized = false
 ALL_BLIZZARD_MODULES = <table> {
 }
 CreateQuestTag = <function> defined @Interface/AddOns/!KalielsTracker/KalielsTracker.lua:2746
 IterateModules = <function> defined @Interface/AddOns/!KalielsTracker/Libs/AceAddon-3.0/AceAddon-3.0.lua:433
 collapsedByUser = false
 Filters = <table> {
 }
 ActiveButton = <table> {
 }
 frame = !KalielsTrackerFrame {
 }
 MergeTables = <function> defined @Interface/AddOns/!KalielsTracker/KalielsTracker.lua:2872
 headers = <table> {
 }
 SetOtherButtons = <function> defined @Interface/AddOns/!KalielsTracker/KalielsTracker.lua:2606
 SetAchievsHeaderText = <function> defined @Interface/AddOns/!KalielsTracker/KalielsTracker.lua:2598
 ORDER_RESOURCES_CURRENCY_ID = 1220
 activeTasks = <table> {
 }
 Enable = <function> defined @Interface/AddOns/!KalielsTracker

#4
Message: Interface/AddOns/!KalielsTracker/KalielsTracker.lua:345: attempt to index upvalue 'db' (a nil value)
Time: Fri May  5 08:38:25 2023
Count: 1
Stack: Interface/AddOns/!KalielsTracker/KalielsTracker.lua:345: attempt to index upvalue 'db' (a nil value)
[string "=(tail call)"]: ?
[string "=(tail call)"]: ?
[string "@Interface/AddOns/!KalielsTracker/KalielsTracker.lua"]:345: in function <Interface/AddOns/!KalielsTracker/KalielsTracker.lua:342>
[string "@Interface/AddOns/!KalielsTracker/KalielsTracker.lua"]:2943: in function <Interface/AddOns/!KalielsTracker/KalielsTracker.lua:2940>
[string "=[C]"]: ?
[string "@Interface/AddOns/!KalielsTracker/Libs/AceAddon-3.0/AceAddon-3.0.lua"]:66: in function <...s/!KalielsTracker/Libs/AceAddon-3.0/AceAddon-3.0.lua:61>
[string "@Interface/AddOns/!KalielsTracker/Libs/AceAddon-3.0/AceAddon-3.0.lua"]:523: in function `EnableAddon'
[string "@Interface/AddOns/!KalielsTracker/Libs/AceAddon-3.0/AceAddon-3.0.lua"]:626: in function <...s/!KalielsTracker/Libs/AceAddon-3.0/AceAddon-3.0.lua:611>
[string "=[C]"]: in function `LoadAddOn'
[string "@Interface/FrameXML/UIParent.lua"]:545: in function `UIParentLoadAddOn'
[string "@Interface/FrameXML/UIParent.lua"]:754: in function `MajorFactions_LoadUI'
[string "@Interface/AddOns/Blizzard_ExpansionLandingPage/Blizzard_DragonflightLandingPage.lua"]:100: in function `SetUpMajorFactionList'
[string "@Interface/AddOns/Blizzard_ExpansionLandingPage/Blizzard_DragonflightLandingPage.lua"]:93: in function `RefreshMajorFactionList'
[string "@Interface/AddOns/Blizzard_ExpansionLandingPage/Blizzard_DragonflightLandingPage.lua"]:88: in function `RefreshOverlay'
[string "@Interface/AddOns/Blizzard_ExpansionLandingPage/Blizzard_DragonflightLandingPage.lua"]:80: in function <...sionLandingPage/Blizzard_DragonflightLandingPage.lua:76>
[string "=[C]"]: in function `CreateFrame'
[string "@Interface/AddOns/Blizzard_ExpansionLandingPage/Blizzard_DragonflightLandingPage.lua"]:49: in function `CreateOverlay'
[string "@Interface/AddOns/Blizzard_ExpansionLandingPage/Blizzard_ExpansionLandingPage.lua"]:63: in function `RefreshExpansionOverlay'
[string "@Interface/AddOns/Blizzard_ExpansionLandingPage/Blizzard_ExpansionLandingPage.lua"]:35: in function <...pansionLandingPage/Blizzard_ExpansionLandingPage.lua:33>

Locals: (*temporary) = <function> defined =[C]:-1

#5 (seems same as #1)
Message: Interface/AddOns/!KalielsTracker/Utils.lua:1 Interface/AddOns/!KalielsTracker/Utils.lua:25: unexpected symbol near '@'
Time: Fri May  5 08:38:28 2023
Count: 1

#6
Message: Interface/AddOns/!KalielsTracker/Modules/Filters.lua:1 (null)
Time: Fri May  5 08:38:28 2023
Count: 1

#7 & 8 definitely repeats.

Any help you can provide?

@mahmoudimus
Copy link
Author

mahmoudimus commented May 5, 2023

@Panglis - did you run git apply --whitespace=fix Utils.lua.patch in your _retail_/Interface/AddOns/!KalielsTracker directory?

On Windows, make sure you have patch.exe on your machine. You can read more about this here: https://stackoverflow.com/a/40919520/13351. Run the patch command above.

On a Mac, just follow the instructions here https://git-scm.com/book/en/v2/Getting-Started-Installing-Git to install git for macos and run the command above.

I also added the fully patched Utils.lua file above so you can just download that and overwrite the Utils.lua file in your folder. Please make sure you back up the original file first in case something goes awry.

Cheers.

@Panglis
Copy link

Panglis commented May 5, 2023

I downloaded, installed Git, tried running patch but I'm unfamiliar with the command line it uses. Here's what I tried. From PowerShell (PS), I changed dir to C:\Program Files\git\usr\bin> and tried simply running .\patch.exe to see if a gui would show up but no. I'm familiar enough with PS. So, tried using your example. I CD'd to my retail/Interface/AddOns/!KalielsTracker and ran git apply --whitespace=fix Utils.lua.patch and on and on and on.

Too much work, to be honest. Too much to try to learn. Patch.exe has it's own input options, GIT has it's own. Thanks anyway.

@mahmoudimus
Copy link
Author

I downloaded, installed Git, tried running patch but I'm unfamiliar with the command line it uses. Here's what I tried. From PowerShell (PS), I changed dir to C:\Program Files\git\usr\bin> and tried simply running .\patch.exe to see if a gui would show up but no. I'm familiar enough with PS. So, tried using your example. I CD'd to my retail/Interface/AddOns/!KalielsTracker and ran git apply --whitespace=fix Utils.lua.patch and on and on and on.

Too much work, to be honest. Too much to try to learn. Patch.exe has it's own input options, GIT has it's own. Thanks anyway.

@Panglis hmm. np. have you tried replacing Utils.lua with what I put above?

I also added the fully patched Utils.lua file above so you can just download that and overwrite the Utils.lua file in your folder. Please make sure you back up the original file first in case something goes awry.

@Panglis
Copy link

Panglis commented May 6, 2023

I'll try that now. It's probably just my lack of knowledge with GIT. Never used it. Thanks for your efforts, really appreciated! I'll let you know how it goes, after I replace the file and launch the game!

@Panglis
Copy link

Panglis commented May 6, 2023

Yep, that worked. Thanks a bunch mahmoudimus!

@joshuabalduff
Copy link

Can you make a pr for the main repo?

@mahmoudimus
Copy link
Author

@joshuabalduff where's the main repo? happy to submit a patch.

@joshuabalduff
Copy link

Let me find it, I thought I had it saved..apparently not lol.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment