WoWInterface SVN mikma

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /Pssst
    from Rev 433 to Rev 434
    Reverse comparison

Rev 433 → Rev 434

Pssst.lua
77,8 → 77,8
tooltip:Clear()
 
for i=1,3 do
local count = i+1
tooltip:SetFont(Mfonts[i])
if next(PssstDB[i]) and i ~= 1 then tooltip:AddSeparator() end
if next(PssstDB[i]) then
for idx,message in pairs(PssstDB[i]) do
local suffix
94,11 → 94,7
tooltip:SetCell(y, 4, string.sub(text,1,150)..suffix)
tooltip:SetCellScript(y, 4, "OnMouseUp", DisplayWHISPER, {arg1 = "["..message[1].."] "..foo..Rot13(message[2]), arg2 = Rot13(message[3]), arg3 = i})
end
if PssstDB[count] and PssstDB[count][1] then
tooltip:AddSeparator()
end
end
 
end
 
if not next(PssstDB[1]) and not next(PssstDB[2]) and not next(PssstDB[3]) then tooltip:AddLine("|cFFFF0000No-one needs you!") end
119,6 → 115,7
PssstDB[1] = {}
PssstDB[2] = {}
PssstDB[3] = {}
tooltip:Hide()
end
end
 
135,23 → 132,37
self.PLAYER_ENTERING_WORLD = nil
end
 
local maxmessages = 30
 
local function clearmessages()
local screenheight = floor(UIParent:GetHeight()/75)+1
for tablenumber=1,3 do
for idx=screenheight,#PssstDB[tablenumber] do
table.remove(PssstDB[tablenumber],idx)
end
end
end
 
function Pssst:CHAT_MSG_WHISPER(self,arg1,arg2)
if PssstDB.afk then Pssst.DO.text = "New Message!" end
local screenheight = floor(UIParent:GetHeight()/75)+1
table.insert(PssstDB[1],1,{date("%X"),Rot13(arg2),Rot13(arg1),"From"})
if #PssstDB[1] == 11 then table.remove(PssstDB[1],11) end
clearmessages()
end
 
function Pssst:CHAT_MSG_WHISPER_INFORM(self,arg1,arg2)
local screenheight = floor(UIParent:GetHeight()/75)+1
table.insert(PssstDB[1],1,{date("%X"),Rot13(arg2),Rot13(arg1),"To"})
if #PssstDB[1] == 11 then table.remove(PssstDB[1],11) end
clearmessages()
end
 
function Pssst:CHAT_MSG_GUILD(self,arg1,arg2)
local screenheight = floor(UIParent:GetHeight()/75)+1
table.insert(PssstDB[3],1,{date("%X"),Rot13(arg2),Rot13(arg1)})
if #PssstDB[3] == 11 then table.remove(PssstDB[3],11) end
clearmessages()
end
 
function Pssst:CHAT_MSG_PARTY(self,arg1,arg2)
local screenheight = floor(UIParent:GetHeight()/75)+1
table.insert(PssstDB[2],1,{date("%X"),Rot13(arg2),Rot13(arg1)})
if #PssstDB[2] == 11 then table.remove(PssstDB[2],11) end
clearmessages()
end
\ No newline at end of file