Thread Tools Display Modes
12-14-09, 01:26 PM   #1
Jooze
A Wyrmkin Dreamwalker
 
Jooze's Avatar
AddOn Compiler - Click to view compilations
Join Date: Jul 2007
Posts: 52
Get Group Rolls

Let's say i'm in a normal heroic group and we have group roll enabled.
An epic drops, I get it's rollID and with that also the item name and additional information with

Code:
local texture, name, count, quality, bindOnPickUp = GetLootRollItemInfo(GroupLootFrame1.rollID);
But now I want to get the rolls all players (us 5 in that heroic group) have made and list them in a Font String.

How would I get the other players rolls? Would I have to intercept the chat frame (with someframe:RegisterEvent("CHAT_MSG_CHANNEL") for example) and how would I scan the chat for rolls?
  Reply With Quote
12-14-09, 06:07 PM   #2
Akryn
A Firelord
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 479
I should point out that I've never done this. There are mods out there that do do it and they are probably a good place to look. It appears though that the event is "CHAT_MSG_LOOT" and its arg1 is the whole chat message, parse it with e.g.

Code:
local name, roll, item
name, roll, item = arg1:match((LOOT_ROLL_ROLLED:gsub("%d","%s")):format("(.+)","(.+)",".+",".+",".+",".+","(.+)",".+"))
if not name then
     name = UnitName("player")
     roll, item = arg1:match((LOOT_ROLL_ROLLED_SELF:gsub("%d","%s")):format("(.+)",".+",".+",".+",".+","(.+)",".+"))
end
if not roll then return end
(YMMV, that code is *very* untested )

Last edited by Akryn : 12-14-09 at 06:09 PM.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Get Group Rolls

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