EC: crystal portal vs. corrupted crystal portal confusion
in Bugs
In EC, when you double click on a crystal portal or a corrupted crystal portal, they have identical dialog box content, even though the capabilities of the two portals are different.
Additionally, the portal "Go" command uses say instead of whisper, which leaks your destination to everybody on screen.
All changes to crystalportal.lua
function CrystalPortal.GO()
--SendChat( _channel, L"/say " .. finalstring )
SendChat( _channel, L";" .. finalstring ) -- use whisper instead of say
function CrystalPortal.OnShown()
if (GumpData.Gumps[9083] ~= nil and GumpData.Gumps[9083].Labels ~= nil and GumpData.Gumps[9083].Labels[1] ~= nil) then
local dungeon = true -- default all to match old crystal portal settings.
local bank = true
local moongate = true
local stringId = 1113945
if (GumpData.Gumps[9083].Labels[1].tid == 1150074) then -- corrupted crystal portal
stringId = 1150074
bank = false
moongate = false
if(CrystalPortal.LastArea ~= 1) then -- only consider dungeons.
CrystalPortal.LastArea = 0
CrystalPortal.LastSelection = 0
end
elseif (GumpData.Gumps[9083].Labels[1].tid == 1113945) then -- crystal portal
dungeon = false
if(CrystalPortal.LastArea == 1) then
CrystalPortal.LastArea = 0
CrystalPortal.LastSelection = 0
end
end
WindowUtils.SetWindowTitle(CrystalPortal.WindowName, L" ")
WindowUtils.SetWindowTitle(CrystalPortal.WindowName, GetStringFromTid(stringId))
WindowSetShowing(CrystalPortal.WindowName .. "DungeonButton", dungeon )
WindowSetShowing(CrystalPortal.WindowName .. "DungeonLabel", dungeon )
WindowSetShowing(CrystalPortal.WindowName .. "MoongateButton", moongate)
WindowSetShowing(CrystalPortal.WindowName .. "MoongateLabel", moongate)
WindowSetShowing(CrystalPortal.WindowName .. "BankButton", bank)
WindowSetShowing(CrystalPortal.WindowName .. "BankLabel", bank)
end
Comments
could I suggest you copy the shrine portal menu? That’s really nice one”