WoW:API GetZonePVPInfo: Difference between revisions

m
Move page script moved page API GetZonePVPInfo to WoW:API GetZonePVPInfo without leaving a redirect
(→‎Returns: Clarified)
m (Move page script moved page API GetZonePVPInfo to WoW:API GetZonePVPInfo without leaving a redirect)
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{wowapi}} __NOTOC__
{{wowapi}}
Returns PVP info for the current zone.
Returns PVP info for the current zone.
  pvpType, isFFA, faction = GetZonePVPInfo();
  pvpType, isFFA, faction = GetZonePVPInfo();
Line 6: Line 6:
===Returns===
===Returns===
:;pvpType : String - One of the following values:
:;pvpType : String - One of the following values:
:::*"arena", if you are in an arena
:::*"friendly", if the zone is controlled by the faction the player belongs to.
:::*"friendly", if the zone is controlled by the faction the player belongs to.
:::*"contested" if the zone is contested (PvP server only)
:::*"contested" if the zone is contested (PvP server only)
:::*"hostile", if the zone is controlled by the opposing faction.
:::*"hostile", if the zone is controlled by the opposing faction.
:::*"sanctuary", if the zone is a sanctuary and does not allow pvp combat (2.0.x).
:::*"sanctuary", if the zone is a sanctuary and does not allow pvp combat (2.0.x).
:::*nil, if the zone isn't friendly, hostile or a sanctuary, should only happen on a PvE server since theres no contested zones
:::*"combat", if it is a combat zone where players are automatically flagged for PvP combat (3.0.x). Currently applies only to the [[Wintergrasp]] zone.
:::*nil, if the zone is none of the above. Happens inside instances, ''including battlegrounds'', and on PvE servers when the zone would otherwise be "contested".
:;isFFA : Integer - 1 if in a free-for-all arena, nil otherwise.
:;isFFA : Integer - 1 if in a free-for-all arena, nil otherwise.
:;faction : String - the name of the faction controlling the zone if pvpType is "friendly" or "hostile".
:;faction : String - the name of the faction controlling the zone if pvpType is "friendly" or "hostile".


==Example==
==Example==
Anonymous user