WoW:API GetBattlefieldWinner: Difference between revisions

Cleaned up a bit, and added info about it being broken in 2.3.0
(Cleaned up a bit, and added info about it being broken in 2.3.0)
Line 1: Line 1:
Get the winner of the battleground
Get the winner of the battlefield


  battlefieldWinner = GetBattlefieldWinner()
  winner= GetBattlefieldWinner()


== Parameters ==
== Parameters ==
=== Arguments ===
None
=== Returns ===
=== Returns ===
:battlefieldWinner
:winner


:;battlefieldWinner: 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==


: Gets the winner of the current battleground that the player is inside.
: Gets the winner of the current battleground that the player is inside.
: Within the scope of arena winners, the integer returned is the index of the arena team. Read the documentation for [[API GetBattlefieldTeamInfo|GetBattlefieldTeamInfo]] for more information. [[User:Salanex|Salanex]] 00:00, 16 February 2007 (EST)
 
==Notes==
 
: Currently in Patch 2.3.0 this is broken and returning nil when nobody has won, and 255 if someone has won regardless of faction or team


----
----
__NOTOC__
{{wowapi}}
{{wowapi}}
Anonymous user