simonseztech
06-06-2007, 11:18 PM
Hi,
I want my addon to hide himself when the player exit (or the battleground
end)
So far my addon popup a window when entering battleground but as soon
that I add code .. it doesn't popup anymore and won't close on exit.
I capture event UPDATE_BATTLEFIELD_STATUS to do this :
function BgMsg_Update_BattleField_Status()
local status, map, id, teamSize;
for i=1, MAX_BATTLEFIELD_QUEUES do
status, map, id, _, _, teamSize = GetBattlefieldStatus( i );
if( status == "active" and i ~= activeBF.id ) then
--activeBF.id = i;
BgMsg_showIncomingWindow();
end
end
end;
I tried simple else... to else if status~="active" ... all doesn't work.
any help or clue ?
thanks.
I want my addon to hide himself when the player exit (or the battleground
end)
So far my addon popup a window when entering battleground but as soon
that I add code .. it doesn't popup anymore and won't close on exit.
I capture event UPDATE_BATTLEFIELD_STATUS to do this :
function BgMsg_Update_BattleField_Status()
local status, map, id, teamSize;
for i=1, MAX_BATTLEFIELD_QUEUES do
status, map, id, _, _, teamSize = GetBattlefieldStatus( i );
if( status == "active" and i ~= activeBF.id ) then
--activeBF.id = i;
BgMsg_showIncomingWindow();
end
end
end;
I tried simple else... to else if status~="active" ... all doesn't work.
any help or clue ?
thanks.