function to switch from one map to another?
Hey, i'm trying to edit my addon but I'm stuck right now. For example, the addon shows dungeon entrances that can be clicked on so that the journal with the corresponding dungeon opens. This works perfectly, but when I try to add a staircase/exit symbol to a dungeon map, such as on the map of the Ruby Life Pools from the infusion chambers to the ruby control room, it works not.
function pluginHandler:OnClick(button, pressed, uiMapId, coord) if (button == "LeftButton" and db.journal) then if (not EncounterJournal_OpenJournal) then UIParentLoadAddOn('Blizzard_EncounterJournal') end local dungeonID if (type(nodes[uiMapId][coord].id) == "table") then dungeonID = nodes[uiMapId][coord].id[1] else dungeonID = nodes[uiMapId][coord].id end if (not dungeonID) then return end local name, _, _, _, _, _, _, link = EJ_GetInstanceInfo(dungeonID) if not link then return end local difficulty = string.match(link, 'journal:.-:.-:(.-)|h') if (not dungeonID or not difficulty) then return end EncounterJournal_OpenJournal(difficulty, dungeonID) _G.EncounterJournal:SetScript("OnShow", BBBEncounterJournal_OnShow) end end nodes[1978] = { } -- Dragon Isles nodes[2095] = { } -- Ruby Life Pools nodes[2022] = { } -- The Waking Shores nodes[1978][52884168] = { id = 1202, type = "Dungeon", } -- Ruby Life Pools This works perfectly, the journal opens with the associated dungeon, done, but how do I get this to work? nodes[2095][42789333] = { uiMapId = 2022, name = L["Exit"], type = "Exit", showInZone = true, } -- Ruby Life Pools It shows the symbol on the Ruby Life Pools map, but when you click on it it doesn't open The Walking Shores map |
You need to put code inside code tags (# button abvove the edit box for plain or the blue "Lua" button next to it for pretty).
In your function: Lua Code:
Lua Code:
|
All times are GMT -6. The time now is 12:40 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI