WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   Get Group Rolls (https://www.wowinterface.com/forums/showthread.php?t=29249)

Jooze 12-14-09 01:26 PM

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?

Akryn 12-14-09 06:07 PM

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 :p)


All times are GMT -6. The time now is 07:55 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI