View Single Post
10-07-18, 11:52 AM   #2
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 666
Just a quick look at your code, I noticed you're iterating CHAT_FRAMES. Temporary chat windows from whispers and the pet battle log aren't added to that table. Their ID is forced as 11 and above and do not persist between sessions.

You can save pointers to all created chat windows, 1-10 or temporary, by hooking FCF_SetWindowName(frame,name). Here's what I do in my TrueChatFrameHistory addon:

Lua Code:
  1. local CF,cfid={},{}
  2. hooksecurefunc("FCF_SetWindowName",function(frame,name)
  3.     local id=frame:GetID()
  4.     CF[frame]=id -- main ChatFrame pointers
  5.     cfid[id]=frame -- access by id
  6. end)

As for the taints, I'm pretty sure it's this:

Lua Code:
  1. local DefaultSetItemRef = SetItemRef
  2. function SetItemRef(link, ...)

Replacing any of Blizzard's objects is not a good idea.
  Reply With Quote