Chinchilla Minimap

Chinchilla Minimap

2M Downloads

[BUG] Fixes needed for WotLK Classic

mightykong opened this issue ยท 21 comments

commented

A few things I did to get this working under WotLK Classic. It appears that the LibIsClassic is still reporting the AddOn as IsBurningCrusadeClassic = True, which is technically correct because the WOW_PROJECT_ID is not changing for Wrath Classic.

This logic in the attached file can be used if you want to update it to report IsWrathClassic. I first thought of doing this, mainly because if they ever change it during the life cycle of Wrath Classic, then it will be broken again. But that also involves changing all conditionals in all files to look for IsWrathClassic, which isn't insurmountable, but more work than a quick fix. I've attached a file that will work for this if you want to go down that road, but I wouldn't (yet)

LibIsClassic-1.0.txt

Even without updating it, the following fixes are needed.

In Chinchilla.lua, this code (there are 2 instances of this - but one is :Show() the other is :Hide() )

	if self:IsClassic() or self:IsBurningCrusadeClassic() then
		MinimapToggleButton:Hide()
	end 

Change to this:

	if self:IsClassic() then
		MinimapToggleButton:Hide()
	end 

This is where it gets a bit iffy. Two ways to run here. In Wrath Classic, the QuestWatchFrame is now WatchFrame.
Appearance.lua and Position.lua have references to QuestWatchFrame which need to be updated. However, to continue to allow the addon to work under Classic_Era, you'll need to do something like this:

Where there are references of QuestWatchFrame, you'll need to update the code to something like this. This isn't a direct cut and paste for EVERY instance, you have to add the elseif logic and then change QuestWatchFrame to WatchFrame for the elseif condition. There are 4 instances of this logic that has to be updated.

	if Chinchilla:IsClassic() then
		QuestWatchFrame:GetSize()
        elseif Chinchilla:IsBurningCrusadeClassic()
		WatchFrame:GetSize()
	else
		ObjectiveTrackerFrame:GetSize()
	-- Fix Instance Difficulty size --
		MiniMapInstanceDifficulty:SetScale(value)
		GuildInstanceDifficulty:SetScale(value)
		MiniMapChallengeMode:SetScale(value)
	end

One last thing as a feature add. If you want to move the QuestTracker under Wrath via Chinchilla, then the retail code won't work. What I did is download the file Chinchilla-v2.1.6-10-g50f5ae7.zip which is the last 3.3.5 from years ago and extract the QuestTracker.lua file. Rename this file to QuestTracker_Wrath.lua and put in the modules folder.

Then in Chinchilla.toc, add the following line in the list of modules:
Modules\QuestTracker_Wrath.lua
In the module QuestTracker_Wrath.lua file, add the following as the VERY top line:
if Chinchilla:IsClassic() or Chinchilla:IsRetail() then return end

This has it working for me, and it adds the feature to move and resize the QuestTracker for Wrath Classic.

There may be some other fixes needed, and some other movers and features which can be enabled for Wrath Classic as there are things like Boss Frames, etc. But these fixes restore it to at least working order for now.

commented

Thanks for this.

Most of this is already in progress and a 99% working alpha can be downloaded from CurseForge: https://www.curseforge.com/wow/addons/chinchilla/files/3960426

There's still more work to be done but progress is being made.

commented

Yep, saw the downloads available right after I posted this. Thanks for the updates. Love the addon, can't live without it, so started updating myself to make it work. Looks like you have it in hand, but I did like adding the capability of moving the Quest Tracker around. There may be more frames that can now be moved, but I didn't get that far.

Looks like the Chinchilla.lua fixes I posted above still need to be done in the latest version available on Curse just FYI.

commented

Am I right in assuming that there will be separate Burning Crusade Classic realms, similar to the Classic Era realms?

commented

As I understand it no. TBC Classic has become Wrath Classic. I'm just curious that if the WOW_PROJECT_IDs may change in the future like on the actual Wrath release date. From everything I've heard, there will be no TBC only realms going forward.

But then again, it's Blizzard. :) They can change their mind at any time.

commented

I'll be surprised if they don't do a separate TBC Classic to be honest. :)

But we'll see what the future brings.

commented

Hi, just wanted to add that with WOTLK prepatch, the standard minimap frame border is still appearing in the top left corner of the screen.
Also, chinchilla seem to forget the shape-setting. It will always be the default-circle at start up and needs to re-selected in the menu.
thanks for your hard work!

commented

The border remaining was due to an error that I have (hopefully) fixed in the current alpha package. I haven't encountered the shape not being set though... maybe the two were related?

As far as I'm aware the only issues I have not yet fixed are:

  • Tracking Dots on retail servers (see #84)
  • a seemingly harmless error on Classic Era servers (see #85)

Please let me know if you find anything else.

commented

Here is another issue I found. The LFG button for Wrath isn't anchored and is not movable on the minimap.

A few quick hacks that seem to have it working in MoveButtons.lua. Not sure this is the best way, but appears to work.

Add lfg = MiniMapLFGFrame, to this section

		buttons = {
			map = MiniMapWorldMapButton,
			mail = MiniMapMailFrame,
			dayNight = GameTimeFrame,
			clock = TimeManagerClockButton,
			lfg = MiniMapLFGFrame,
			track = MiniMapTracking,
			voice = MiniMapVoiceChatFrame,
			zoomIn = MinimapZoomIn,
			zoomOut = MinimapZoomOut,
		}

Update PositionLFD function to this.

local function PositionLFD()
	if Chinchilla:IsBurningCrusadeClassic() then
		LFDSearchStatus:ClearAllPoints()
		LFDSearchStatus:SetPoint(GetTipAnchor(MiniMapLFGFrame))
	else
		local point1, point2 = GetTipAnchor(QueueStatusMinimapButton)

		QueueStatusFrame:ClearAllPoints()
		QueueStatusFrame:SetPoint(point1, QueueStatusMinimapButton, point2)
	end
end

commented

Good catch! I completely forgot about that button!

commented

It doesn't look like the LFDSearchStatus element exists on Wrath Classic. I'll put in a safety check.

commented

That code for moving the LFD button does cause an error when you actually move the button. However, it moves and then sticks to the place you move it. So the code for PositionLFD for the MiniMapLFGFrame may need some further review.

commented

I assumed that when I got the error, but haven't been able to find if there is an updated/replacement name to be used.

commented

Looking at the code suggests it's just a standard GameTooltip.

https://github.com/Gethe/wow-ui-source/blob/classic/Interface_Wrath/FrameXML/Minimap.lua#L146

commented

Is there a way to get rid of this random/extra circle? Have the latest .ver from CurseForge, could not remove it by changing various settings:
image

commented

Wrath Classic broke a few things with v2.12.2 but this should be fixed in the v2.13.0 beta version on CurseForge.
https://www.curseforge.com/wow/addons/chinchilla/files/3962768

commented

Shocker. Logged out after having everything fine all day, and got a hotfix in Wrath Classic. Now the addon is identifying as Retail via the LibIsClassic library. The code I used in the attachment is working, but essentially, looks like they modified the WOW_PROJECT_ID in the hotfix.

EDIT: Confirmed. It's now WOW_PROJECT_WRATH_CLASSIC. Thanks Blizzard.

I made this change in the Lib to fix myself for now, updated the IsBurningCrusadeClassic code temporarily so that I don't have to hofix all other modules for now.

function lib:IsRetail()
	-- One...
	return WOW_PROJECT_ID == WOW_PROJECT_MAINLINE
end

function lib:IsClassic()
	-- Two...
	return WOW_PROJECT_ID == WOW_PROJECT_CLASSIC
end

function lib:IsBurningCrusadeClassic()
	-- Five!
	--return WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC
	return WOW_PROJECT_ID == WOW_PROJECT_WRATH_CLASSIC
end

function lib:IsWrathClassic()
	-- Five!
	return WOW_PROJECT_ID == WOW_PROJECT_WRATH_CLASSIC
end

-- ---------------------------------------------------------------------
-- Embed Handling

lib.embeds = lib.embeds or {}

local mixins = { "IsRetail", "IsClassic", "IsBurningCrusadeClassic", "IsWrathClassic" }
commented

Yup. Thanks Blizzard. I wish they had done this from the start but oh well. ๐Ÿ˜

commented

Yeah, this broke several mods including Chinchilla today. Lovely

commented

Found one more. Sorry. This needs to go into MoveButtons.lua so that the dungeon heroic symbol is anchored:

difficulty = MiniMapInstanceDifficulty,

in this function

	elseif Chinchilla:IsWrathClassic() then
		buttons = {
			difficulty = MiniMapInstanceDifficulty,
			map = MiniMapWorldMapButton,
			mail = MiniMapMailFrame,
			lfg = MiniMapLFGFrame,
			dayNight = GameTimeFrame,
			clock = TimeManagerClockButton,
			track = MiniMapTracking,
			voice = MiniMapVoiceChatFrame,
			zoomIn = MinimapZoomIn,
			zoomOut = MinimapZoomOut,
		}
commented

I have no further issues to report. :) It looks good to me so far.

commented

How's the state of things with the current alpha/beta packages on CurseForge? If all is well I'll make a release package tomorrow or Wednesday.