SetMap - Addon Assitance - WoWInterface
Thread Tools Display Modes
07-18-18, 01:27 PM   #1
A Fallenroot Satyr
Uggers's Avatar
Join Date: May 2008
Posts: 26
SetMap - Addon Assitance

I currently have an addon which is throwing up errors it appears to be related to the fact it can't set the map/get the map ID.

The code I have for this portion is like this;

function MountManager:ZONE_CHANGED_NEW_AREA()
	if not InCombatLockdown() then
		state.zone = GetCurrentMapAreaID()
function MountManager:UpdateZoneStatus(event)
    if InCombatLockdown() or state.inCombat or state.inPetBattle then return end
    local prevSwimming = state.isSwimming
    local prevFlyable = state.isFlyable
    state.isSwimming = IsSwimming() or IsSubmerged()
	local usable, _ = IsUsableSpell(flightTest)
    if IsFlyableArea() and self.db.char.mount_skill > 2 and usable == true then
        state.isFlyable = true
        state.isFlyable = false
    if (prevSwimming ~= state.isSwimming) or (prevFlyable ~= state.isFlyable) then
I'm not sure if its SetMapToCurrentZone or GetCurrentMapAreaID that needs updating, I tried changing to C_Map.GetAreaInfo but I still get this error;

20x MountManager\MountManager-v1.0.0.lua:260: attempt to call upvalue 'SetMapToCurrentZone' (a nil value)
MountManager\MountManager-v1.0.0.lua:260: in function `?'
...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0-6.lua:145: in function <...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:145>
[string "safecall Dispatcher[1]"]:4: in function <[string "safecall Dispatcher[1]"]:4>
[C]: ?
[string "safecall Dispatcher[1]"]:13: in function `?'
...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0-6.lua:90: in function `Fire'
Ace3\AceEvent-3.0\AceEvent-3.0-4.lua:120: in function <Ace3\AceEvent-3.0\AceEvent-3.0.lua:119>

  Reply With Quote
07-18-18, 02:16 PM   #2
nUI Maintainer
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,641
The whole of the map system was changed. While in game you can query the map ui by typing /api map or /api mapui . I can never remember which. There is also a command /api system or systems which will list the different api's that can be listed in detail. There have been various posts regarding the up and coming changes on these forums for a few months now.

Looking at the blizzard code here :

The function I feel may be the best equivalent for you is :

However, there may be others who have looked into the mapping system in more detail and have a more accurate one for you.
  Reply With Quote
07-19-18, 11:18 AM   #3
A Fallenroot Satyr
Uggers's Avatar
Join Date: May 2008
Posts: 26

thanks for the reply, sadly it didn't seem to fix it, I tried a few variations but It wouldn't work
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » SetMap - Addon Assitance

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off