Hi so I'm new, and quite a beginner in wow addons, I've looked all over the place, before coming here.
Does this code works ?
Code:
local _, stateh, scoreh = GetWorldStateUIInfo(2);
if (stateh == 2 and not hcarrier) or scoreh == 2 then
LeaveBattlefield()
end
local _, statea, scorea = GetWorldStateUIInfo(1);
if statea == 2 and scorea == 2 then
LeaveBattlefield()
end
It's a tiny modification I made of Capping. It's supposed to make me leave a battleground if :
- Horde hold the alliance flag and capping doesn't know who is holding it regardless of the score, Or Horde has 2 points out of 3 in the match, no matter what.
- Alliance has 2 points out of 3 and they hold horde flag
Apparently it doesn't do that, as I get out of the BG, if Alliance hold horde flag (and 0-0), when I just join in. It shouldn't.
Don't ask me why I want to do that, long story.
The score is a string ? does my scorea == 2 works ?
hcarrier should be nul at this point of the execution...
Thanks for any help.