SexyMap

SexyMap

32M Downloads

Error when toggling between Sexymap and Farmhud in combat, not sure which is the real culprit

ZINK-ZINK opened this issue ยท 9 comments

commented

{EDIT: It just occurred to me the error started after I changed the border/background opacity in Sexymap (I had previously left it at default/100%). Maybe the error is a conflict with Farmhud's minimap backdrop and Sexymap's border.}

I'm getting this error or a similar one whenever I try to toggle the Farmhud radar while in combat. Farmhud has some known bugs so my guess is the error is from that addon rather than yours, but I was using both addons together for a few days without any errors so maybe a Sexymap update added a new conflict.

1x [ADDON_ACTION_BLOCKED] AddOn 'SexyMap' tried to call the protected function 'SetPoint()'.
[string "@Interface/AddOns/!BugGrabber/BugGrabber.lua"]:480: in function <Interface/AddOns/!BugGrabber/BugGrabber.lua:480>
[string "=[C]"]: in function SetPoint' [string "@Interface/AddOns/SexyMap/SexyMap.lua"]:600: in function <Interface/AddOns/SexyMap/SexyMap.lua:598> [string "=[C]"]: in function SetPoint'
[string "Minimap:SetPoint("CENTER",0,0)"]:1: in function f' [string "@Interface/AddOns/FarmHud/FarmHud.lua"]:670: in function <Interface/AddOns/FarmHud/FarmHud.lua:575> [string "=[C]"]: in function SetShown'
[string "@Interface/AddOns/FarmHud/FarmHud.lua"]:907: in function `Toggle'
[string "TOGGLEFARMHUD"]:1: in function <[string "TOGGLEFARMHUD"]:1>

commented

This should now be fixed in the latest release.

And yes I am responsible for a lot of addons lol.

commented

This is "intentional" in that it would have started happening ever since e002cc4 which was an intentional change to resolve #276 i.e. allowing people to click the ZoneText to open the World Map. But it prevents making changes in combat. There is no way around this.

What I could do is allow people to disable clicking the zone text to open the world map, so that they can toggle the minimap in combat, whilst losing the feature entirely, if that's something people want?

commented

"What I could do is allow people to disable clicking the zone text to open the world map, so that they can toggle the minimap in combat, whilst losing the feature entirely, if that's something people want?"

Yes please. Clicking to open the map doesn't matter at all to me, but switching between FarmHUD and Sexymap mid-combat is very important. I use a minimalist FarmHUD profile as a live radar to track my group member's positioning while Tanking, but it's bothersome to have up all fight.

I toggle between the two probably something like 5-50 times per Raid Boss or M+ Key, I even have the toggle keybound to "z".

It's enough of a deal breaker for me that I'd use the default minimap (ugh) rather than give up my FarmHUD radar; I'd rather not though, I've loved Sexymap since I think Cataclysm and wanted to keep using it.

commented

oh and there's no error report to paste, but when using both addons together it forces the FarmHUD version of the minimap to be anchored to the bottom-right of the screen rather than [0,0] centered. I had thought it was a bug on FarmHUD's end, but it seems like it might be related to this same thing.

commented

I just found BasicMinimap which you apparently also make lol. I had hoped it might be a perfect replacement, but not quite since it can't do mouseover fading for all the minimap elements.
BM does seem to properly work with FarmHUD though so yay for that! lol

btw I looked through your project profile on curseforge after I found BM, are you the original creator of all those addons?! Some of those are damn near as important to addons as Ace itself. Have I been enjoying your work since the Thottbot and WoW Insider days? o.0

commented

Please check if FarmHud exists and is shown before reset minimap points in hooksecurefunc(Minimap,"SetPoint",function().

Example:

		hooksecurefunc(Minimap, "SetPoint", function() -- Edit mode for the minimap has a "header underneath" option which changes Minimap points
			if FarmHud and FarmHud:IsShown() then return end
			mod.frame.ClearAllPoints(Minimap)
			mod.frame.SetPoint(Minimap, mod.db.point, UIParent, mod.db.relpoint, mod.db.x, mod.db.y)
		end)

I understand the problem with blizz edit mode. i've added an auto close to FarmHud to prevent problems with the edit mode.

But this hook makes it impossible that both addons work side by side.

greetings Hizuro

commented

@hizuro I decided to take a different approach. I've added 2 new public API's for addons to use.

if SexyMap then
	if xyz then
		SexyMap:SetPoint(point, anchor, relPoint, x, y)
	else
		SexyMap:Restore()
	end
end

e685d40

It is in alpha zips for now, not released yet. Please test it out and let me know if it works for you.

commented

@funkydude thank you for this option. It works but i've found another way that works with lesser changes on both addons.

commented

When I opened this ticket I thought it was just a bug from all the 10.0 craziness, but apparently it was more about differences in Coding-Philosophies. As a coding noob/casual hobbyist that was neat to see play out between you two. Glad yall could work things out, it sounds like I can go back to using both soon (though TBH I've started getting used to BasicMinimap lol)

Both of you make some of the coolest/most indispensable addons imo and you're both awesome! Thanks for all your efforts!