WoW:API GetBattlefieldWinner: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(→‎Returns: Returns nil, 0 or 1 not nil, 1, 2)
m (Move page script moved page API GetBattlefieldWinner to API GetBattlefieldWinner without leaving a redirect)
 
(7 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<center>'''GetBattlefieldWinner()''' ''-Documentation by [[user:Klishu|Klishu]]-''</center>
Get the winner of the battlefield


<!-- Describe the purpose of the function, exhausting detail can be saved for a later section -->
winner = GetBattlefieldWinner()
Returns an integer value based on the winner of the Battleground.
 
<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->
winnerCode = GetBattlefieldWinner()


== Parameters ==
== Parameters ==
=== Arguments ===
<!-- List each argument, together with its type -->
None
=== Returns ===
=== Returns ===
<!-- List each return value, together with its type -->
:winner
:winnerCode


:;winnerCode : integer - A code indicating the battleground winner. (nil for no one; 0 for Horde; 1 for Alliance)
:;winner: Integer - Faction/team that has won the battlefield. Results are: nil if nobody has won, 0 for Horde and 1 for Alliance in a battleground, 0 for Green Team and 1 for Yellow in an arena.


==Details==
==Details==
<!-- Details not appropriate for the main description can go here -->


: Returns an interger value which can be nil, 0 or 1 indicating the winner of the current battleground the player is in. If the battleground isn't finished or they aren't inside one nil is returned.
: Gets the winner of the battleground that the player is currently in.


----
{{wowapi}}
__NOTOC__
{{Template:WoW API}}

Latest revision as of 04:45, 15 August 2023

Get the winner of the battlefield

winner = GetBattlefieldWinner()

Parameters[edit]

Returns[edit]

winner
winner
Integer - Faction/team that has won the battlefield. Results are: nil if nobody has won, 0 for Horde and 1 for Alliance in a battleground, 0 for Green Team and 1 for Yellow in an arena.

Details[edit]

Gets the winner of the battleground that the player is currently in.

WoW API < GetBattlefieldWinner