<?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_UnitIsEnemy</id>
	<title>WoW:API UnitIsEnemy - 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_UnitIsEnemy"/>
	<link rel="alternate" type="text/html" href="https://addonstudio.org/mw1/index.php?title=WoW:API_UnitIsEnemy&amp;action=history"/>
	<updated>2026-06-02T00:43:42Z</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_UnitIsEnemy&amp;diff=18988&amp;oldid=prev</id>
		<title>Move page script: Move page script moved page API UnitIsEnemy to WoW:API UnitIsEnemy without leaving a redirect</title>
		<link rel="alternate" type="text/html" href="https://addonstudio.org/mw1/index.php?title=WoW:API_UnitIsEnemy&amp;diff=18988&amp;oldid=prev"/>
		<updated>2023-08-15T04:47:46Z</updated>

		<summary type="html">&lt;p&gt;Move page script moved page &lt;a href=&quot;/wiki/WoW:API_UnitIsEnemy&quot; title=&quot;WoW:API UnitIsEnemy&quot;&gt;API UnitIsEnemy&lt;/a&gt; to &lt;a href=&quot;/wiki/WoW:API_UnitIsEnemy&quot; title=&quot;WoW:API UnitIsEnemy&quot;&gt;API UnitIsEnemy&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;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&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;!-- diff cache key addonstu_asmw2:diff::1.12:old-18987:rev-18988 --&gt;
&lt;/table&gt;</summary>
		<author><name>Move page script</name></author>
	</entry>
	<entry>
		<id>https://addonstudio.org/mw1/index.php?title=WoW:API_UnitIsEnemy&amp;diff=18987&amp;oldid=prev</id>
		<title>WoWWiki&gt;Flid: /* Returns */ 
Value seems to have updated to boolean.  Failed with [ 1 ], failed with [ &quot;true&quot; ], success with [ true ]</title>
		<link rel="alternate" type="text/html" href="https://addonstudio.org/mw1/index.php?title=WoW:API_UnitIsEnemy&amp;diff=18987&amp;oldid=prev"/>
		<updated>2014-11-10T22:26:53Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Returns: &lt;/span&gt;  Value seems to have updated to boolean.  Failed with [ 1 ], failed with [ &amp;quot;true&amp;quot; ], success with [ true ]&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 22:26, 10 November 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l12&quot;&gt;Line 12:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 12:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Returns ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Returns ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;:&lt;/del&gt;;IsEnemy: &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Returns either nil &lt;/del&gt;or &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;not a &lt;/del&gt;boolean &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;value&lt;/del&gt;.&amp;lt;br&amp;gt;If the second parameter is &amp;quot;target&amp;quot; and nothing is targeted, this function returns &amp;lt;tt&amp;gt;nil&amp;lt;/tt&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;IsEnemy: &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;true &lt;/ins&gt;or &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;false&lt;/ins&gt;, boolean.&amp;lt;br&amp;gt;If the second parameter is &amp;quot;target&amp;quot; and nothing is targeted, this function returns &amp;lt;tt&amp;gt;nil&amp;lt;/tt&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Example ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Example ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key addonstu_asmw2:diff::1.12:old-18986:rev-18987 --&gt;
&lt;/table&gt;</summary>
		<author><name>WoWWiki&gt;Flid</name></author>
	</entry>
	<entry>
		<id>https://addonstudio.org/mw1/index.php?title=WoW:API_UnitIsEnemy&amp;diff=18986&amp;oldid=prev</id>
		<title>WoWWiki&gt;Cowlinator: New page: {{wowapi}} This function will determine if the target is hostile towards you.   == Parameters ==  === Function === :;UnitIsEnemy : UnitIsEnemy(&quot;unit&quot;,&quot;otherunit&quot;)&lt;br&gt;Determine whether a un...</title>
		<link rel="alternate" type="text/html" href="https://addonstudio.org/mw1/index.php?title=WoW:API_UnitIsEnemy&amp;diff=18986&amp;oldid=prev"/>
		<updated>2009-01-17T08:56:13Z</updated>

		<summary type="html">&lt;p&gt;New page: {{wowapi}} This function will determine if the target is hostile towards you.   == Parameters ==  === Function === :;UnitIsEnemy : UnitIsEnemy(&amp;quot;unit&amp;quot;,&amp;quot;otherunit&amp;quot;)&amp;lt;br&amp;gt;Determine whether a un...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{wowapi}}&lt;br /&gt;
This function will determine if the target is hostile towards you. &lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
=== Function ===&lt;br /&gt;
:;UnitIsEnemy : UnitIsEnemy(&amp;quot;unit&amp;quot;,&amp;quot;otherunit&amp;quot;)&amp;lt;br&amp;gt;Determine whether a unit is hostile to you or not.&lt;br /&gt;
&lt;br /&gt;
=== Arguments ===&lt;br /&gt;
:;unit:String - The [[API TYPE UnitId|UnitId]] of the first unit.&lt;br /&gt;
:;otherunit:String - The [[API TYPE UnitId|UnitId]] of the unit to compare with the first unit.&lt;br /&gt;
&lt;br /&gt;
=== Returns ===&lt;br /&gt;
:;IsEnemy: Returns either nil or 1, not a boolean value.&amp;lt;br&amp;gt;If the second parameter is &amp;quot;target&amp;quot; and nothing is targeted, this function returns &amp;lt;tt&amp;gt;nil&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
:;IsEnemy : /script if (UnitIsEnemy(&amp;quot;player&amp;quot;,&amp;quot;target&amp;quot;)) then DEFAULT_CHAT_FRAME:AddMessage( &amp;quot;target health =&amp;quot;..UnitHealth(&amp;quot;target&amp;quot;) ); end &amp;lt;br&amp;gt; This will determine if your target is hostile, and if it is, it will print the target&amp;#039;s health to the chat frame.&lt;br /&gt;
&lt;br /&gt;
:;Not IsEnemy : /script if not (UnitIsEnemy(&amp;quot;player&amp;quot;,&amp;quot;target&amp;quot;)) then SendChatMessage(&amp;quot;Don&amp;#039;t shoot!  It&amp;#039;s %t!&amp;quot;,&amp;quot;SAY&amp;quot;); end; &amp;lt;br&amp;gt; This is to find if the target is not hostile with you (friendly). If you target an friendly target with the name &amp;quot;60Mage&amp;quot; this script will write &amp;quot;Don&amp;#039;t shoot!  It&amp;#039;s 60Mage!&amp;quot; in /s, using your faction&amp;#039;s default language.&lt;/div&gt;</summary>
		<author><name>WoWWiki&gt;Cowlinator</name></author>
	</entry>
</feed>