Did something change about the GetGuildRosterInfo function recently? I have an addon that registers for GUILD_ROSTER_UPDATE and calls GuildRoster(). In the event handler, it calls GetGuildRosterInfo a bunch of times to get info for people. However, since like 2 days ago, sometimes GetGuildRosterInfo returns nil for character name (the first return).
I tried using message filters and it had the problem I had above. Fixed the old AddMessage hook I had but forgot to remove the message filters and re-add the hooks.
Did they change something about how the dropdown that shows up when you right click a player link in chat works? Before, if I changed the player name (the stuff inside |h |h), everything worked just fine. However, now (post 4.0) when I do this, I get the following results:
Because it for some reason thinks the player's name is "Laud (TestNote)", when I try to whisper or invite through this dropdown, it fails because the player doesn't exist.
1) Does anyone know if something changed about this behavior in the 4.0 patch?
2) Any way to avoid this problem? I basically copied Phanx's code from above.
I wrote a mod (ForumName2 on WoWI) a while back that pastes a custom note next to peoples' names in chat messages by running the code below in a hook of ChatFrame.AddMessage for each chat frame. In the post 4.0 UI code though, the code below doesn't do anything because "event" doesn't exist.
function ForumName2:AddMessage(frame, msg, ...)
if(event == "CHAT_MSG_SYSTEM") then
for i, info in pairs(systemMessageInfo) do
local output = self:SystemMessageHelper(msg, info, string_match(msg, info.pattern))
if(output) then
msg = output
break
end
end
elseif(chatEvents[event]) then
local note = self:GetNote(arg2)
if note then
msg = string_gsub(msg, "|h(.*)" .. arg2 .. "(.*)|h", "|h%1" .. arg2 .. " (" .. note .. ")" .. "%2|h", 1)
end
end
self.hooks[frame]["AddMessage"](frame, msg, ...)
end
I tried changing this to use the chat message filter system, but the message you are passed in a chat filter does not contain the full formatting so I can't put the note next to the player's name as in the above code. I also tried just changing the name (which IS passed to you in the chat filter) but this causes issues with display in further messages.
So, I'm looking for a way to either a) get access to "event" in ChatFrame_AddMessage or b) accomplish the above using chat message filters. Any ideas?
Thanks, changing to maximized windowed mode did in fact fix the OnUpdate bug. However, I have a new issue now. As far as I can tell, the "propagation" for changing the sound setting isn't time based - it requires me to actually alt-tab back into the game for at least some sliver of time. Is there some better way of doing what I'm trying to do or am I just SOL?
I'm trying to write a little mod for myself that turns on background sound when a ready check fires because I tend to alt-tab a lot during downtime in raids but don't want background sound on all the time.
My problem is that setting background sound to on seems to take some time to propagate or something. Using the code I have below, the first time I get a ready check, the bg sound setting gets turned on but I can't hear the sound in the background. However, without changing anything else, if I send a second ready check, that one works. Does anyone know how to avoid this issue (or a better way to do what I'm trying to do)? Thanks.
local frame = CreateFrame("FRAME", nil, ReadyCheckListenerFrame)
ReadyCheckListenerFrame:SetScript("OnShow", nil)
local bgSound = nil
local function BgSoundOn()
bgSound = BlizzardOptionsPanel_GetCVarSafe("Sound_EnableSoundWhenGameIsInBG")
if(bgSound == 0) then
AudioOptionsSoundPanelSoundInBG:SetValue(1)
end
print(BlizzardOptionsPanel_GetCVarSafe("Sound_EnableSoundWhenGameIsInBG"))
end
local function BgSoundOff()
if(bgSound == 0) then
AudioOptionsSoundPanelSoundInBG:SetValue(0)
end
end
function ReadyCheckListenerFrame_OnShow()
print("ReadyCheckListenerFrame_OnShow")
BgSoundOn()
PlaySound("ReadyCheck")
--BgSoundOff()
end
frame:SetScript("OnShow", ReadyCheckListenerFrame_OnShow)
Heh, sorry, there's just a lot of it so I was trying to keep it simple. Pasted here: http://paste.wowace.com/1653/. The function ObjectiveDisplayHandler is the WatchFrame_UpdateHook I described above, SetTrackerPosition sets the anchor point, and SaveTrackerPosition updates the saved top, bottom, left, and right positions. The call in question is the commented out one on line 1155 - if I comment it out, everything works fine but if I put it in, suddenly the lines sometimes just don't show up.
Updated the original post with a simplified version of what each of the functions does. WatchFrameLineTemplate is defined in WatchFrame.xml (it's basically a frame with a font string that's defined in line.text).
To clarify my point about the frames being visible as far as I can tell, I also checked (using GetPoint) to make sure each line has a valid anchor and that WatchFrameLines (the frame the lines are parented to) has a valid anchor.
0
Given a block of frame XML like this, how do I pass the arguments to OnUpdate? Do "self" and "elapsed" just exist for the duration of this function?
0
0
Anybody know why this might be happening?
0
I tried using message filters and it had the problem I had above. Fixed the old AddMessage hook I had but forgot to remove the message filters and re-add the hooks.
0
Because it for some reason thinks the player's name is "Laud (TestNote)", when I try to whisper or invite through this dropdown, it fails because the player doesn't exist.
1) Does anyone know if something changed about this behavior in the 4.0 patch?
2) Any way to avoid this problem? I basically copied Phanx's code from above.
0
0
0
I tried changing this to use the chat message filter system, but the message you are passed in a chat filter does not contain the full formatting so I can't put the note next to the player's name as in the above code. I also tried just changing the name (which IS passed to you in the chat filter) but this causes issues with display in further messages.
So, I'm looking for a way to either a) get access to "event" in ChatFrame_AddMessage or b) accomplish the above using chat message filters. Any ideas?
0
versus
0
0
0
0
My problem is that setting background sound to on seems to take some time to propagate or something. Using the code I have below, the first time I get a ready check, the bg sound setting gets turned on but I can't hear the sound in the background. However, without changing anything else, if I send a second ready check, that one works. Does anyone know how to avoid this issue (or a better way to do what I'm trying to do)? Thanks.
0
0
To clarify my point about the frames being visible as far as I can tell, I also checked (using GetPoint) to make sure each line has a valid anchor and that WatchFrameLines (the frame the lines are parented to) has a valid anchor.