Originally Posted by Choonstertwo
You're initialising the oEvents table as an array of strings (i.e. strings are values), but you're using it as if it were a hashset (i.e. strings are keys).
You should be initialising it like this:
lua Code:
local oEvents = { -- These are events that we can check for GOSSIP_SHOW = true, BANKFRAME_OPENED = true, GUILDBANKFRAME_OPENED = true }
|
It's simply checking if the event is in the table. It should still return valid.
Alternatively you could do this as well:
Lua Code:
local oEvents = {
"GOSSIP_SHOW",
"BANKFRAME_OPENED",
"GUILDBANKFRAME_OPENED"
}
if tContains(oEvents,event) then
ChatFrame1:Hide()
ChatFrame3:Hide()
ChatFrame1ButtonFrame:Hide()
ChatFrame3ButtonFrame:Hide()
ChatFrameMenuButton:Hide()
GeneralDockManager:Hide()
FriendsMicroButton:Hide()
else
ChatFrame1:Show()
ChatFrame3:Show()
ChatFrame1ButtonFrame:Show()
ChatFrame3ButtonFrame:Show()
ChatFrameMenuButton:Show()
GeneralDockManager:Show()
FriendsMicroButton:Show()
end