Skip to content
This repository was archived by the owner on Jan 21, 2024. It is now read-only.

Commit 3035ca2

Browse files
committed
Port to WotLK classic
1 parent 0a11bf7 commit 3035ca2

File tree

12 files changed

+37
-33
lines changed

12 files changed

+37
-33
lines changed

Neuron-Defaults.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ Neuron.DefaultBarOptions.PetBar = {
262262
-----------------------------------
263263
----------- Menu Bar --------------
264264
-----------------------------------
265-
if not Neuron.isWoWClassic and not Neuron.isWoWClassic_TBC then
265+
if not Neuron.isWoWClassicEra and not Neuron.isWoWClassic then
266266
Neuron.DefaultBarOptions.MenuBar = {
267267
[1] = {
268268
snapTo = false,
@@ -310,7 +310,7 @@ end
310310
-----------------------------------
311311
------------ Bag Bar --------------
312312
-----------------------------------
313-
if not Neuron.isWoWClassic and not Neuron.isWoWClassic_TBC then
313+
if not Neuron.isWoWClassicEra and not Neuron.isWoWClassic then
314314
Neuron.DefaultBarOptions.BagBar = {
315315
[1] = {
316316
padH = 1,

Neuron-GUI.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ function NeuronGUI:OnInitialize()
9898
NeuronGUI.interfaceOptions.args.profile = LibStub("AceDBOptions-3.0"):GetOptionsTable(Neuron.db)
9999

100100
-- Per spec profiles
101-
if not Neuron.isWoWClassic and not Neuron.isWoWClassic_TBC then
101+
if not Neuron.isWoWClassicEra and not Neuron.isWoWClassic then
102102
local LibDualSpec = LibStub('LibDualSpec-1.0')
103103
LibDualSpec:EnhanceDatabase(Neuron.db, addonName) --enhance the database object with per spec profile features
104104
LibDualSpec:EnhanceOptions(NeuronGUI.interfaceOptions.args.profile, Neuron.db) -- enhance the profiles config panel with per spec profile features
@@ -131,7 +131,7 @@ function NeuronGUI:OnEnable()
131131

132132
NeuronGUI:RegisterEvent("ADDON_LOADED")
133133

134-
if not Neuron.isWoWClassic and not Neuron.isWoWClassic_TBC then
134+
if not Neuron.isWoWClassicEra and not Neuron.isWoWClassic then
135135
NeuronGUI:RegisterEvent("PLAYER_SPECIALIZATION_CHANGED")
136136
end
137137

Neuron-Startup.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function Neuron:RegisterBars()
3333
--Neuron Pet Bar
3434
Neuron:RegisterBarClass("PetBar", "PetBar", L["Pet Bar"], "Pet Button", DB.PetBar, Neuron.PETBTN, 10, true)
3535

36-
if not Neuron.isWoWClassic and not Neuron.isWoWClassic_TBC then
36+
if not Neuron.isWoWClassicEra and not Neuron.isWoWClassic then
3737
--Neuron Zone Ability Bar
3838
Neuron:RegisterBarClass("ZoneAbilityBar", "ZoneAbilityBar", L["Zone Action Bar"], "Zone Action Button", DB.ZoneAbilityBar, Neuron.ZONEABILITYBTN, 5, true)
3939

@@ -116,7 +116,7 @@ function Neuron:RegisterGUI()
116116
CDALPHA = true },
117117
false, 65)
118118

119-
if not Neuron.isWoWClassic and not Neuron.isWoWClassic_TBC then
119+
if not Neuron.isWoWClassicEra and not Neuron.isWoWClassic then
120120
--Neuron Zone Ability Bar
121121
Neuron:RegisterGUIOptions("ZoneAbilityBar", {
122122
AUTOHIDE = true,

Neuron.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ Neuron.SNAPTO_TOLLERANCE = 28
104104
Neuron.enteredWorld = false --flag that gets set when the player enters the world. It's used primarily for throttling events so that the player doesn't crash on logging with too many processes
105105

106106
if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then --boolean check to set a flag if the current session is WoW Classic. Retail == 1, Classic == 2
107+
Neuron.isWoWClassicEra = true
108+
elseif WOW_PROJECT_ID == WOW_PROJECT_WRATH_CLASSIC then
107109
Neuron.isWoWClassic = true
108-
elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then
109-
Neuron.isWoWClassic_TBC = true
110110
end
111111

112112
Neuron.activeSpec = 1
@@ -203,7 +203,7 @@ function Neuron:OnEnable()
203203
end
204204

205205
--set current spec before loading bars and buttons
206-
if not Neuron.isWoWClassic and not Neuron.isWoWClassic_TBC then
206+
if not Neuron.isWoWClassicEra and not Neuron.isWoWClassic then
207207
Neuron.activeSpec = GetSpecialization()
208208
end
209209

@@ -353,7 +353,7 @@ function Neuron:LoginMessage()
353353
end
354354

355355
--Shadowlands warning that will show as long as a player has one button on their ZoneAbilityBar for Shadowlands content
356-
if not Neuron.isWoWClassic and not Neuron.isWoWClassic_TBC and UnitLevel("player") >= 50 and Neuron.db.profile.ZoneAbilityBar[1] and #Neuron.db.profile.ZoneAbilityBar[1].buttons == 1 then
356+
if not Neuron.isWoWClassicEra and not Neuron.isWoWClassic and UnitLevel("player") >= 50 and Neuron.db.profile.ZoneAbilityBar[1] and #Neuron.db.profile.ZoneAbilityBar[1].buttons == 1 then
357357
print(" ")
358358
Neuron:Print(WrapTextInColorCode("IMPORTANT: Shadowlands content now requires multiple Zone Ability Buttons. Please add at least 3 buttons to your Zone Ability Bar to support this new functionality.", "FF00FFEC"))
359359
print(" ")
@@ -439,7 +439,7 @@ function Neuron:UpdateSpellCache()
439439
end
440440
end
441441

442-
if not Neuron.isWoWClassic and not Neuron.isWoWClassic_TBC then
442+
if not Neuron.isWoWClassicEra and not Neuron.isWoWClassic then
443443
for i = 1, select("#", GetProfessions()) do
444444
local index = select(i, GetProfessions())
445445

Neuron.toc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## Interface: 90207
22
## Interface-Classic: 11403
33
## Interface-BCC: 20504
4+
## Interface-Wrath: 30400
45
## Title: Neuron
56
## Notes: A macro-based action bar and object manager add-on
67
## Author: Britt W. Yazel

Objects/ACTIONBUTTON.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ function ACTIONBUTTON:SetupEvents()
130130
self:RegisterEvent("PLAYER_TARGET_CHANGED", "UpdateAll")
131131
self:RegisterEvent("UNIT_PET", "UpdateAll")
132132

133-
if not Neuron.isWoWClassic and not Neuron.isWoWClassic_TBC then
133+
if not Neuron.isWoWClassicEra and not Neuron.isWoWClassic then
134134
self:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED")
135135
self:RegisterEvent("EQUIPMENT_SETS_CHANGED")
136136

@@ -469,7 +469,7 @@ function ACTIONBUTTON:UpdateAll()
469469
--pass to parent UpdateAll function
470470
Neuron.BUTTON.UpdateAll(self)
471471

472-
if not Neuron.isWoWClassic and not Neuron.isWoWClassic_TBC then
472+
if not Neuron.isWoWClassicEra and not Neuron.isWoWClassic then
473473
self:UpdateGlow()
474474
end
475475
end

Objects/ACTIONBUTTON_Flyout.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -742,13 +742,13 @@ function ACTIONBUTTON:GetDataList(options)
742742
scanData = self:filter_spell(tooltip)
743743
elseif types:find("^i") then --Item
744744
scanData = self:filter_item(tooltip)
745-
elseif types:find("^c") and not Neuron.isWoWClassic and not Neuron.isWoWClassic_TBC then --Companion
745+
elseif types:find("^c") and not Neuron.isWoWClassicEra and not Neuron.isWoWClassic then --Companion
746746
scanData = self:filter_pet()
747-
elseif types:find("^f") and not Neuron.isWoWClassic and not Neuron.isWoWClassic_TBC then --toy
747+
elseif types:find("^f") and not Neuron.isWoWClassicEra and not Neuron.isWoWClassic then --toy
748748
scanData = self:filter_toy()
749749
elseif types:find("^m") then --Mount
750750
scanData = self:filter_mount()
751-
elseif types:find("^p") and not Neuron.isWoWClassic and not Neuron.isWoWClassic_TBC then --Profession
751+
elseif types:find("^p") and not Neuron.isWoWClassicEra and not Neuron.isWoWClassic then --Profession
752752
scanData = self:filter_profession()
753753
elseif types:find("^t") then --Item Type
754754
scanData = self:filter_type()

Objects/BAGBTN.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
local BAGBTN = setmetatable({}, {__index = Neuron.BUTTON})
88
Neuron.BAGBTN = BAGBTN
99

10-
if Neuron.isWoWClassic or Neuron.isWoWClassic_TBC then
10+
if Neuron.isWoWClassicEra or Neuron.isWoWClassic then
1111
Neuron.NUM_BAG_BUTTONS = 6
1212
else
1313
Neuron.NUM_BAG_BUTTONS = 5
1414
end
1515

1616
local blizzBagButtons
1717

18-
if Neuron.isWoWClassic or Neuron.isWoWClassic_TBC then
18+
if Neuron.isWoWClassicEra or Neuron.isWoWClassic then
1919
blizzBagButtons = {
2020
KeyRingButton, --wow classic has a keyring button
2121
CharacterBag3Slot,
@@ -58,7 +58,7 @@ function BAGBTN:SetType()
5858
self.hookedButton:ClearAllPoints()
5959
self.hookedButton:SetParent(self)
6060
self.hookedButton:Show()
61-
if (Neuron.isWoWClassic or Neuron.isWoWClassic_TBC) and self.id==1 then --the keyring button should be aligned to the right because it's only 1/3 the width of the other bag buttons
61+
if (Neuron.isWoWClassicEra or Neuron.isWoWClassic) and self.id==1 then --the keyring button should be aligned to the right because it's only 1/3 the width of the other bag buttons
6262
self.hookedButton:SetPoint("RIGHT", self, "RIGHT")
6363
else
6464
self.hookedButton:SetPoint("CENTER", self, "CENTER")

Objects/BUTTON.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@ function BUTTON:UpdateUsableItem()
755755
--for some reason toys don't show as usable items, so this is a workaround for that
756756
if not isUsable then
757757
local itemID = GetItemInfoInstant(self.item)
758-
if not Neuron.isWoWClassic and not Neuron.isWoWClassic_TBC and itemID and PlayerHasToy(itemID) then
758+
if not Neuron.isWoWClassicEra and not Neuron.isWoWClassic and itemID and PlayerHasToy(itemID) then
759759
isUsable = true
760760
end
761761
end

Objects/MENUBTN.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ local blizzMenuButtons = {
2020
StoreMicroButton,
2121
MainMenuMicroButton}
2222

23-
if Neuron.isWoWClassic or Neuron.isWoWClassic_TBC then
23+
if Neuron.isWoWClassicEra or Neuron.isWoWClassic then
2424
wipe(blizzMenuButtons)
2525
for i=1, #MICRO_BUTTONS do
2626
blizzMenuButtons[i] = _G[MICRO_BUTTONS[i]]
@@ -47,8 +47,8 @@ end
4747
---------------------------------------------------------
4848

4949
function MENUBTN:SetType()
50-
if not Neuron.isWoWClassic and not Neuron.isWoWClassic_TBC then
51-
if not self:IsEventRegistered("PET_BATTLE_CLOSE") and not Neuron.isWoWClassic and not Neuron.isWoWClassic_TBC then --only run this code on the first SetType, not the reloads after pet battles and such
50+
if not Neuron.isWoWClassicEra and not Neuron.isWoWClassic then
51+
if not self:IsEventRegistered("PET_BATTLE_CLOSE") and not Neuron.isWoWClassicEra and not Neuron.isWoWClassic then --only run this code on the first SetType, not the reloads after pet battles and such
5252
self:RegisterEvent("PET_BATTLE_CLOSE")
5353
end
5454

0 commit comments

Comments
 (0)