Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WoW Classic Support #279

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
f56b2f8
Update gitignore
chowarth Aug 31, 2019
968c2ea
Update gitmodules
chowarth Aug 31, 2019
3e50f46
Update !BeautyCase toc version
chowarth Aug 31, 2019
a3cfb8f
Update !Colorz to work with Classic
chowarth Aug 31, 2019
14523a3
Update nCore to work with Classic
chowarth Aug 31, 2019
14cca85
Update nTooltip to work with Classic
chowarth Aug 31, 2019
581189f
Update nCore some more to work with Classic
chowarth Aug 31, 2019
af24458
Update nChat to work with Classic
chowarth Aug 31, 2019
f241971
Update nCore dressroom to work with Classic
chowarth Aug 31, 2019
b363407
Update nMainBar to work with Classic
chowarth Aug 31, 2019
5207817
Update gitignore and add missing file from previous commit
chowarth Aug 31, 2019
c01a04f
Update Colorz! to work with Classic
chowarth Aug 31, 2019
a98c765
Update nMinimap to work with Classic
chowarth Sep 1, 2019
33c489d
Remove print statement
chowarth Sep 1, 2019
7770b81
Revert "Remove print statement"
chowarth Sep 1, 2019
57c1f2d
Remove print statement
chowarth Sep 1, 2019
8caa4fe
Update nBuff to work with Classic
chowarth Sep 1, 2019
62a7e74
Revert .gitmodules back now I've sorted out the ssh problems
chowarth Sep 1, 2019
81869ab
Classic safety check in Colorz!
chowarth Sep 1, 2019
f456c80
Comment out options that aren't usable by Classic
chowarth Sep 1, 2019
0ac9883
Fix toc version :/
chowarth Sep 1, 2019
349bea4
Remove all non-Classic items from picomenu
chowarth Sep 8, 2019
5e0ae34
Fix for minimap friends list throwing an error when a friend is playi…
chowarth Sep 16, 2019
954738b
Remove print output
chowarth Sep 16, 2019
a6d719c
Fix minimap button not opening the guild tab
chowarth Sep 18, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/GPUCache
/Cache
/Data
/Errors
Expand All @@ -7,6 +8,29 @@
/Utils
/WTF

# Ignore addons
/Interface/Addons

# But don't ignore NeavUI addons
# This allows you to install any other addons you want to and they wont be tracked by git
# Any addon you want to be a part of NeavUI and be tracked by git, add to this list
!/Interface/Addons/!BeautyCase
!/Interface/Addons/!Colorz
!/Interface/Addons/evl_RaidStatus
!/Interface/Addons/nBuff
!/Interface/Addons/nCore
!/Interface/Addons/nMainbar
!/Interface/Addons/nMinimap
!/Interface/Addons/nPlates
!/Interface/Addons/nPower
!/Interface/Addons/nTooltip
!/Interface/Addons/oUF
!/Interface/Addons/oUF_Neav
!/Interface/Addons/oUF_NeavRaid

.curseclient
.flavor.info

.build.info
.patch.result

Expand Down
2 changes: 1 addition & 1 deletion Interface/AddOns/!Beautycase/!Beautycase.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 80200
## Interface: 11302
## Title: !Beautycase

core.lua
32 changes: 14 additions & 18 deletions Interface/AddOns/!Colorz/!Colorz.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,35 +42,31 @@ hooksecurefunc("ReputationFrame_Update", function(showLFGPulse)
local factionIndex = factionOffset + i
local factionBar = _G["ReputationBar"..i.."ReputationBar"]

-- Classic: fallback
if factionBar == nil then
factionBar = _G["ReputationBar"..i]
end

if factionIndex <= numFactions then
local name, description, standingID = GetFactionInfo(factionIndex)

local colorIndex = standingID

local friendID = GetFriendshipReputation(factionID)

if friendID ~= nil then
colorIndex = 5 -- always color friendships green
end

local color = CUSTOM_FACTION_BAR_COLORS[colorIndex]
factionBar:SetStatusBarColor(color.r, color.g, color.b)
end
end
end)

hooksecurefunc(ReputationBarMixin, "Update", function(self)
local name, reaction, minBar, maxBar, value, factionID = GetWatchedFactionInfo();
local colorIndex = reaction;
local friendshipID = GetFriendshipReputation(factionID);

if friendshipID then
colorIndex = 5; -- always color friendships green
end
-- Classic: 'ReputationBarMixin' is not available
if ReputationBarMixin then
hooksecurefunc(ReputationBarMixin, "Update", function(self)
local name, reaction, minBar, maxBar, value, factionID = GetWatchedFactionInfo();
local colorIndex = reaction;

local color = CUSTOM_FACTION_BAR_COLORS[colorIndex];
self:SetBarColor(color.r, color.g, color.b, 1);
end)
local color = CUSTOM_FACTION_BAR_COLORS[colorIndex];
self:SetBarColor(color.r, color.g, color.b, 1);
end)
end

-- Override the default GameTooltip_UnitColor function.

Expand Down
2 changes: 1 addition & 1 deletion Interface/AddOns/!Colorz/!Colorz.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 80200
## Interface: 11302
## Title: !Colorz
## Notes: Custom colors

Expand Down
2 changes: 1 addition & 1 deletion Interface/AddOns/evl_RaidStatus/evl_RaidStatus.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 80200
## Interface: 11302
## Title: Evl's Raid Status
## Author: Evl

Expand Down
11 changes: 6 additions & 5 deletions Interface/AddOns/nBuff/core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,19 @@ TempEnchant2:SetPoint("TOPRIGHT", TempEnchant1, "TOPLEFT", -cfg.paddingX, 0)
local function UpdateFirstButton(self)
if self and self:IsShown() then
self:ClearAllPoints()
if UnitHasVehicleUI("player") then
self:SetPoint("TOPRIGHT", TempEnchant1)
return
else
-- Classic TODO: Doesn't have vehilces, can this be updated to still work with Retail?
-- if UnitHasVehicleUI("player") then
Copy link

@vendethiel vendethiel Feb 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if _G['UnitHasVehicleUI'] and UnitHasVehicleUI("player") then? (or isRetail and ... for better perf)

-- self:SetPoint("TOPRIGHT", TempEnchant1)
-- return
-- else
if BuffFrame.numEnchants > 0 then
self:SetPoint("TOPRIGHT", _G["TempEnchant"..BuffFrame.numEnchants], "TOPLEFT", -cfg.paddingX, 0)
return
else
self:SetPoint("TOPRIGHT", TempEnchant1)
return
end
end
-- end
end
end

Expand Down
2 changes: 1 addition & 1 deletion Interface/AddOns/nBuff/nBuff.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 80200
## Interface: 11302
## Title: |cffCC3333 n|rBuff

config.lua
Expand Down
62 changes: 51 additions & 11 deletions Interface/AddOns/nChat/core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,18 @@ end

-- Quick Join Button Options

if cfg.enableQuickJoinButton then
ChatAlertFrame:ClearAllPoints()
ChatAlertFrame:SetPoint("BOTTOMLEFT", ChatFrame1Tab, "TOPLEFT", 0, 0)
QuickJoinToastButton:ClearAllPoints()
QuickJoinToastButton:SetPoint("BOTTOMLEFT", ChatAlertFrame, "TOPLEFT", 0, 0)
else
QuickJoinToastButton:SetAlpha(0)
QuickJoinToastButton:EnableMouse(false)
QuickJoinToastButton:UnregisterAllEvents()
-- Classic: QuickJoinToastButton doesn't exist so add check
if QuickJoinToastButton then
if cfg.enableQuickJoinButton then
ChatAlertFrame:ClearAllPoints()
ChatAlertFrame:SetPoint("BOTTOMLEFT", ChatFrame1Tab, "TOPLEFT", 0, 0)
QuickJoinToastButton:ClearAllPoints()
QuickJoinToastButton:SetPoint("BOTTOMLEFT", ChatAlertFrame, "TOPLEFT", 0, 0)
else
QuickJoinToastButton:SetAlpha(0)
QuickJoinToastButton:EnableMouse(false)
QuickJoinToastButton:UnregisterAllEvents()
end
end

-- Voice Chat Buttons
Expand Down Expand Up @@ -261,6 +264,34 @@ local function ModChat(self)
chat.AddMessage = FCF_AddMessage
end

-- Classic: Brought over hiding the chat scroll buttons from a previous version
local buttonUp = _G[self..'ButtonFrameUpButton']
if buttonUp ~= nil then
buttonUp:SetAlpha(0)
buttonUp:EnableMouse(false)
end

local buttonDown = _G[self..'ButtonFrameDownButton']
if buttonDown ~= nil then
buttonDown:SetAlpha(0)
buttonDown:EnableMouse(false)
end

local buttonBottom = _G[self..'ButtonFrameBottomButton']
if buttonBottom ~= nil then
if (cfg.enableBottomButton) then
buttonBottom:Hide()
buttonBottom:ClearAllPoints()
buttonBottom:SetPoint('BOTTOMLEFT', chat, -1, -3)
buttonBottom:HookScript('OnClick', function(self)
self:Hide()
end)
else
buttonBottom:SetAlpha(0)
buttonBottom:EnableMouse(false)
end
end

for _, texture in pairs({
"ButtonFrameBackground",
"ButtonFrameTopLeftTexture",
Expand All @@ -272,12 +303,21 @@ local function ModChat(self)
"ButtonFrameBottomTexture",
"ButtonFrameTopTexture",
}) do
_G[self..texture]:SetTexture(nil)
-- Classic: These textures don't exist
if _G[self..texture] then
_G[self..texture]:SetTexture(nil)
end
end

-- Modify the editbox

for k = 3, 8 do
--[[
Classic: Tried to find an elegent solution to SetTexture not being available on regions [3-8],
but I could only get this to work if the loop to work if only regions [3-5] were done.

Could be due to my limited WoW and Lua knowledge :s
]]--
for k = 3, 5 do

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potentially:

for k = 3, 8 do
  local editBox = select(k, _G[self.."EditBox"]:GetRegions())
  if editBox.SetTexture then
    editBox:SetTexture(nil)
  end
end

select(k, _G[self.."EditBox"]:GetRegions()):SetTexture(nil)
end

Expand Down
2 changes: 1 addition & 1 deletion Interface/AddOns/nChat/nChat.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 80200
## Interface: 11302
## Title: |cffCC3333 n|rChat
## RequiredDeps: !Beautycase

Expand Down
3 changes: 3 additions & 0 deletions Interface/AddOns/nCore/modules/archaeology.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ function nCore:ArchaeologyHelper()

if not mapID then return end

-- Classic: Doesn't support Archaeology
if ArchaeologyMapUpdateAll == nil then return end

if ArchaeologyMapUpdateAll(mapID) > 0 and CanScanResearchSite() and GetSpellCooldown(SURVEY_SPELL_ID) == 0 and not IsEquippedItemType(FISHING_POLE) then
if GetNumLootItems() == 0 and previousClickTime then
local doubleClickTime = GetTime() - previousClickTime
Expand Down
8 changes: 6 additions & 2 deletions Interface/AddOns/nCore/modules/coords.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ function nCore:MapCoords()
local unpack = unpack

-- Temp fix until Blizzard removed the ! icon from the global string.
local _, MOUSE_LABEL = strsplit("1", MOUSE_LABEL, 2)
-- Extended this to support Classic as 'strsplit' won't work on MOUSE_LABEL as it doesn't have the ! icon
local _, mouseLabel = strsplit("1", MOUSE_LABEL, 2)
if ( mouseLabel == nil ) then
mouseLabel = MOUSE_LABEL
end

local cfg = {
location = {"BOTTOMLEFT", WorldMapFrame, "BOTTOMLEFT", 10, 0},
Expand Down Expand Up @@ -56,7 +60,7 @@ function nCore:MapCoords()

if cx then
if cx >= 0 and cy >= 0 and cx <= 1 and cy <= 1 then
self.Mouse.Text:SetFormattedText("%s: %.1f x %.1f", MOUSE_LABEL, cx * 100, cy * 100)
self.Mouse.Text:SetFormattedText("%s: %.1f x %.1f", mouseLabel, cx * 100, cy * 100)
else
self.Mouse.Text:SetText("")
end
Expand Down
7 changes: 6 additions & 1 deletion Interface/AddOns/nCore/modules/dressroom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ function nCore:Dressroom()

DressUpFrameCancelButton:SetText("Naked")
DressUpFrameCancelButton:SetScript("OnClick", function()
DressUpModel:Undress()
-- Classic: Use DressUpModelFrame instead
if DressUpModelFrame then

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also (DressUpModelFrame or DressUpModel):Undress()

DressUpModelFrame:Undress()
else
DressUpModel:Undress()
end
end)
DressUpFrameResetButton:SetText("Clothed")
end
12 changes: 10 additions & 2 deletions Interface/AddOns/nCore/modules/durability.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,16 @@ function nCore:Durability()
local charString = CharacterLevelText
charString:SetFont(STANDARD_TEXT_FONT, 14)

local tab = CreateFrame("Button", "PaperDollFrameDurabilityTab", PaperDollSidebarTab1, "CharacterFrameTabButtonTemplate")
tab:SetPoint("TOP", PaperDollFrame, "BOTTOM", 170, 2)
-- For retail use PaperDollSidebarTab1, Classic use PaperDollItemsFrame
local tab = nil
if PaperDollSidebarTab1 then
tab = CreateFrame('Button', 'PaperDollFrameDurabilityTab', PaperDollSidebarTab1, 'CharacterFrameTabButtonTemplate')
tab:SetPoint('TOP', PaperDollFrame, 'BOTTOM', 170, 2)
else
tab = CreateFrame('Button', 'PaperDollFrameDurabilityTab', PaperDollItemsFrame, 'CharacterFrameTabButtonTemplate')
tab:SetPoint('TOP', PaperDollFrame, 'BOTTOM', 103, 78)
end

tab:Disable()
tab:EnableMouse(false)
tab:SetFrameStrata("BACKGROUND")
Expand Down
3 changes: 3 additions & 0 deletions Interface/AddOns/nCore/modules/objectivetracker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ local _, nCore = ...
local L = nCore.L

function nCore:ObjectiveTracker()
-- Classic: 'ObjectiveTrackerFrame' isn't available? Have commented out the config option for now
if ( not ObjectiveTrackerFrame ) then return end

if ( not nCoreDB.ObjectiveTracker ) then return end

local objectiveTrackerFrame = _G["ObjectiveTrackerFrame"]
Expand Down
11 changes: 7 additions & 4 deletions Interface/AddOns/nCore/modules/questtracker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ local _, nCore = ...
function nCore:QuestTracker()
local function UpdateQuestText()
local _, numQuests = GetNumQuestLogEntries()
WorldMapFrameTitleText:SetFormattedText("%s - %d/%s", MAP_AND_QUEST_LOG, numQuests, MAX_QUESTS)
WorldMapFrameTitleText:Show()
-- Classic TODO: 'WorldMapFrameTitleText' doesn't appear to exist, is there an alternative?
-- Have commented out the config option for now

-- WorldMapFrameTitleText:SetFormattedText("%s - %d/%s", MAP_AND_QUEST_LOG, numQuests, MAX_QUESTS)
-- WorldMapFrameTitleText:Show()
end

UpdateQuestText()
Expand All @@ -21,8 +24,8 @@ function nCore:QuestTracker()
if nCoreDB.QuestTracker then
UpdateQuestText()
else
WorldMapFrameTitleText:SetText(MAP_AND_QUEST_LOG)
WorldMapFrameTitleText:Show()
-- WorldMapFrameTitleText:SetText(MAP_AND_QUEST_LOG)
-- WorldMapFrameTitleText:Show()
end
end)
end
2 changes: 2 additions & 0 deletions Interface/AddOns/nCore/modules/vignette.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ local _, nCore = ...
-- Forked from rVignette by zork - 2014

function nCore:VignetteAlert()
-- Classic: 'C_VignetteInfo' isn't available, have commented out the config option for now
if (not C_VignetteInfo) then return end

local addon = CreateFrame("Frame")

Expand Down
2 changes: 1 addition & 1 deletion Interface/AddOns/nCore/nCore.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 80200
## Interface: 11302
## Title: |cffCC3333 n|rCore
## OptionalDeps: !Beautycase, Recount, Omen, DBM, PitBull4, Skada, TinyDPS
## SavedVariables: nCoreDB
Expand Down
7 changes: 6 additions & 1 deletion Interface/AddOns/nCore/nCore.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
<Script file="localization.lua" />
<Script file="options.lua" />

<Include file="modules\orderhall.xml" />
<!--
Classic doesn't have Garrisons
<Include file="modules\orderhall.xml" />

-->

<Include file="modules\coords.xml" />

<Script file="core.lua" />
Expand Down
Loading