Skip to content

Commit

Permalink
BCC cleanups and /slash reporting retail build counter
Browse files Browse the repository at this point in the history
  • Loading branch information
Tercioo committed Aug 31, 2022
1 parent cd1492a commit 09845aa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 75 deletions.
6 changes: 2 additions & 4 deletions boot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@

local version, build, date, tocversion = GetBuildInfo()

_detalhes.build_counter = 10010
_detalhes.alpha_build_counter = 10010 --if this is higher than the regular counter, use it instead
_detalhes.bcc_counter = 41
_detalhes.wotlk_counter = 4
_detalhes.build_counter = 10015
_detalhes.alpha_build_counter = 10015 --if this is higher than the regular counter, use it instead
_detalhes.dont_open_news = true
_detalhes.game_version = version
_detalhes.userversion = version .. _detalhes.build_counter
Expand Down
10 changes: 2 additions & 8 deletions functions/slash.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1696,16 +1696,10 @@ function SlashCmdList.DETAILS (msg, editbox)
print (" ")

if (DetailsFramework.IsWotLKWow()) then
--wraft of the lich kind classic
local v = _detalhes.game_version .. "." .. (_detalhes.wotlk_counter)
print (Loc ["STRING_DETAILS1"] .. "|cFFFFFF00DETAILS! VERSION|r: |cFFFFAA00WOTLK" .. _detalhes.wotlk_counter)
--wraft of the lich kind classic, the retail version of details should work on lich king, so let's print here the retail build counter
print (Loc ["STRING_DETAILS1"] .. "|cFFFFFF00DETAILS! VERSION|r: |cFFFFAA00W" .. _detalhes.build_counter)
print (Loc ["STRING_DETAILS1"] .. "|cFFFFFF00GAME VERSION|r: |cFFFFAA00" .. _detalhes.game_version)

elseif (DetailsFramework.IsTBCWow()) then
--the burning crusade classic
local v = _detalhes.game_version .. "." .. (_detalhes.bcc_counter)
print (Loc ["STRING_DETAILS1"] .. "|cFFFFFF00DETAILS! VERSION|r: |cFFFFAA00BCC" .. _detalhes.bcc_counter)
print (Loc ["STRING_DETAILS1"] .. "|cFFFFFF00GAME VERSION|r: |cFFFFAA00" .. _detalhes.game_version)
else
--retail
local v = _detalhes.game_version .. "." .. (_detalhes.build_counter >= _detalhes.alpha_build_counter and _detalhes.build_counter or _detalhes.alpha_build_counter)
Expand Down
63 changes: 0 additions & 63 deletions startup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -557,69 +557,6 @@ function Details:StartMeUp() --I'll never stop!
end)
end

if (DetailsFramework.IsTBCWow()) then
--remover isso em versões mais atualizadas
if (_detalhes.bcc_counter == 18 or _detalhes.bcc_counter == 19) then
_detalhes.trash_auto_remove = false
end

local originalPosition
local isOnOriginalPosition = true

local taintWarning = CreateFrame ("frame", nil, UIParent, "BackdropTemplate")
taintWarning:SetSize (500, 35)
taintWarning:SetFrameStrata ("low")

DetailsFramework:ApplyStandardBackdrop(taintWarning)

local warningMessage = taintWarning:CreateFontString (nil, "overlay", "GameFontNormal")
warningMessage:SetText ("< right click and choose 'Enter Battle' if 'Enter Battle' button does not work")

C_Timer.NewTicker(3, function() -- default = 1
if (not Details.DontMoveMinimapIconOnBattlegroundError) then
if (StaticPopup1:IsShown() or StaticPopup2:IsShown()) then
if (StaticPopup1.which == "ADDON_ACTION_FORBIDDEN" or (StaticPopup2 and StaticPopup2:IsShown() and StaticPopup2.which == "ADDON_ACTION_FORBIDDEN")) then

if (StaticPopup2:IsShown()) then
if (StaticPopup2.which == "ADDON_ACTION_FORBIDDEN") then
StaticPopup_Hide("ADDON_ACTION_FORBIDDEN")
end
end


if (MiniMapBattlefieldFrame:IsShown())then
taintWarning:Show()
taintWarning:SetPoint ("topleft", StaticPopup1, "bottomleft", 0, -10)
if (not originalPosition) then
local a = {}
for i = 1, MiniMapBattlefieldFrame:GetNumPoints() do
a[#a + 1] = {MiniMapBattlefieldFrame:GetPoint(i)}
end
originalPosition = a
end

MiniMapBattlefieldFrame:ClearAllPoints()
MiniMapBattlefieldFrame:SetPoint("left", taintWarning, "left", 10, -2)
warningMessage:SetPoint ("left", MiniMapBattlefieldFrame, "right", 9, 0)
MiniMapBattlefieldFrame:SetFrameStrata("HIGH")

isOnOriginalPosition = false
end
end
else
if (originalPosition and not isOnOriginalPosition) then
MiniMapBattlefieldFrame:ClearAllPoints()
for i = 1, #originalPosition do
MiniMapBattlefieldFrame:SetPoint(unpack (originalPosition[i]))
end
taintWarning:Hide()
isOnOriginalPosition = true
end
end
end
end)
end

hooksecurefunc(GameCooltip, "SetMyPoint", function()
if (DetailsAllAttributesFrame) then
DetailsAllAttributesFrame:Hide()
Expand Down

0 comments on commit 09845aa

Please sign in to comment.