<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://addonstudio.org/mw1/index.php?action=history&amp;feed=atom&amp;title=WoW%3AAPI_UnitInBattleground</id>
	<title>WoW:API UnitInBattleground - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://addonstudio.org/mw1/index.php?action=history&amp;feed=atom&amp;title=WoW%3AAPI_UnitInBattleground"/>
	<link rel="alternate" type="text/html" href="https://addonstudio.org/mw1/index.php?title=WoW:API_UnitInBattleground&amp;action=history"/>
	<updated>2026-06-01T20:11:29Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://addonstudio.org/mw1/index.php?title=WoW:API_UnitInBattleground&amp;diff=20142&amp;oldid=prev</id>
		<title>Move page script: Move page script moved page API UnitInBattleground to WoW:API UnitInBattleground without leaving a redirect</title>
		<link rel="alternate" type="text/html" href="https://addonstudio.org/mw1/index.php?title=WoW:API_UnitInBattleground&amp;diff=20142&amp;oldid=prev"/>
		<updated>2023-08-15T04:47:45Z</updated>

		<summary type="html">&lt;p&gt;Move page script moved page &lt;a href=&quot;/wiki/WoW:API_UnitInBattleground&quot; title=&quot;WoW:API UnitInBattleground&quot;&gt;API UnitInBattleground&lt;/a&gt; to &lt;a href=&quot;/wiki/WoW:API_UnitInBattleground&quot; title=&quot;WoW:API UnitInBattleground&quot;&gt;API UnitInBattleground&lt;/a&gt; without leaving a redirect&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 04:47, 15 August 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Move page script</name></author>
	</entry>
	<entry>
		<id>https://addonstudio.org/mw1/index.php?title=WoW:API_UnitInBattleground&amp;diff=20141&amp;oldid=prev</id>
		<title>WoWWiki&gt;CosmicCleric: Created page with &quot;{{wowapi}} __NOTOC__   &lt;!-- Describe the purpose of the function, exhausting detail can be saved for a later section --&gt; Used to determine the position number of the specified un…&quot;</title>
		<link rel="alternate" type="text/html" href="https://addonstudio.org/mw1/index.php?title=WoW:API_UnitInBattleground&amp;diff=20141&amp;oldid=prev"/>
		<updated>2010-12-07T01:20:52Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{wowapi}} __NOTOC__   &amp;lt;!-- Describe the purpose of the function, exhausting detail can be saved for a later section --&amp;gt; Used to determine the position number of the specified un…&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{wowapi}} __NOTOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Describe the purpose of the function, exhausting detail can be saved for a later section --&amp;gt;&lt;br /&gt;
Used to determine the position number of the specified unit in the battleground raid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- List return values and arguments as well as function name, follow Blizzard usage convention for args --&amp;gt;&lt;br /&gt;
 position = UnitInBattleground(&amp;quot;unit&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
=== Arguments ===&lt;br /&gt;
&amp;lt;!-- List each argument, together with its type --&amp;gt;&lt;br /&gt;
:(&amp;quot;unit&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
:;unit : String - The [[API TYPE UnitId|UnitId]] to query (e.g. &amp;quot;player&amp;quot;, &amp;quot;party2&amp;quot;, &amp;quot;pet&amp;quot;, &amp;quot;target&amp;quot; etc.)&lt;br /&gt;
&lt;br /&gt;
=== Returns ===&lt;br /&gt;
&amp;lt;!-- List each return value, together with its type --&amp;gt;&lt;br /&gt;
:;position : Number - The position in the battleground raid of the specified unit, &amp;quot;nil&amp;quot; if outside of the battleground, and 0 if &amp;quot;unit&amp;quot; is &amp;quot;player&amp;quot; and player is the last person left standing inside of a finished battleground.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;!-- If it helps, include an example here, though it&amp;#039;s not required if the usage is self-explanatory --&amp;gt;&lt;br /&gt;
&amp;lt;!-- begin code --&amp;gt;&lt;br /&gt;
 local position = UnitInBattleground(&amp;quot;player&amp;quot;);&lt;br /&gt;
 ChatFrame1:AddMessage(&amp;#039;Position in battleground raid: &amp;#039; .. (position or &amp;quot;(?)&amp;quot;));&lt;br /&gt;
&amp;lt;!-- end code --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Result====&lt;br /&gt;
&amp;lt;!-- If it helps, include example results here, though they are not required. You&amp;#039;re allowed to cheat liberally since WoW isn&amp;#039;t a command line language. --&amp;gt;&lt;br /&gt;
:Prints the player&amp;#039;s position number in the battleground raid. e.g. (depending on number left in battleground raid when call is made)&lt;br /&gt;
&amp;lt;!-- begin code --&amp;gt;&lt;br /&gt;
 Position in battleground raid: (?)&lt;br /&gt;
&lt;br /&gt;
 Position in battleground raid: 0&lt;br /&gt;
&lt;br /&gt;
 Position in battleground raid: 12&lt;br /&gt;
&amp;lt;!-- end code --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Details==&lt;br /&gt;
&amp;lt;!-- Details not appropriate for the main description can go here. &lt;br /&gt;
     REMOVE the section if you&amp;#039;re just going to restate the intro line! --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If &amp;#039;UnitInBattleground(&amp;quot;player&amp;quot;)&amp;#039; call is made ...&lt;br /&gt;
&lt;br /&gt;
 Returns nil if outside of a battleground.&lt;br /&gt;
&lt;br /&gt;
 Returns &amp;#039;0&amp;#039; if you are the last person inside of a battleground &lt;br /&gt;
 after the match is over, and everybody else has left.&lt;br /&gt;
&lt;br /&gt;
 Returns 1-#, where # is the maximum number of players allowed &lt;br /&gt;
 in the battleground raid.&lt;/div&gt;</summary>
		<author><name>WoWWiki&gt;CosmicCleric</name></author>
	</entry>
</feed>