API:GetZonePairing
From RoR Wiki
UI Lua API · Map functions
Version: WAR 1.4.8
Returns the racial pairing of the zone the player is in.
pairing = GetZonePairing()
Arguments
None.
Returns
- pairing
number– Pairing id of the player's current zone:1,2,3or100. Nothing is returned if the zone has no pairing. The stock UI compares the value withGameData.Pairingconstants.
Details
- The value comes from the client's zone data for the player's current zone. Values other than 1, 2, 3 and 100 in that data are treated as "no pairing".
- The function takes no zone argument; it always uses the current zone.
Errors
None.
Example
From default/easystem_strings/source/stringutils.lua:
function StringUtils.GetFriendlyRaceForCurrentPairing( currentPairing, inCaps )
local pairingId = currentPairing or GetZonePairing()
local realmId = GameData.Player.realm
return StringUtils.GetRaceNameNounFromPairingAndRealm( pairingId, realmId, inCaps )
end
