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)
 
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{wowapi}}
Get the winner of the battlefield


<center>'''GetBattlefieldWinner()''' ''-Documentation by [[user:Klishu|Klishu]]-''</center>
winner = GetBattlefieldWinner()
 
<!-- Describe the purpose of the function, exhausting detail can be saved for a later section -->
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 if you've won the current battleground. (nil for no; 1 for yes)
:;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 or 1 indicating whether the player has won the current battleground he is in. Returns nil if the player is not in a battleground or the battle still hasn't ended yet.
: Gets the winner of the battleground that the player is currently in.


----
{{wowapi}}
__NOTOC__

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