Skip to content

Commit

Permalink
Small code tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
AcidWeb committed Jan 27, 2020
1 parent 05a4188 commit 2f5c792
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions RECrystallize.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@ local GetRecipeReagentItemLink = _G.C_TradeSkillUI.GetRecipeReagentItemLink
local GetRecipeNumItemsProduced = _G.C_TradeSkillUI.GetRecipeNumItemsProduced
local ElvUI = _G.ElvUI

local PETCAGEID = 82800

RE.DefaultConfig = {["LastScan"] = 0, ["GuildChatPC"] = false, ["DatabaseCleanup"] = 432000, ["ScanPulse"] = 1, ["DatabaseVersion"] = 1}
RE.GUIInitialized = false
RE.TooltipLink = ""
RE.TooltipItemVariant = ""
RE.TooltipItemID = 0
RE.TooltipCount = 0
RE.TooltipCustomCount = -1
RE.PetCageItemID = 82800

local function ElvUISwag(sender)
if sender == "Livarax-BurningLegion" then
Expand Down Expand Up @@ -67,7 +68,7 @@ function RE:OnEvent(self, event, ...)
itemID = tonumber(string.match(msg, "item:(%d*)"))
itemStr = RE:GetItemString(msg)
elseif IsLinkType(msg, "battlepet") then
itemID = RE.PetCageItemID
itemID = PETCAGEID
itemStr = string.match(msg, "battlepet:(%d*)")
end
if RE.DB[RE.RealmString][itemID] ~= nil and RE.DB[RE.RealmString][itemID][itemStr] ~= nil then
Expand Down Expand Up @@ -195,14 +196,14 @@ end
function RE:TooltipPetAddPrice()
if _G.BattlePetTooltip:IsForbidden() then return end
local speciesID = tostring(_G.BattlePetTooltip.speciesID)
if RE.DB[RE.RealmString][RE.PetCageItemID] ~= nil and RE.DB[RE.RealmString][RE.PetCageItemID][speciesID] ~= nil then
if RE.DB[RE.RealmString][PETCAGEID] ~= nil and RE.DB[RE.RealmString][PETCAGEID][speciesID] ~= nil then
local text = _G.BattlePetTooltip.Owned:GetText()
if text == nil then
text = ""
else
text = text.." "
end
_G.BattlePetTooltip.Owned:SetText(text.."|cFF74D06CAH:|r |cFFFFFFFF"..GetMoneyString(RE.DB[RE.RealmString][RE.PetCageItemID][speciesID].Price, true).."|r")
_G.BattlePetTooltip.Owned:SetText(text.."|cFF74D06CAH:|r |cFFFFFFFF"..GetMoneyString(RE.DB[RE.RealmString][PETCAGEID][speciesID].Price, true).."|r")
_G.BattlePetTooltip:SetSize(260, 145)
end
end
Expand Down

0 comments on commit 2f5c792

Please sign in to comment.