Skip to content

Commit

Permalink
classic update
Browse files Browse the repository at this point in the history
  • Loading branch information
funkydude committed Aug 9, 2019
1 parent 5be4e29 commit 4d4fcf7
Show file tree
Hide file tree
Showing 23 changed files with 112 additions and 95 deletions.
2 changes: 0 additions & 2 deletions .pkgmeta
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ externals:
libs/LibLatency: https://repos.wowace.com/wow/liblatency/trunk/LibLatency
libs/LibDurability: https://repos.wowace.com/wow/libdurability/trunk/LibDurability
libs/LibDDI-1.0: https://repos.wowace.com/wow/libddi-1-0/trunk
libs/LibDualSpec-1.0: https://repos.wowace.com/wow/libdualspec-1-0
libs/LibGroupInSpecT-1.1: https://repos.wowace.com/wow/libgroupinspect/trunk

ignore:
- .luacheckrc
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ addons:

install: luarocks install --local luacheck
before_script: /home/travis/.luarocks/bin/luacheck . -q
script: curl -s https://raw.githubusercontent.com/BigWigsMods/packager/master/release.sh | bash
script: curl -s https://raw.githubusercontent.com/BigWigsMods/packager/master/release.sh | bash -s -- -g 1.13.2

notifications:
email:
Expand Down
2 changes: 0 additions & 2 deletions libs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
<Include file="libs\LibLatency\LibLatency.xml"/>
<Include file="libs\LibDurability\LibDurability.xml"/>
<Include file="libs\LibDDI-1.0\lib.xml"/>
<Script file="libs\LibDualSpec-1.0\LibDualSpec-1.0.lua"/>
<Include file="libs\LibGroupInSpecT-1.1\lib.xml"/>
@end-non-debug@-->

</Ui>
5 changes: 5 additions & 0 deletions modulePrototype.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

if WOW_PROJECT_ID ~= WOW_PROJECT_CLASSIC then
return
end

local addon = LibStub("AceAddon-3.0"):GetAddon("oRA3")

local prototype = {}
Expand Down
4 changes: 4 additions & 0 deletions modules/Alerts.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

if WOW_PROJECT_ID ~= WOW_PROJECT_CLASSIC then
return
end

local _, scope = ...
local oRA = scope.addon
local module = oRA:NewModule("Alerts", "AceTimer-3.0")
Expand Down
4 changes: 4 additions & 0 deletions modules/BattleRes.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

if WOW_PROJECT_ID ~= WOW_PROJECT_CLASSIC then
return
end

local addonName, scope = ...
local oRA = scope.addon
local module = oRA:NewModule("BattleRes", "AceTimer-3.0")
Expand Down
6 changes: 5 additions & 1 deletion modules/Consumables.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

if WOW_PROJECT_ID ~= WOW_PROJECT_CLASSIC then
return
end

local _, scope = ...
local oRA = scope.addon
local module = oRA:NewModule("Consumables", "AceTimer-3.0")
Expand Down Expand Up @@ -29,7 +33,7 @@ local spells = setmetatable({}, {
if k == nil then return end
local name = GetSpellInfo(k)
if not name then
print("oRA3: Invalid spell id", k)
--print("oRA3: Invalid spell id", k)
name = "" -- only print once
end
t[k] = name
Expand Down
4 changes: 4 additions & 0 deletions modules/Cooldowns/Container.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

if WOW_PROJECT_ID ~= WOW_PROJECT_CLASSIC then
return
end

local _, scope = ...
local oRA3 = scope.addon
local L = scope.locale
Expand Down
5 changes: 5 additions & 0 deletions modules/Cooldowns/Cooldowns.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

if WOW_PROJECT_ID ~= WOW_PROJECT_CLASSIC then
return
end

--------------------------------------------------------------------------------
-- Setup
--
Expand Down
4 changes: 4 additions & 0 deletions modules/Cooldowns/Registry.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

if WOW_PROJECT_ID ~= WOW_PROJECT_CLASSIC then
return
end

local _, scope = ...
local oRA3 = scope.addon
local module = oRA3:GetModule("Cooldowns")
Expand Down
4 changes: 2 additions & 2 deletions modules/Cooldowns/module.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">

<Script file="Cooldowns.lua"/>
<!--<Script file="Cooldowns.lua"/>
<Script file="Registry.lua"/>
<Script file="Container.lua"/>
<Script file="Displays\Bars.lua"/>
<Script file="Displays\Icons.lua"/>
<Script file="Displays\IconGroups.lua"/>
<Script file="Displays\Log.lua"/>
<Script file="Displays\Log.lua"/>-->

</Ui>
48 changes: 0 additions & 48 deletions modules/Difficulty.lua

This file was deleted.

4 changes: 4 additions & 0 deletions modules/Durability.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

if WOW_PROJECT_ID ~= WOW_PROJECT_CLASSIC then
return
end

-- Durability is requested/transmitted when opening the list.
-- This module is a display wrapper for LibDurability.

Expand Down
4 changes: 4 additions & 0 deletions modules/Gear.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

if WOW_PROJECT_ID ~= WOW_PROJECT_CLASSIC then
return
end

-- Gear status is requested/transmitted when opening the list.

local addonName, scope = ...
Expand Down
4 changes: 4 additions & 0 deletions modules/Invite.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

if WOW_PROJECT_ID ~= WOW_PROJECT_CLASSIC then
return
end

local addonName, scope = ...
local oRA = scope.addon
local module = oRA:NewModule("Invite", "AceTimer-3.0")
Expand Down
4 changes: 4 additions & 0 deletions modules/Latency.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

if WOW_PROJECT_ID ~= WOW_PROJECT_CLASSIC then
return
end

-- Latency is requested/transmitted when opening the list.
-- This module is a display wrapper for LibLatency.

Expand Down
5 changes: 5 additions & 0 deletions modules/Promote.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

if WOW_PROJECT_ID ~= WOW_PROJECT_CLASSIC then
return
end

--------------------------------------------------------------------------------
-- Setup
--
Expand Down
4 changes: 4 additions & 0 deletions modules/ReadyCheck.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

if WOW_PROJECT_ID ~= WOW_PROJECT_CLASSIC then
return
end

local _, scope = ...
local oRA = scope.addon
local module = oRA:NewModule("ReadyCheck", "AceTimer-3.0")
Expand Down
4 changes: 4 additions & 0 deletions modules/RoleIcons.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

if WOW_PROJECT_ID ~= WOW_PROJECT_CLASSIC then
return
end

local addonName, scope = ...
local oRA = scope.addon
local module = oRA:NewModule("RoleIcons")
Expand Down
4 changes: 4 additions & 0 deletions modules/Tanks.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

if WOW_PROJECT_ID ~= WOW_PROJECT_CLASSIC then
return
end

local addonName, scope = ...
local oRA = scope.addon
local util = oRA.util
Expand Down
4 changes: 4 additions & 0 deletions modules/Zone.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

if WOW_PROJECT_ID ~= WOW_PROJECT_CLASSIC then
return
end

local addonName, scope = ...
local oRA = scope.addon
local util = oRA.util
Expand Down
75 changes: 39 additions & 36 deletions oRA3.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

if WOW_PROJECT_ID ~= WOW_PROJECT_CLASSIC then
print("|cFF33FF99oRA3|r: You're trying to run the Classic version of oRA3 on a live server.")
return
end

local addonName, scope = ...
local addon = LibStub("AceAddon-3.0"):NewAddon(addonName, "AceTimer-3.0")
scope.addon = addon
Expand All @@ -11,7 +16,7 @@ local L = scope.locale
-- luacheck: globals RAID_CLASS_COLORS StoreFrame_IsShown

local CallbackHandler = LibStub("CallbackHandler-1.0")
local LGIST = LibStub("LibGroupInSpecT-1.1")
--local LGIST = LibStub("LibGroupInSpecT-1.1")
local LibDialog = LibStub("LibDialog-1.0")

BINDING_HEADER_oRA3 = addonName
Expand Down Expand Up @@ -268,7 +273,6 @@ end

function addon:OnInitialize()
self.db = LibStub("AceDB-3.0"):New("oRA3DB", defaults, true)
LibStub("LibDualSpec-1.0"):EnhanceDatabase(self.db, "oRA")

-- Comm register
C_ChatInfo.RegisterAddonMessagePrefix("oRA")
Expand All @@ -290,7 +294,6 @@ function addon:OnInitialize()
options.args.general.args.profileOptions = LibStub("AceDBOptions-3.0"):GetOptionsTable(self.db)
options.args.general.args.profileOptions.order = 1
options.args.general.args.profileOptions.args.desc.fontSize = "medium"
LibStub("LibDualSpec-1.0"):EnhanceOptions(options.args.general.args.profileOptions, self.db)

local function OnRaidHide()
if addon:IsEnabled() and db.toggleWithRaid then
Expand Down Expand Up @@ -327,9 +330,9 @@ function addon:OnEnable()
self:RegisterEvent("PLAYER_REGEN_DISABLED")
self:RegisterEvent("PLAYER_REGEN_ENABLED")
self:RegisterEvent("CHAT_MSG_ADDON", "OnCommReceived")
LGIST.RegisterCallback(self, "GroupInSpecT_Update")
LGIST.RegisterCallback(self, "GroupInSpecT_Remove")
LGIST.RegisterCallback(self, "GroupInSpecT_InspectReady")
--LGIST.RegisterCallback(self, "GroupInSpecT_Update")
--LGIST.RegisterCallback(self, "GroupInSpecT_Remove")
--LGIST.RegisterCallback(self, "GroupInSpecT_InspectReady")

SLASH_ORA1 = "/ora"
SLASH_ORA2 = "/ora3"
Expand Down Expand Up @@ -422,45 +425,45 @@ do
end

function addon:GroupInSpecT_Update(_, guid, unit, info)
if not guid or not info.class then return end

if not playerCache[guid] then
playerCache[guid] = {
guid = guid,
class = info.class,
race = info.race,
talents = {},
}
end
local cache = playerCache[guid]
cache.name = info.name
cache.level = UnitLevel(unit)
cache.unit = unit

if info.global_spec_id and info.global_spec_id > 0 then
cache.spec = info.global_spec_id

wipe(cache.talents)
for talentId, talentInfo in next, info.talents do
-- easier to look up by index than to try and check multiple talent spell ids
local index = 3 * (talentInfo.tier - 1) + talentInfo.column
cache.talents[index] = talentId
end
end
self.callbacks:Fire("OnPlayerUpdate", guid, unit, cache)
--if not guid or not info.class then return end

--if not playerCache[guid] then
-- playerCache[guid] = {
-- guid = guid,
-- class = info.class,
-- race = info.race,
-- talents = {},
-- }
--end
--local cache = playerCache[guid]
--cache.name = info.name
--cache.level = UnitLevel(unit)
--cache.unit = unit

--if info.global_spec_id and info.global_spec_id > 0 then
-- cache.spec = info.global_spec_id
--
-- wipe(cache.talents)
-- for talentId, talentInfo in next, info.talents do
-- -- easier to look up by index than to try and check multiple talent spell ids
-- local index = 3 * (talentInfo.tier - 1) + talentInfo.column
-- cache.talents[index] = talentId
-- end
--end
--self.callbacks:Fire("OnPlayerUpdate", guid, unit, cache)
end

function addon:GroupInSpecT_Remove(_, guid)
self.callbacks:Fire("OnPlayerRemove", guid, playerCache[guid])
playerCache[guid] = nil
--self.callbacks:Fire("OnPlayerRemove", guid, playerCache[guid])
--playerCache[guid] = nil
end

function addon:GroupInSpecT_InspectReady(_, guid, unit)
self.callbacks:Fire("OnPlayerInspect", guid, unit)
--self.callbacks:Fire("OnPlayerInspect", guid, unit)
end

function addon:InspectGroup(guid)
LGIST:Rescan(guid)
--LGIST:Rescan(guid)
end

function addon:GetPlayerInfo(guid)
Expand Down
5 changes: 2 additions & 3 deletions oRA3.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 80200
## Interface: 11302
## Title: oRA3
## Notes: Raid and Party Assist
## Notes-zhCN: Raid and Party Assist
Expand All @@ -18,7 +18,7 @@
## X-License: All Rights Reserved: You are free to fork and modify on GitHub, please ask us about anything else.
## X-Website: https://github.com/BigWigsMods/oRA3
## X-Curse-Project-ID: 15655
## X-WoWI-ID: 14635
# X-WoWI-ID: 14635

## SavedVariables: oRA3DB
## OptionalDeps: Ace3, LibCandyBar-3.0, LibSharedMedia-3.0, LibDDI-1.0, LibGroupInSpecT-1.1, LibDualSpec-1.0, LibChatAnims, LibLatency, LibDurability, LibDialog-1.0, Masque
Expand Down Expand Up @@ -46,7 +46,6 @@ modules\Consumables.lua
modules\Cooldowns\module.xml
modules\ReadyCheck.lua
# modules with no settings
modules\Difficulty.lua
modules\Durability.lua
modules\Gear.lua
modules\Invite.lua
Expand Down

0 comments on commit 4d4fcf7

Please sign in to comment.