-
Posted by voraga on Thu, 22 Nov 2012 20:06:13
Hi!
I'm a lua beginner, trying to make a simple addon work as desired. It's a miniature panel that lets me queue for random bgs, arenas and LFDs through a simple click. I'm having a problem with the battleground queue, however. It works initially, queues me up for a bg if solo, and also queues as group. When I leave the battleground it wont let me re-queue, unless I reload the UI. I have tried variants of
self:RegisterEvent("ZONE_CHANGED_NEW_AREA")
but just don't know what is wrong. The function itself looks like this:function Qup_NumCall(arg1) local location = nil if (arg1==1) then if(CanJoinBattlefieldAsGroup()) then JoinBattlefield(0,1) -- join battlefield as group else JoinBattlefield(0,0) -- join battlefield as single player end elseif (arg1==2) then JoinArena() elseif (arg1==3) then LFDQueueFrame_Join() end end
The arena queue seems to work fine. In the xml I have scripts like these:
<OnLoad>Qup_OnLoad(self);</OnLoad> <OnEvent>Qup_OnEvent(self, event, ...);</OnEvent>
Any ideas? Much appreciated :)