WoWInterface SVN PhanxMod

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 39 to Rev 40
    Reverse comparison

Rev 39 → Rev 40

Mods.lua
67,20 → 67,34
end
 
---------------------------------------------------------------------
-- Fix long reagent count text in tradeskill UI
-- Fix long reagent count text in garrison & tradeskill UI
---------------------------------------------------------------------
 
local function SetReagentCount(button, quantity, needed)
button.Count:SetFormattedText("%d/%d", quantity, needed)
if floor(button.Count:GetStringWidth()) > floor(button.Icon:GetWidth() + 0.5) then
button.Count:SetFormattedText("%d\n/%d", quantity, needed)
end
end
 
mods["Blizzard_GarrisonUI"] = function()
hooksecurefunc("GarrisonCapacitiveDisplayFrame_Update", function(self, success, maxShipments, plotID)
local reagents = self.CapacitiveDisplay.Reagents
for i = 1, C_Garrison.GetNumShipmentReagents() do
local name, texture, quality, needed, quantity, itemID = C_Garrison.GetShipmentReagentInfo(i)
if name then
SetReagentCount(reagents[i], quantity, needed)
end
end
end)
end
 
mods["Blizzard_TradeSkillUI"] = function()
hooksecurefunc("TradeSkillFrame_SetSelection", function(id)
for i = 1, GetTradeSkillNumReagents(id) do
local reagentName, reagentTexture, reagentCount, playerReagentCount = GetTradeSkillReagentInfo(id, i)
if reagentName and reagentTexture then
local button = _G["TradeSkillReagent"..i]
local count = _G["TradeSkillReagent"..i.."Count"]
count:SetFormattedText("%d/%d", playerReagentCount, reagentCount)
if floor(count:GetStringWidth()) > floor(button.Icon:GetWidth() + .5) then
count:SetFormattedText("%d\n/%d", playerReagentCount, reagentCount)
end
local name, texture, needed, quantity = GetTradeSkillReagentInfo(id, i)
if name and tTexture then
SetReagentCount(_G["TradeSkillReagent"..i], quantity, needed)
end
end
end)
516,10 → 530,11
------------------------------------------------------------------------
 
local knownSenders = {
["Auntie Stormbrew"] = true, ["Tantchen Sturmbraü"] = true,
["Mei Francis"] = true,
["Thaumaturge Vashreen"] = true, ["Thaumaturg Vashreen"] = true,
["The Postmaster"] = true, ["Der Postmeister"] = true,
["The WoW Dev Team"] = true, ["Das Entwicklerteam von WoW"] = true,
["The Postmaster"] = true, ["Der Postmeister"] = true,
["The WoW Dev Team"] = true, ["Das Entwicklerteam von WoW"] = true,
}
 
local lastIndex = 0
533,7 → 548,7
print("DELETE", i, sender, "::", subject)
lastIndex = i - 1
if knownSenders[sender] then
--return DeleteInboxItem(i)
return DeleteInboxItem(i)
end
end
end
597,7 → 612,7
 
hooksecurefunc("SetItemButtonCount", function(button, count)
if button and count and count > 999 then
_G[button:GetName() .. "Count"]:SetFormattedText("%.1fk", count / 1000)
(button.Count or _G[button:GetName() .. "Count"]):SetFormattedText("%.1fk", count / 1000)
end
end)