WoW:API QuestLogPushQuest: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
 
m (Move page script moved page API QuestLogPushQuest to API QuestLogPushQuest without leaving a redirect)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<center>'''QuestLogPushQuest''' ''-Documentation by Myrathi-''</center>
{{wowapi}} __NOTOC__
 
Initiates the sharing of the currently viewed quest in the quest log with other players.
Initiates the sharing of the currently viewed quest in the quest log with other players.
  QuestLogPushQuest();
  QuestLogPushQuest();


----
==Example==
;''Arguments''
local i = 0;
 
while (GetQuestLogTitle(i+1) ~= nil) do
:''none''
  i = i + 1;
 
  local title, level, tag, header = GetQuestLogTitle(i);
----
  if (not header) then
;''Returns''
  SelectQuestLogEntry(i);
 
  if (GetQuestLogPushable()) then
:''<unknown>''
     QuestLogPushQuest();
 
    DEFAULT_CHAT_FRAME:AddMessage(string.format("Attempting to share %s [%d] with your group...", title, level));
----
     return;
;''Example''
  end
  <Button name="QuestFramePushQuestButton" inherits="UIPanelButtonTemplate" text="SHARE_QUEST">
   end
    ...
end
     <Scripts>
===Result===
      <OnClick>
Finds and shares the first sharable quest in your quest log.
        QuestLogPushQuest();
      </OnClick>
      ...
     </Scripts>
   </Button>
 
;''Result''
''<unknown>''
 
----
;''Description''
 
: Attempt to share (push) the currently loaded quest in the quest window with other players.
: The system only attempts to push the quest to grouped players and will fail if a recipient is out of range (typically trading range), does not qualify for the quest (too low level or hasn't completed prior chain-quests) or has already completed it.
 
 
: Code sample taken from ''\Interface\FrameXML\QuestLogFrame.xml:433'' (#4150)


----
==Notes==
{{Template:WoW API}}
The system only attempts to push the quest to grouped players and will fail if a recipient is out of range (typically trading range), does not qualify for the quest (too low level or hasn't completed prior chain-quests) or has already completed it.

Latest revision as of 04:47, 15 August 2023

WoW API < QuestLogPushQuest

Initiates the sharing of the currently viewed quest in the quest log with other players.

QuestLogPushQuest();

Example[edit]

local i = 0;
while (GetQuestLogTitle(i+1) ~= nil) do
 i = i + 1;
 local title, level, tag, header = GetQuestLogTitle(i);
 if (not header) then
  SelectQuestLogEntry(i);
  if (GetQuestLogPushable()) then
   QuestLogPushQuest();
   DEFAULT_CHAT_FRAME:AddMessage(string.format("Attempting to share %s [%d] with your group...", title, level));
   return;
  end
 end
end

Result[edit]

Finds and shares the first sharable quest in your quest log.

Notes[edit]

The system only attempts to push the quest to grouped players and will fail if a recipient is out of range (typically trading range), does not qualify for the quest (too low level or hasn't completed prior chain-quests) or has already completed it.