You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
743 B
28 lines
743 B
|
3 years ago
|
local AS, L, S, R = unpack(AddOnSkins)
|
||
|
4 years ago
|
|
||
|
|
if not AS:CheckAddOn('BattlePetBreedID') then return end
|
||
|
|
|
||
|
3 years ago
|
function R:BattlePetBreedID()
|
||
|
4 years ago
|
local function SkinTooltip(Parent, SpeciesID, BreedID, Rareness)
|
||
|
|
local Tooltip, Rarity, R, G, B
|
||
|
|
if (Parent == FloatingBattlePetTooltip) then
|
||
|
|
Tooltip = _G["BPBID_BreedTooltip2"]
|
||
|
|
else
|
||
|
|
Tooltip = _G["BPBID_BreedTooltip"]
|
||
|
|
end
|
||
|
|
Rarity = Rareness or 4
|
||
|
|
if Rarity > 4 then
|
||
|
|
R, G, B = ITEM_QUALITY_COLORS[Rarity - 1]
|
||
|
|
end
|
||
|
|
if Tooltip then
|
||
|
3 years ago
|
S:HandleFrame(Tooltip)
|
||
|
4 years ago
|
local a, b, c, d, e = Tooltip:GetPoint()
|
||
|
|
Tooltip:SetPoint(a, b, c, d, -1)
|
||
|
|
end
|
||
|
|
end
|
||
|
|
|
||
|
|
hooksecurefunc(_G, "BPBID_SetBreedTooltip", SkinTooltip)
|
||
|
|
end
|
||
|
|
|
||
|
3 years ago
|
AS:RegisterSkin('BattlePetBreedID', R.BattlePetBreedID)
|