WoWInterface SVN PhanxMod

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 34 to Rev 35
    Reverse comparison

Rev 34 → Rev 35

Core.lua
23,12 → 23,18
do
local f = CreateFrame("Frame")
 
PhanxMod.UNREGISTER = "UNREGISTER"
 
function PhanxMod:TriggerEvent(event, ...)
for func, handler in pairs(f[event]) do
if handler then
func(handler, ...)
if func(handler, ...) == "UNREGISTER" then
self:UnregisterEvent(event, func, handler)
end
else
func(...)
if func(...) == "UNREGISTER" then
self:UnregisterEvent(event, func)
end
end
end
end
Misc.lua
254,3 → 254,53
f:SetScript("OnMouseWheel", scroll)
end
end
------------------------------------------------------------------------
-- WhoTip
-- http://www.wowace.com/addons/whotip/
------------------------------------------------------------------------
do
local waiting
 
hooksecurefunc("SetItemRef", function(link)
if IsModifiedClick("CHATLINK") then
local what, who = strsplit(":", link)
if what == "player" then
waiting = who
end
end
end)
 
local pattern = "^" .. gsub(WHO_NUM_RESULTS, "%%d", "(%d+)") .. "$"
ChatFrame_AddMessageEventFilter("CHAT_MSG_SYSTEM", function(self, event, message)
local n = waiting and tonumber(strmatch(message, pattern))
if not n then return end
waiting = nil
if n == 0 then return end
 
for i = 1, GetNumWhoResults() do
local name, guild, level, race, class, zone, classtoken = GetWhoInfo(i)
if name == waiting then
ShowUIPanel(ItemRefTooltip)
if not ItemRefTooltip:IsShown() then
ItemRefTooltip:SetOwner(UIParent, "ANCHOR_PRESERVE")
else
ItemRefTooltip:ClearLines()
end
 
ItemRefTooltip:AddLine(name)
if guild then
ItemRefTooltip:AddLine(guild, 1, 1, 1)
end
 
local classcolor = (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS)[classtoken]
class = classcolor and format("|c%s%s", classcolor.colorstr, class) or class
local levelcolor = GetQuestDifficultyColor(level)
level = levelcolor and format("|cff%02x%02x%02x%s|r", levelcolor.r, levelcolor.g, levelcolor.b, level) or level
ItemRefTooltip:AddLine(format(TOOLTIP_UNIT_LEVEL_RACE_CLASS_TYPE, level, race, class, PLAYER), 1, 1, 1)
ItemRefTooltip:Show()
 
return
end
end
end)
end
\ No newline at end of file
Mods.lua
14,6 → 14,12
 
local mods = {
---------------------------------------------------------------------
-- Move archaeology digsite progress bar
---------------------------------------------------------------------
Blizzard_ArchaeologyUI = function()
MakeMovable(ArcheologyDigsiteProgressBar)
end,
---------------------------------------------------------------------
-- Hide the 3D model controls in the character frame, etc.
---------------------------------------------------------------------
Blizzard_AuctionUI = function()
23,10 → 29,10
Hide(InspectModelFrameControlFrame)
end,
---------------------------------------------------------------------
-- Move archaeology digsite progress bar
-- Lower objective tracker strata
---------------------------------------------------------------------
Blizzard_ArchaeologyUI = function()
MakeMovable(ArcheologyDigsiteProgressBar)
Blizzard_ObjectiveTracker = function()
ObjectiveTrackerFrame:SetFrameStrata("BACKGROUND")
end,
---------------------------------------------------------------------
-- Fix long reagent count text in tradeskill UI
194,8 → 200,8
-- * Better statusbar texture
-- * Move enemy action buttons to micro button area
---------------------------------------------------------------------
--[[
PetTracker = function()
--[[
local bar = PetTracker.Objectives.Bar
for i = 1, bar:GetNumChildren() do
local child = select(i, bar:GetChildren())
205,6 → 211,7
child:SetStatusBarColor(r * 0.75, g * 0.75, b * 0.75)
end
end
]]
 
-- Move enemy action buttons to micro button area
-- local _, parent = EnemyActions:GetPoint(1)
213,18 → 220,15
EnemyActions:SetPoint("TOPRIGHT", PetBattleFrame.BottomFrame, "TOPRIGHT", 32, -20)
 
-- Remove the micro buttons from the pet battle UI
local okparents = {
BT4BarMicroMenu = true,
MainMenuBarArtFrame = true,
}
hooksecurefunc("UpdateMicroButtonsParent", function(parent)
--print("UpdateMicroButtonsParent", parent and parent:GetName() or UNKNOWN)
print("UpdateMicroButtonsParent", parent and parent:GetName() or UNKNOWN)
--[[
if parent and okparents[parent:GetName() or UNKNOWN] and not InCombatLockdown() then
MainMenuBar:GetScript("OnShow")(MainMenuBar)
end
]]
end)
end,
]]
---------------------------------------------------------------------
-- PetTracker_Broker
-- * Better statusbar texture
248,6 → 252,12
end
end,
]]
---------------------------------------------------------------------
-- Who Framed Watcher Wabbit
---------------------------------------------------------------------
["Who Framed Watcher Wabbit"] = function()
OTFContainer:SetFrameStrata("BACKGROUND")
end,
}
 
local f = CreateFrame("Frame")
362,6 → 372,43
end)
 
------------------------------------------------------------------------
-- Hide garrison mission popups, show in chat instead
------------------------------------------------------------------------
 
AlertFrame:UnregisterEvent("GARRISON_BUILDING_ACTIVATABLE")
PhanxMod:RegisterEvent("GARRISON_BUILDING_ACTIVATABLE", function(buildingName)
PlaySound("UI_Garrison_Toast_BuildingComplete")
local message = GARRISON_BUILDING_COMPLETE .. ": " .. buildingName
local info = ChatTypeInfo["SYSTEM"]
for i = 1, NUM_CHAT_WINDOWS do
local frame = _G["ChatFrame"..i]
for j = 1, #frame.messageTypeList do
if frame.messageTypeList[j] == "SYSTEM" then
frame:AddMessage(message, info.r, info.g, info.b, info.id)
break
end
end
end
end)
 
AlertFrame:UnregisterEvent("GARRISON_MISSION_FINISHED")
PhanxMod:RegisterEvent("GARRISON_MISSION_FINISHED", function(missionID)
PlaySound("UI_Garrison_Toast_MissionComplete")
local missionInfo = C_Garrison.GetBasicMissionInfo(missionID)
local message = GARRISON_MISSION_COMPLETE .. ": " .. missionInfo.name
local info = ChatTypeInfo["SYSTEM"]
for i = 1, NUM_CHAT_WINDOWS do
local frame = _G["ChatFrame"..i]
for j = 1, #frame.messageTypeList do
if frame.messageTypeList[j] == "SYSTEM" then
frame:AddMessage(message, info.r, info.g, info.b, info.id)
break
end
end
end
end)
 
------------------------------------------------------------------------
-- Enlarge and center the ghost frame
------------------------------------------------------------------------
 
394,6 → 441,54
InterfaceOptionsFrameReloadUI:SetText(RELOADUI)
 
------------------------------------------------------------------------
-- Delete automated mail after the items have been retrieved
------------------------------------------------------------------------
 
local knownSenders = {
["Mei Francis"] = true,
["Thaumaturge Vashreen"] = true, ["Thaumaturg Vashreen"] = true,
["The Postmaster"] = true, ["Der Postmeister"] = true,
}
 
local lastIndex = 0
 
local function DeleteStuff()
print("SCAN")
for i = lastIndex, 1, -1 do
local _, _, sender, subject, money, cod, _, hasItem, wasRead, _, _, canReply, isGM = GetInboxHeaderInfo(i)
print("CHECK", i, sender, "::", subject, "::", money, cod, hasItem, wasRead, canReply, isGM)
if money == 0 and cod == 0 and not hasItem and not canReply and not isGM then
print("DELETE")
lastIndex = i - 1
if knownSenders[sender] then
--return DeleteInboxItem(i)
end
end
end
print("DONE")
PhanxMod:UnregisterEvent("MAIL_SUCCESS", DeleteStuff)
end
 
local function InboxUpdated()
--print("MAIL_INBOX_UPDATE")
lastIndex = GetInboxNumItems()
PhanxMod:UnregisterEvent("MAIL_INBOX_UPDATE", InboxUpdated)
PhanxMod:RegisterEvent("MAIL_SUCCESS", DeleteStuff)
DeleteStuff()
end
 
PhanxMod:RegisterEvent("MAIL_SHOW", function()
--print("MAIL_SHOW")
PhanxMod:RegisterEvent("MAIL_INBOX_UPDATE", InboxUpdated)
end)
 
PhanxMod:RegisterEvent("MAIL_CLOSED", function()
--print("MAIL_CLOSED")
lastIndex = 0
PhanxMod:UnregisterEvent("MAIL_SUCCESS", DeleteStuff)
end)
 
------------------------------------------------------------------------
-- Movable alt power bar
------------------------------------------------------------------------