Thread Tools Display Modes
Prev Previous Post   Next Post Next
07-19-18, 02:02 PM   #1
eoblaed
A Murloc Raider
 
eoblaed's Avatar
Join Date: Jul 2018
Posts: 7
Add New Code in New File to Existing Addon

I have several addons that still use the old GetMapNameByID() API call. This is now a 'nil'.

I wrote a thin wrapper function that looks up the old worldID, converts it to the new style UiMapID, and returns C_Map.GetMapInfo(newid).name. The code works when I embed it directly into the various .lua files of the addon (but, that's not a great solution).

What I'm trying to do is create a new file, MapCompat.lua, in such a way that will allow the other pre-existing lua files in the addon to see the GetMapNameByID() call in that new .lua file.

Not having authored an addon before, there's a seemingly labyrinthine combination of .xml, .toc, etc, and I haven't quite hit on the right combination of things to do what I want to do.

Any pointers?

Thanks!
  Reply With Quote
 

WoWInterface » Developer Discussions » General Authoring Discussion » Add New Code in New File to Existing Addon


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