WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   MozzFullWorldMap: Technical Support (https://www.wowinterface.com/forums/forumdisplay.php?f=132)
-   -   Andive on making MFWM working in 4.0 ? (https://www.wowinterface.com/forums/showthread.php?t=35901)

AnrDaemon 10-18-10 07:15 AM

Advice on making MFWM working in 4.0 ?
 
I seems to have fixed "this" errors, but the mod just not doing anything, from what I can see.
Any advice?

spiel2001 10-18-10 08:00 AM

I will have an update out for it by this weekend... it's a combination of things that need to be changed to make it work due to changes in the WoW API with 4.0

harl 10-19-10 09:56 AM

Thanks for the update on an upcoming update. Looking forward to it. MFWM makes the maps look much better in my opinion. :)

RVCA18 10-23-10 04:42 AM

Code Update
 
Hi spiel2001,

I went through the code and made some adjustments.

In the MozzFullWorldMap.xml

Code:

<OnLoad>
        <!-- added 'self' -->
        MozzFullWorldMapFrame_OnLoad(self);
</OnLoad>
<OnEvent>
        <!-- changed to 'self, event, ...' -->
        MozzFullWorldMapFrame_OnEvent(self, event, ...);
</OnEvent>
<OnUpdate>
        <!-- changed to 'elapsed' from 'arg1' -->
        MozzFullWorldMapFrame_OnUpdate(self, elapsed);
</OnUpdate>
...
<OnClick>
        <!-- added 'self' -->
        if ( self:GetChecked() ) then
        ...
        end
        ...
</OnClick>
<OnShow>
        ...
        <!-- added 'self' -->
        self:SetChecked( MozzFullWorldMap.Enabled );
</OnShow>

In the MozzFullWorldMap.lua

Code:

-- adjusted function options to 'self, event, ...'
function MozzFullWorldMapFrame_OnEvent(self, event, ...)
        local arg1 = ... -- 'arg1' is now properly recognized
        ...
end

Code:

-- added 'self' to function options
function MozzFullWorldMapFrame_OnLoad(self)
        self:RegisterEvent("ADDON_LOADED"); -- changed 'this' to 'self'
        ...
end

Code:

function worldMapFrame_UpdateOverlays(dtlFrame, ovrLay, scalingFactor, oAlpha)
        ...
        local tname,tw,th,ofx,ofy,mpx,mpy = GetMapOverlayInfo(i)
        if (mpx == nil or mpy == nil) then mpx = 0; mpy = 0 end -- set mpx & mpy to 0 if nil       
        ...
end

Let me know how this turns out for you.

volshan 10-24-10 02:21 PM

Quote:

Originally Posted by RVCA18 (Post 213489)
Hi spiel2001,

I went through the code and made some adjustments.
...
Let me know how this turns out for you.

Since this is one of the addons I've missed the most this last couple weeks (I was doing a lot of exploring on lower levels for candy buckets and thought I'd get some achievements on them while I was at it) I made the changes to my copy and tried it.

Thought I'd let you know these changes seem to work fine except...

Henry Ford once said you could have a Model-T in any color you want as long as you want black. These changes seem to work fine as long as you want green for an overlay color. I couldn't find a way to change that. (I didn't look into the code, just at the / commands.

Thank you very much for sharing these changes. While not my first choice, given that I use green or don't use MozzFull at all....

I like green a *lot*. =)

Thanks again.

Volshan

spiel2001 10-24-10 02:57 PM

I have this all fixed (including the color settings) and will be uploading shortly.

Many thanks to RCVA18 for the input... it was the change in GetMapOverlayInfo() I had overlooked.

AnrDaemon 10-24-10 03:28 PM

Thanks for the update :)
Let's see how much I missed in my own attempts to wrest it into 4.0.

RVCA18 10-24-10 10:22 PM

@volshan I think it was blue for me due to my settings and I pretty much left the color as is.

@spiel2001 No problem! I love the addon! Decided to see if I could get it running and share whatever I found.

:banana:

ps, Thanks for the update!


All times are GMT -6. The time now is 12:44 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI