Thread Tools Display Modes
07-02-12, 01:48 PM   #1
Jarod24
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Jul 2012
Posts: 66
GetLFGMode() now requires an input argument. Anyone worked out the details yet?

UnitIsGroupLeader()
  • Returns either true,false or the inputted name, if you input "bob" and he does not exist in your group then the string "bob" will be returned.
  • Seems that if you call UnitIsGroupLeader with "party1", "raid2" etc and you are the leader yourself then it will still return false, "player" works tho.


This seems like it's the trend with the newer functions; that they are returning true/false instead of 1/nil.

IsInRaid() --true/false
IsInGroup() --true/false, will return true if you are in a raid as well as a party
 
07-02-12, 03:31 PM   #2
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by Jarod24 View Post
GetLFGMode() now requires an input argument. Anyone worked out the details yet?
https://github.com/Ketho/wow-ui-sour...e.lua#L391-393

Variables:
LE_LFG_CATEGORY_LFD
LE_LFG_CATEGORY_LFR
LE_LFG_CATEGORY_RF

Values:
1 (LookingForDungeon)
2 (LookingForRaid)
3 (RaidFinder)
 
07-02-12, 07:44 PM   #3
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by p3lim View Post
Anything printed in the chat doesnt show until someone actually says something (say, channels, /dump, emote, etc).
Happens with print() and DEFAULT_CHAT_FRAME:AddMessage()
I'm not seeing this problem either, and I have multiple addons using both print() and DEFAULT_CHAT_FRAME:AddMessage().

Originally Posted by Jarod24 View Post
GetLFGMode() now requires an input argument. Anyone worked out the details yet?
The values correspond to the indices in this table:
Code:
LFG_CATEGORY_NAMES = {
	[LE_LFG_CATEGORY_LFD] = LOOKING_FOR_DUNGEON,
	[LE_LFG_CATEGORY_RF] = RAID_FINDER,
	[LE_LFG_CATEGORY_SCENARIO] = SCENARIOS,
	[LE_LFG_CATEGORY_LFR] = LOOKING_FOR_RAID,
}
Defined here:
https://github.com/Ketho/wow-ui-sour...tants.lua#L706

I'm not actually sure what the difference between 2 and 4 is (Raid Finder vs Looking For Raid), since the Group Finder UI only shows 1-3. Possibly 4 is not used.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
 
07-02-12, 09:53 PM   #4
endx7
An Aku'mai Servant
 
endx7's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2005
Posts: 38
It appears that GetAddOnMetadata() is no longer returning data for X- prefixed TOC metadata fields.
 
07-03-12, 02:18 AM   #5
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
That and a couple of other issues are listed here:
http://www.wowpedia.org/Patch_5.0.1/...le_differences

Also updated my GlobalStrings repository with all locales (including the new itIT) to build 15799, here:
https://github.com/phanx/wow-globalstrings
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
 
07-08-12, 05:47 AM   #6
Talyrius
An Onyxian Warder
 
Talyrius's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 363
Originally Posted by endx7 View Post
It appears that GetAddOnMetadata() is no longer returning data for X- prefixed TOC metadata fields.
Does anyone know if this is an intentional change or an oversight? Perhaps TSquared can shed some light on the situation.
 
07-08-12, 05:54 AM   #7
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Couldn't you just add those variables directly to the addon namespace?
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
 
07-08-12, 07:57 AM   #8
Tuller
A Warpwood Thunder Caller
 
Tuller's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 91
Other addons may read the metadata for one reason or another (ex, some addon loaders).
 
07-03-12, 04:20 AM   #9
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
Originally Posted by Phanx View Post
I'm not actually sure what the difference between 2 and 4 is (Raid Finder vs Looking For Raid), since the Group Finder UI only shows 1-3. Possibly 4 is not used.
Looking for Raid still exists, it's the manual raid queueing thing that has existed for a long while. It's well hidden in the Raid tab of social frame though ('Other Raids' button).
 
07-03-12, 09:29 AM   #10
Jarod24
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Jul 2012
Posts: 66
Originally Posted by p3lim View Post
https://github.com/Ketho/wow-ui-sour...e.lua#L391-393

Variables:
LE_LFG_CATEGORY_LFD
LE_LFG_CATEGORY_LFR
LE_LFG_CATEGORY_RF

Values:
1 (LookingForDungeon)
2 (LookingForRaid)
3 (RaidFinder)
Thanks. I did some digging around in _G[] and found the argument for Scenarios aswell...

LE_LFG_CATEGORY_LFD = "1"
LE_LFG_CATEGORY_LFR = "2"
LE_LFG_CATEGORY_RF = "3"

LE_LFG_CATEGORY_SCENARIO = "4"


Code:
local mode, submode = GetLFGMode(LE_LFG_CATEGORY_SCENARIO);
 
07-03-12, 06:56 PM   #11
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
Is GetTexture() bugged? I've been struggling for ages with a buff reminder script which works on live but doesn't on beta. It behaves extremely strangely: GetTexture() (in this case at least) returns nil, while a valid texture is set. This code, for instance:

Code:
texture = select(3, GetSpellInfo(buff))
self.icon:SetTexture(texture)
print(texture)
print(self.icon:GetTexture())
Returns:

Interface\Icons\Spell_Holy_InnerFire
nil
The texture is set, though. Similarly, when I do it directly:

Code:
self.icon:SetTexture(select(3, GetSpellInfo(buff)))
The texture is set, but GetTexture() returns nil.
 
07-03-12, 08:39 PM   #12
Brusalk
An Aku'mai Servant
 
Brusalk's Avatar
AddOn Author - Click to view addons
Join Date: May 2010
Posts: 32
Does anyone know of an easy way to determine the player's active specialization? I've been digging through the interface code and I haven't found anything beyond maybe trying to manually set the talent frame to the active spec and checking PlayerTalentFrameSpecializationSpecButton(1-3).selected

(which is true if it is, the only problem being that it's only for the tab that's currently selected on the talent screen)


I must be missing something >.>
 
07-03-12, 09:33 PM   #13
Voyager
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 22
Originally Posted by Brusalk View Post
Does anyone know of an easy way to determine the player's active specialization? I've been digging through the interface code and I haven't found anything beyond maybe trying to manually set the talent frame to the active spec and checking PlayerTalentFrameSpecializationSpecButton(1-3).selected

(which is true if it is, the only problem being that it's only for the tab that's currently selected on the talent screen)


I must be missing something >.>
GetSpecializationInfo(GetSpecialization())


--------
It seems like the world's map size has become very inconsistent. Depending on where I measure it from, it gives me different results.

World's width and height in yards as measured from
Kalimdor: 59547.144977691 39698.085269174
Eastern: 59325.077732756 39550.030762135
Northrend: 56143.874550054 37429.26435188
Pandaria: 51274.202252344 34182.772393128
Maelstrom: ? ? (doesn't seem to be part of the world at all, like Outland)

Coordinates are completely broken in Dalaran, no player arrow appears on its map.


On live servers I always get around 47714 and 31809, regardless of which continent I derive it from.
 
07-04-12, 03:15 AM   #14
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Haleth View Post
Is GetTexture() bugged?
I don't know the answer to that specifically, but there is definitely some kind of issue going on with textures. In Grid, the NormalTexture on each unit button is hidden by setting its opacity to 0 with button:SetNormalTexture(1, 1, 1, 0). As far as I know, this is Pastamancer's original code that's been there since 2006. On the MoP beta servers, however, every frame's NormalTexture was set to a hideous neon green color, and button:GetNormalTexture():GetTexture() returned the number 0 instead of a string. The only way I could get rid of the awful green was to do button:SetNormalTexture("") to remove the texture entirely. Between there being no code in Grid or anywhere else that I could find that should be applying a neon green color to the NormalTexture of anything, and :GetTexture() returning a 0, I'd say there's definitely at least one bug they're (hopefully) working out.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
 
07-04-12, 03:22 AM   #15
Barjack
A Black Drake
AddOn Author - Click to view addons
Join Date: Apr 2009
Posts: 89
I noticed Skada's border texture when set to "none" is also that lime green colour in MoP beta, so it seems that issue is affecting other addons as well.
 
07-04-12, 03:55 AM   #16
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
I've been having major issues with textures aswell, mainly them not existing for the client after or before some event has fired, havent tested it too much.
 
07-04-12, 04:08 AM   #17
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Originally Posted by Phanx View Post
green texture thingy
That neon green texture error was in Cataclysm beta aswell. It had sth to do with texture loading and addon folders. (Sth like that...)
By the time the texture was set it was unknown to the system and resulted in a bright green texture instead.

Link: http://www.wowinterface.com/forums/s...ad.php?t=39960

Like p3lim wrote. If the texture is unknown to the client for whatever reason you get a bright green texture.

I'm currently having no texture errors but I'm still at the beginning.

@Haleth
What happens if you do this:
Lua Code:
  1. frame:SetTexture("Interface\\Icons\\Spell_Holy_InnerFire")
or
Lua Code:
  1. frame:SetTexture([[Interface\Icons\Spell_Holy_InnerFire]])

Afaik double backslashes are needed if the texture name is used directly. There is an alternative way to write it without the leading backslash. Phanx or p3lim should know it. Sth like [[TEXTUREPATH]] or [=[TEXTUREPATH]=]
https://github.com/haste/oUF/blob/4f...ction.lua#L116
__________________
| 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 : 07-04-12 at 04:28 AM.
 
07-04-12, 05:46 AM   #18
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by zork View Post
Afaik double backslashes are needed if the texture name is used directly. There is an alternative way to write it without the leading backslash. Phanx or p3lim should know it. Sth like [[TEXTUREPATH]] or [=[TEXTUREPATH]=]
Code:
"All \"special\" characters like \\ must be escaped."
Code:
[[All "special" characters like \ are fine as-is.
Also, line breaks work.

Even double line breaks!]]
Code:
[=[For when you want literal [[double brackets]] in your
"double bracketed string" with \backslashes and line breaks.]=]
Code:
[=======[For when you really like lots of equals signs,
or for some reason want a literal [=[ or [====[ in your string.
As long as there are the same number on both sides,
it doesn't matter how many there are.]=======]
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
 
08-24-12, 03:44 PM   #19
Peerly
An Aku'mai Servant
Join Date: Oct 2007
Posts: 31
Originally Posted by p3lim View Post
https://github.com/Ketho/wow-ui-sour...e.lua#L391-393

Variables:
LE_LFG_CATEGORY_LFD
LE_LFG_CATEGORY_LFR
LE_LFG_CATEGORY_RF

Values:
1 (LookingForDungeon)
2 (LookingForRaid)
3 (RaidFinder)
I'm trying to update the following bit of code and I just can't wrap my head around it, any help out there?

---- Queue Time ----
function nibMinimap:QueueTimeUpdate()
local lfgMode = GetLFGMode()
if lfgMode == "queued" then
local queueStr = ""
local hasData, _,_,_,_,_,_,_,_,_,_,_,_,_,_, myWait, queuedTime = GetLFGQueueStats()

if not hasData then
queueStr = LESS_THAN_ONE_MINUTE
else
local elapsedTime = GetTime() - queuedTime
local tiqStr = strform("%s", ConvertSecondstoTime(elapsedTime))
local awtStr = strform("%s", myWait == -1 and TIME_UNKNOWN or SecondsToTime(myWait, false, false, 1))
queueStr = strform("%s |cffc0c0c0(%s)|r", tiqStr, awtStr)
end

MMFrames.info.queue.text:SetText("|cffffa000Q:|r "..queueStr)
MMFrames.info.queue:SetWidth(MMFrames.info.queue.text:GetStringWidth() + 12)

-- Set to show Queue time
InfoShown.queue = true
else
-- Set to hide Queue time
InfoShown.queue = false
end
if not UpdateProcessing then
self:UpdateInfoPosition()
end
end
 
07-17-12, 05:33 PM   #20
Farmbuyer
A Cyclonian
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 43
Originally Posted by Jarod24 View Post
This seems like it's the trend with the newer functions; that they are returning true/false instead of 1/nil.
Makes sense. Lua didn't have a boolean type when those original functions were initially implemented. Even the upstream standard library used 1/nil returns.


IsInRaid() --true/false
IsInGroup() --true/false, will return true if you are in a raid as well as a party
Now that GetNumRaidMembers has morphed into GetNumGroupMembers, I wonder if GetRaidRosterInfo will return valid data while in a "plain" party? I'd like to think so, but haven't seen anything mentioned anywhere. Will try to test... sometime this week.


P.S.: I second Torhal's suggestion of getbeer/setbeer globals.
 
 

WoWInterface » Site Forums » Archived Beta Forums » MoP Beta archived threads » Beta API discussion


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