Thread Tools Display Modes
11-28-12, 08:11 AM   #1
shurshik
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 31
What is an API to detect that I am in LFG party 5ppl

Hi,
is there any API to detect that I am in LFG party 5ppl? (not LFR, just LFG)
  Reply With Quote
11-28-12, 08:59 AM   #2
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,360
IsLFGModeActive(LE_LFG_CATEGORY_LFD)
  Reply With Quote
11-28-12, 09:04 AM   #3
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
This. Plus you can check GetInstanceInfo.

http://wowprogramming.com/docs/api/GetInstanceInfo

Lua Code:
  1. local checkStatus = function()
  2.   local name, type, difficulty, difficultyName, maxPlayers, playerDifficulty, isDynamicInstance = GetInstanceInfo()
  3.   if type = "party" and GetNumGroupMembers() > 0 and not UnitInRaid("player") then
  4.     print("I'm in a party")
  5.   end
  6. end
  7.  
  8. local a = CreateFrame("Frame")
  9. a:SetScript("OnEvent", checkStatus)
  10. a:RegisterEvent("PLAYER_ENTERING_WORLD")
  11. a:RegisterEvent("PARTY_MEMBERS_CHANGED")
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 11-28-12 at 09:07 AM.
  Reply With Quote
11-28-12, 09:18 AM   #4
shurshik
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 31
GetInstanceInfo:
shows LFR (number 8) but doesn't show LFG... type == "party" even if I am in LFG group

Update:
/script print (IsLFGModeActive(LE_LFG_CATEGORY_LFD))
works, thanks! Lost more than 3 hours to find it...

Last edited by shurshik : 11-28-12 at 09:38 AM.
  Reply With Quote
11-28-12, 02:33 PM   #5
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Pro-Tip. Grap Total Commander and do a text string search over the FrameXML folder.

You can grab the latest WoW UI Source here: https://github.com/tekkub/wow-ui-sou...chive/live.zip

Searching for "LFG" would hit the nail on the head.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » What is an API to detect that I am in LFG party 5ppl

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off