SuperVillain UI

SuperVillain UI

279k Downloads

new codes being thrown, too long to post in discord

DeviantJdm opened this issue ยท 2 comments

commented

1491x ...aceSVUI_QuestTracker\components\scenario.lua:236: attempt to perform arithmetic on local 'maxTime' (a nil value)
...aceSVUI_QuestTracker\components\scenario.lua:236: in function `SetMedals'
...aceSVUI_QuestTracker\components\scenario.lua:325: in function <...aceSVUI_QuestTracker\components\scenario.lua:310>

Locals:
self = {
0 =
StartTimer = defined @SVUI_QuestTracker\components\scenario.lua:194
UpdateBackdrop = defined @SVUI_!Core\system\api.lua:554
StopTimer = defined @SVUI_QuestTracker\components\scenario.lua:212
SetBackdropBorderColor = defined =[C]:-1
SetMedals = defined @SVUI_QuestTracker\components\scenario.lua:225
Panel = {
}
___fadehandler = {
}
___fadeset =

{
}
fademode = "IN"
UpdateMedals = defined @SVUI_QuestTracker\components\scenario.lua:249
Icon = {
}
SetFrameLevel = defined =[C]:-1
Bar = {
}
UpdateChallenges = defined @SVUI_QuestTracker\components\scenario.lua:289
UpdateTimers = defined @SVUI_QuestTracker\components\scenario.lua:310
BackdropNeedsUpdate = true
}
elapsedTime = 201
blockHeight = 180
_ = "Neltharion's Lair"
_ = "party"
difficulty = 8
_ = "Mythic Keystone"
_ = 5
_ = 0
_ = false
mapID = 1458
zoneName = nil
_ = nil
maxTime = nil
(*temporary) =
{
}
(*temporary) =
(*temporary) = 0
(*temporary) = 1
(*temporary) = 0.1
(*temporary) = "attempt to perform arithmetic on local 'maxTime' (a nil value)"
INNER_HEIGHT = 20
MOD =
{
UnregisterUpdate = defined @svui
!Core\libs_SVUI_Lib\Registry.lua:509
UpdateAchievements = defined @SVUI_QuestTracker\components\achievements.lua:337
InitializeBonuses = defined @SVUI_QuestTracker\components\bonus.lua:435
InitializeActive = defined @SVUI_QuestTracker\components\active.lua:321
UpdateObjectives = defined @SVUI_QuestTracker\components\quests.lua:1059
ToggleSharedData = defined @svui
!Core\libs_SVUI_Lib\Registry.lua:392
LoadOptions = defined @SVUI_QuestTracker\Loader.lua:41
InitializePopups = defined @SVUI_QuestTracker\components\popups.lua:208
NameID = "SVUI [QuestTracker]"
GetTimerTextColor = defined @SVUI_QuestTracker\SVUI_QuestTracker.lua:341
QuestItemTimer = "LOOP7"
inMicroDungeon = false
RegisterUpdate = defined @svui
!Core\libs_SVUI_Lib\Registry.lua:493
CurrentQuest = 0
ReLoad = defined @SVUI_QuestTracker\SVUI_QuestTracker.lua:415
public =
{
}
UpdateActiveObjective = defined @SVUI_QuestTracker\components\active.lua:312
Headers =
{
}
_eventframe = {
}
Docklet = SVUI_QuestTracker {
}
IsSharingEnabled = defined @svui
!Core\libs_SVUI_Lib\Registry.lua:384
ActiveQuestID = 0
InitializeAchievements = defined @SVUI_QuestTracker\components\achievements.lua:348
CacheBonusObjective = defined @SVUI_QuestTracker\components\bonus.lua:427
media =
{
}
ChangeDBVar = defined @svui
!Core\libs_SVUI_Lib\Registry.lua:419
CheckActiveQuest = defined @SVUI_QuestTracker\components\active.lua:296
UpdateLocals = defined @SVUI_QuestTracker\SVUI_QuestTracker.lua:404
UpdateScenarioObjective = defined @SVUI_QuestTracker\components\scenario.lua:394
UpdateBonusObjective = defined @SVUI_QuestTracker\components\bonus.lua:421
DOCK_IS_FADED = false
UpdateDimensions = defined @SVUI_QuestTracker\SVUI_QuestTracker.lua:357
InitializeQuests = defined @SVUI_QuestTracker\components\quests.lua:1209
__svfiles =
{
}
IgnoreSharedKeys = defined @svui
!Core\libs_SVUI_Lib\Registry.lua:402
CombatLocked = false
InitializeScenarios = defined @s

commented

I have a fix for this. You need to replace the mapID with the ChallengeMapID. Small change, but breaks a lot of stuff.

scenario.lua - Replace SetChallengeMedals function with this:

local SetChallengeMedals = function(self, elapsedTime, ...)
	self:SetHeight(INNER_HEIGHT);
	local blockHeight = MOD.Headers["Scenario"].Block:GetHeight();
	local _, _, difficulty, _, _, _, _, mapID = GetInstanceInfo();
	local cmID = C_ChallengeMode.GetActiveChallengeMapID();
	MOD.Headers["Scenario"].Block:SetHeight(blockHeight + INNER_HEIGHT + 4);
	self:FadeIn();
	self.Bar:SetMinMaxValues(0, elapsedTime);
	self.Bar:SetValue(elapsedTime);

	if(cmID and difficulty == 8) then
		local zoneName, _, maxTime = C_ChallengeMode.GetMapInfo(cmID);
		MEDAL_TIMES[1] = maxTime * 0.6; -- 3 chest
		MEDAL_TIMES[2] = maxTime * 0.8; -- 2 chest
		MEDAL_TIMES[3] = maxTime -- 1 chest
	else
		for i = 1, select("#", ...) do
			MEDAL_TIMES[i] = select(i, ...);
		end
	end
	LAST_MEDAL = nil;
	self:UpdateMedals(elapsedTime);
end

EDIT Sorry, there was another function changed as well.. UpdateAllTimers

local UpdateAllTimers = function(self, ...)
	local timeLeftFound
	for i = 1, select("#", ...) do
		local timerID = select(i, ...);

		if timerID == 0 then
			timerID = 1
		end

		local _, elapsedTime, type = GetWorldElapsedTime(1);
		if ( type == LE_WORLD_ELAPSED_TIMER_TYPE_CHALLENGE_MODE) then
			local _, _, difficulty, _, _, _, _, mapID = GetInstanceInfo();
			local cmID = C_ChallengeMode.GetActiveChallengeMapID();
			if(cmID and difficulty == 8) then
				local cmLevel, affixes, empowered = C_ChallengeMode.GetActiveKeystoneInfo();
				local zoneName, _, maxTime = C_ChallengeMode.GetMapInfo(cmID);
				self:SetMedals(elapsedTime, maxTime);
				return;
			elseif ( cmID ) then
				self:SetMedals(elapsedTime, GetChallengeModeMapTimes(cmID));
				return;
			end
		elseif ( type == LE_WORLD_ELAPSED_TIMER_TYPE_PROVING_GROUND ) then
			local diffID, currWave, maxWave, duration = C_Scenario.GetProvingGroundsInfo()
			if (duration > 0) then
				self:StartTimer(elapsedTime, duration, diffID, currWave, maxWave)
				return;
			end
		end
	end
end
commented

I tested the fix in about 6 mythic+'s tonight and 0 issues.