WoW:API GetBattlefieldWinner: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
 
m (Move page script moved page API GetBattlefieldWinner to API GetBattlefieldWinner without leaving a redirect)
 
(8 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; 1 for Alliance; 2 for Horde)
:;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 integer value which can be either nil, 1 or 2 indicating the winner of the current battleground the player is in. If the player isn't in a battleground or it's still not finished 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