IsActiveWorldBattleground
ESO Lua API function — used by 85 of the 3,030 addons we indexed (combined 13,365,309 downloads). Signature from the official ESOUIDocumentation.txt, API version 101050.
Official signature
IsActiveWorldBattleground()Returns: bool isInBattleground
Real usage — from LibSets (All set items ingame & preview. lua API + excel sheet)
--If we are in a Battleground: Return the custom zoneId of LibSets
if IsActiveWorldBattleground() then
return LIBSETS_SPECIAL_ZONEID_BATTLEGROUNDS, LIBSETS_SPECIAL_ZONEID_BATTLEGROUNDS, LIBSETS_SPECIAL_ZONEID_BATTLEGROUNDS, Short excerpt from the shipping addon LibSets (All set items ingame & preview. lua API + excel sheet) — its ESOUI page; the code belongs to its author. Shown because documentation without a working example is half a reference.
Most-downloaded addons using it
| Addon | Total downloads |
|---|---|
| LibSets (All set items ingame & preview. lua API + excel sheet) | 4,357,189 |
| HodorReflexes - DPS & ULT tracker | 3,446,840 |
| LibZone | 1,937,031 |
| Kill Counter | 577,202 |
| OdySupportIcons - Group Role Icons & More | 484,590 |
| Combat Metronome (GCD Tracker) | 483,791 |