diff --git a/PremadeAge.toc b/PremadeAge.toc new file mode 100644 index 0000000..9c8cff6 --- /dev/null +++ b/PremadeAge.toc @@ -0,0 +1,6 @@ +## Interface: 60200 +## Title: PremadeAge +## Author: Gio +## Version: 1.0 + +main.lua \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..adb147a --- /dev/null +++ b/README.md @@ -0,0 +1,12 @@ +# PremadeAge + +Display the age of a group in the LFG list. + +![Image](http://i.imgur.com/h5aWpcv.png) + +## Links +- [Curse](http://www.curse.com/addons/wow/premadeAge) +- [CurseForge](http://wow.curseforge.com/addons/premadeAge) + +## TODO +- none \ No newline at end of file diff --git a/main.lua b/main.lua new file mode 100644 index 0000000..2df99ff --- /dev/null +++ b/main.lua @@ -0,0 +1,12 @@ + +-- http://wowprogramming.com/utils/xmlbrowser/test/FrameXML/LFGList.lua + +local function hook_LFGListSearchEntry_Update(self) + local resultID = self.resultID; + local id, activityID, name, comment, voiceChat, iLvl, age, numBNetFriends, numCharFriends, numGuildMates, isDelisted = C_LFGList.GetSearchResultInfo(resultID); + --local activityName = C_LFGList.GetActivityInfo(activityID); + --self.ActivityName:SetText(string.format("%s (%s)", activityName, SecondsToTime(age, false, false, 1, false))) + self.Name:SetText(string.format("%s (%s)", name, SecondsToTime(age, false, false, 1, false))) +end + +hooksecurefunc("LFGListSearchEntry_Update", hook_LFGListSearchEntry_Update);