WoW:API IsUnitOnQuest: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
mNo edit summary
m (Move page script moved page API IsUnitOnQuest to API IsUnitOnQuest without leaving a redirect)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{wowapi}}
Returns whether the passed unit is on the passed quest.  
Returns whether the passed unit is on the passed quest.  


Line 27: Line 28:


*Returns whether the specified unit is on the specified quest. One can use any of the defined [[API TYPE UnitId|UnitId]] values so long as it refers to a unit in the party or raid.
*Returns whether the specified unit is on the specified quest. One can use any of the defined [[API TYPE UnitId|UnitId]] values so long as it refers to a unit in the party or raid.
----
{{template:WoW API}}

Latest revision as of 04:46, 15 August 2023

WoW API < IsUnitOnQuest

Returns whether the passed unit is on the passed quest.

IsUnitOnQuest(questIndex, "unit")


Arguments
(questIndex, "unit")
questIndex
Integer - The index of the quest to check for
unit
String - The UnitId to select as a target.

Returns
bool

Example
   if IsUnitOnQuest(0, "player")  then
       SendChatMessage("i am on my quest", "SAY", "Common", "General")
   end
Result
   <1. General>Player: "i am on my quest";

Description
  • Returns whether the specified unit is on the specified quest. One can use any of the defined UnitId values so long as it refers to a unit in the party or raid.