Commit 2fd067d9 authored by Azilroka's avatar Azilroka

Merging Classic

parent 96056d8b
......@@ -43,9 +43,12 @@ if _G.ElvUI then
end
end
end
PA.UIScale = UIParent:GetScale()
PA.MyFaction = UnitFactionGroup('player')
PA.isClassic = WOW_PROJECT_ID == WOW_PROJECT_CLASSIC
-- Pixel Perfect
PA.ScreenWidth, PA.ScreenHeight = GetPhysicalScreenSize()
PA.Multiple = 1
......@@ -71,6 +74,7 @@ end
PA.Title = GetAddOnMetadata('ProjectAzilroka', 'Title')
PA.Version = GetAddOnMetadata('ProjectAzilroka', 'Version')
PA.Authors = GetAddOnMetadata('ProjectAzilroka', 'Author'):gsub(", ", " ")
local Color = CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[PA.MyClass] or RAID_CLASS_COLORS[PA.MyClass]
PA.ClassColor = { Color.r, Color.g, Color.b }
......@@ -282,4 +286,4 @@ function PA:PLAYER_LOGIN()
end
PA:RegisterEvent('ADDON_LOADED')
PA:RegisterEvent('PLAYER_LOGIN')
\ No newline at end of file
PA:RegisterEvent('PLAYER_LOGIN')
Subproject commit 605f0be45e17573cb70b68c7fefe776248401dba
Subproject commit f0868aa724489315d2dc8f3bdf43791ee56d5bbe
<Ui> <Script file="Ace3\LibStub\LibStub.lua"/> <Include file="Ace3\CallbackHandler-1.0\CallbackHandler-1.0.xml"/> <Include file="Ace3\AceAddon-3.0\AceAddon-3.0.xml"/> <Include file="Ace3\AceEvent-3.0\AceEvent-3.0.xml"/> <Include file="Ace3\AceTimer-3.0\AceTimer-3.0.xml"/> <Include file="Ace3\AceHook-3.0\AceHook-3.0.xml"/> <Include file="Ace3\AceDB-3.0\AceDB-3.0.xml"/> <Include file="Ace3\AceDBOptions-3.0\AceDBOptions-3.0.xml"/> <Include file="Ace3\AceLocale-3.0\AceLocale-3.0.xml"/> <Include file="Ace3\AceConsole-3.0\AceConsole-3.0.xml"/> <Include file="Ace3\AceGUI-3.0\AceGUI-3.0.xml"/> <Include file="Ace3\AceConfig-3.0\AceConfig-3.0.xml"/> <Script file="LibSharedMedia-3.0\LibSharedMedia-3.0.lua"/> <Script file="LibButtonGlow-1.0\LibButtonGlow-1.0.lua"/> <Script file="LibDataBroker-1.1\LibDataBroker-1.1.lua"/> <Script file="LibActionButton-1.0\LibActionButton-1.0.lua"/> <Include file="AceGUI-3.0-SharedMediaWidgets\widget.xml"/></Ui>
\ No newline at end of file
<Ui>
<Script file="Ace3\LibStub\LibStub.lua"/>
<Include file="Ace3\CallbackHandler-1.0\CallbackHandler-1.0.xml"/>
<Include file="Ace3\AceAddon-3.0\AceAddon-3.0.xml"/>
<Include file="Ace3\AceEvent-3.0\AceEvent-3.0.xml"/>
<Include file="Ace3\AceTimer-3.0\AceTimer-3.0.xml"/>
<Include file="Ace3\AceHook-3.0\AceHook-3.0.xml"/>
<Include file="Ace3\AceDB-3.0\AceDB-3.0.xml"/>
<Include file="Ace3\AceDBOptions-3.0\AceDBOptions-3.0.xml"/>
<Include file="Ace3\AceLocale-3.0\AceLocale-3.0.xml"/>
<Include file="Ace3\AceConsole-3.0\AceConsole-3.0.xml"/>
<Include file="Ace3\AceGUI-3.0\AceGUI-3.0.xml"/>
<Include file="Ace3\AceConfig-3.0\AceConfig-3.0.xml"/>
<Script file="LibSharedMedia-3.0\LibSharedMedia-3.0.lua"/>
<Script file="LibButtonGlow-1.0\LibButtonGlow-1.0.lua"/>
<Script file="LibDataBroker-1.1\LibDataBroker-1.1.lua"/>
<Script file="LibActionButton-1.0\LibActionButton-1.0.lua"/>
<Include file="AceGUI-3.0-SharedMediaWidgets\widget.xml"/>
</Ui>
local PA = _G.ProjectAzilroka
if PA.isClassic then return end
local BB = PA:NewModule('BigButtons', 'AceEvent-3.0')
PA.BB, _G.BigButtons = BB, BB
......@@ -370,4 +372,4 @@ function BB:Initialize()
PA:SetTemplate(Bar.SeedsFrame)
Bar.SeedsFrame.BorderColor = { Bar.SeedsFrame:GetBackdropBorderColor() }
end
\ No newline at end of file
end
......@@ -16,6 +16,7 @@ local ONE_HOUR = 60 * ONE_MINUTE;
local ONE_DAY = 24 * ONE_HOUR;
local ONE_MONTH = 30 * ONE_DAY;
local ONE_YEAR = 12 * ONE_MONTH;
--[[
/run for i,v in pairs(_G) do if type(i)=="string" and i:match("BNET_CLIENT_") then print(i,"=",v) end end
]]
......@@ -186,6 +187,7 @@ EFL.Icons = {
function EFL:UpdateFriends(button)
local nameText, nameColor, infoText, broadcastText, _, Cooperate
local cooperateColor = GRAY_FONT_COLOR
if button.buttonType == FRIENDS_BUTTON_TYPE_WOW then
local name, level, class, area, connected, status = GetFriendInfo(button.id)
broadcastText = nil
......@@ -204,6 +206,7 @@ function EFL:UpdateFriends(button)
end
nameColor = FRIENDS_WOW_NAME_COLOR
Cooperate = true
cooperateColor = LIGHTYELLOW_FONT_COLOR
else
button.status:SetTexture(EFL.Icons.Status.Offline[self.db.StatusIconPack])
nameText = name
......@@ -212,7 +215,7 @@ function EFL:UpdateFriends(button)
infoText = area
elseif button.buttonType == FRIENDS_BUTTON_TYPE_BNET and BNConnected() then
local presenceID, presenceName, battleTag, isBattleTagPresence, toonName, toonID, client, isOnline, lastOnline, isAFK, isDND, messageText, noteText, isRIDFriend, messageTime, canSoR = BNGetFriendInfo(button.id)
local realmName, realmID, faction, race, class, zoneName, level, gameText
local realmName, realmID, faction, race, class, zoneName, level, gameText, wowProjectID, mobile
broadcastText = messageText
local characterName = toonName
if presenceName then
......@@ -225,7 +228,8 @@ function EFL:UpdateFriends(button)
end
if characterName then
_, _, _, realmName, realmID, faction, race, class, _, zoneName, level, gameText = BNGetGameAccountInfo(toonID)
_, _, _, realmName, realmID, faction, race, class, _, zoneName, level, gameText, _, _, _, _, _, _, _, _, wowProjectID, mobile = BNGetGameAccountInfo(toonID)
if client == BNET_CLIENT_WOW then
if (level == nil or tonumber(level) == nil) then level = 0 end
local classcolor = PA:ClassColorCode(class)
......@@ -239,7 +243,11 @@ function EFL:UpdateFriends(button)
else
nameText = format('%s |cFFFFFFFF(|r%s|cFFFFFFFF)|r', nameText, WrapTextInColorCode(characterName, classcolor))
end
Cooperate = CanCooperateWithGameAccount(toonID)
if wowProjectID == WOW_PROJECT_MAINLINE and not (WOW_PROJECT_ID == WOW_PROJECT_CLASSIC) then
Cooperate = CanCooperateWithGameAccount(toonID)
cooperateColor = LIGHTYELLOW_FONT_COLOR
end
else
if not EFL.Icons.Game[client] then
client = 'App'
......@@ -250,6 +258,9 @@ function EFL:UpdateFriends(button)
if isOnline then
button.status:SetTexture(EFL.Icons.Status[(isDND and 'DND' or isAFK and 'AFK' or 'Online')][self.db.StatusIconPack])
--BNET_FRIEND_ZONE_WOW_CLASSIC = 'WoW Classic: %s'
--BNET_FRIEND_TOOLTIP_WOW_CLASSIC = 'WoW Classic'
if client == BNET_CLIENT_WOW then
gameText = gsub(gameText, '&apos;', "'")
......@@ -259,6 +270,14 @@ function EFL:UpdateFriends(button)
infoText = gameText
end
if wowProjectID == WOW_PROJECT_CLASSIC then
if realmName == PA.MyRealm then
infoText = zoneName
else
infoText = format('%s - %s - %s', zoneName, realmName, gameText)
end
end
button.gameIcon:SetTexture(EFL.Icons.Game[faction][self.db[faction]])
else
if not EFL.Icons.Game[client] then
......@@ -269,6 +288,8 @@ function EFL:UpdateFriends(button)
end
nameColor = FRIENDS_BNET_NAME_COLOR
button.gameIcon:SetTexCoord(0, 1, 0, 1)
button.gameIcon:SetDrawLayer('OVERLAY')
button.gameIcon:SetAlpha(1)
else
button.status:SetTexture(EFL.Icons.Status.Offline[self.db.StatusIconPack])
nameColor = FRIENDS_GRAY_COLOR
......@@ -295,11 +316,11 @@ function EFL:UpdateFriends(button)
button.name:SetText(nameText)
button.name:SetTextColor(nameColor.r, nameColor.g, nameColor.b)
button.info:SetText(infoText)
button.info:SetTextColor(unpack(Cooperate and {1, .96, .45} or {.49, .52, .54}))
button.info:SetTextColor(cooperateColor.r, cooperateColor.g, cooperateColor.b)
button.name:SetFont(PA.LSM:Fetch('font', self.db.NameFont), self.db.NameFontSize, self.db.NameFontFlag)
button.info:SetFont(PA.LSM:Fetch('font', self.db.InfoFont), self.db.InfoFontSize, self.db.InfoFontFlag)
if button.Favorite:IsShown() then
if button.Favorite and button.Favorite:IsShown() then
button.Favorite:ClearAllPoints()
button.Favorite:SetPoint("TOPLEFT", button.name, "TOPLEFT", button.name:GetStringWidth(), 0);
end
......
......@@ -5,6 +5,7 @@
<Script file="EnhancedFriendsList.lua"/>
<Script file="EnhancedShadows.lua"/>
<Script file="FasterLoot.lua"/>
<Script file="LootConfirm.lua"/>
<Script file="MovableFrames.lua"/>
<Script file="SquareMinimapButtons.lua"/>
<Script file="stAddonManager.lua"/>
......
local PA = _G.ProjectAzilroka
if not PA.isClassic then return end
local LC = PA:NewModule('LootConfirm', 'AceEvent-3.0')
PA.LC, _G.LootConfirm = LC, LC
......@@ -18,7 +20,7 @@ function LC:HandleEvent(event, ...)
if NumLootItems == 0 then
CloseLoot()
end
if event == 'CONFIRM_LOOT_ROLL' or event == 'CONFIRM_DISENCHANT_ROLL' then
if event == 'CONFIRM_LOOT_ROLL' then
local arg1, arg2 = ...
ConfirmLootRoll(arg1, arg2)
elseif event == 'LOOT_OPENED' or event == 'LOOT_BIND_CONFIRM' then
......@@ -32,20 +34,7 @@ end
function LC:START_LOOT_ROLL(event, id)
if not (self.db['Greed'] or self.db['Disenchant']) then return end
local _, _, _, Quality, _, _, _, Disenchant = GetLootRollItemInfo(id)
local Link = GetLootRollItemLink(id)
local ItemID = tonumber(strmatch(Link, 'item:(%d+)'))
if self.db['ByLevel'] then
if IsEquippableItem(Link) then
local _, _, _, ItemLevel, _, _, _, _, Slot = GetItemInfo(Link)
local ItemLink = GetInventoryItemLink('player', Slot)
local MatchItemLevel = ItemLink and select(4, GetItemInfo(ItemLink)) or 1
if Quality ~= 7 and MatchItemLevel < ItemLevel then
return
end
end
end
local _, _, _, _, _, _, _, Disenchant = GetLootRollItemInfo(id)
RollOnLoot(id, self.db['Disenchant'] and Disenchant and LOOT_ROLL_TYPE_DISENCHANT or LOOT_ROLL_TYPE_GREED)
end
......@@ -55,7 +44,6 @@ function LC:GetOptions()
type = 'group',
name = LC.Title,
desc = LC.Description,
order = 208,
args = {
header = {
order = 1,
......@@ -88,19 +76,6 @@ function LC:GetOptions()
name = PA.ACL['Auto Disenchant'],
desc = PA.ACL['Automatically disenchant'],
},
ByLevel = {
order = 4,
type = 'toggle',
name = PA.ACL['Auto-roll based on a given level'],
desc = PA.ACL['This will auto-roll if you are above the given level if: You cannot equip the item being rolled on, or the ilevel of your equipped item is higher than the item being rolled on or you have an heirloom equipped in that slot'],
},
Level = {
order = 5,
type = 'range',
name = PA.ACL['Level to start auto-rolling from'],
min = 1, max = MAX_PLAYER_LEVEL, step = 1,
disabled = function() return not LC.db['ByLevel'] end,
},
},
},
},
......@@ -110,13 +85,12 @@ function LC:GetOptions()
end
function LC:BuildProfile()
PA.Defaults.profile['LootConfirm'] = {
['Enable'] = true,
['Confirm'] = true,
['Greed'] = false,
['Disenchant'] = false,
['ByLevel'] = false,
['Level'] = MAX_PLAYER_LEVEL,
}
PA.Options.args.general.args.LootConfirm = {
......@@ -129,20 +103,18 @@ end
function LC:Initialize()
LC.db = PA.db.LootConfirm
if not LC.db.Enable ~= true then
if LC.db.Enable ~= true then
return
end
LC:GetOptions()
UIParent:UnregisterEvent('LOOT_BIND_CONFIRM')
UIParent:UnregisterEvent('CONFIRM_DISENCHANT_ROLL')
UIParent:UnregisterEvent('CONFIRM_LOOT_ROLL')
LC:RegisterEvent('CONFIRM_DISENCHANT_ROLL', 'HandleEvent')
LC:RegisterEvent('CONFIRM_LOOT_ROLL', 'HandleEvent')
LC:RegisterEvent('LOOT_OPENED', 'HandleEvent')
LC:RegisterEvent('LOOT_BIND_CONFIRM', 'HandleEvent')
--LC:RegisterEvent('START_LOOT_ROLL')
end
\ No newline at end of file
end
......@@ -53,6 +53,7 @@ local Frames = {
["TradeFrame"] = { "TOPLEFT", _G.UIParent, "TOPLEFT", 16, -116 },
["VideoOptionsFrame"] = { "CENTER", _G.UIParent, "CENTER", 0, 0 },
["WorldMapFrame"] = { "CENTER", _G.UIParent, "CENTER", 0, 0 },
["WorldStateScoreFrame"] = { "CENTER", _G.UIParent, "CENTER", 0, 0 },
}
local AddOnFrames = {
......@@ -157,6 +158,9 @@ function MF:LoadPosition(frame)
local a, b, c, d, e = unpack(MF.db[frame:GetName()]['Points'])
frame:ClearAllPoints()
frame:SetPoint(a, b, c, d, e, true)
else
frame:ClearAllPoints()
frame:SetPoint(unpack(PA.Defaults.profile['MovableFrames'][frame:GetName()]['Points']))
end
end
......@@ -186,7 +190,6 @@ end
function MF:MakeMovable(Name)
if not _G[Name] then
PA:Print(PA.ACL["Frame doesn't exist: "]..Name)
return
end
......
local PA = _G.ProjectAzilroka
if PA.isClassic then return end
local RR = PA:NewModule('ReputationReward', 'AceEvent-3.0', 'AceTimer-3.0', 'AceHook-3.0')
local AS
PA.RR = RR
......
This diff is collapsed.
## Interface: 80100
## Interface: 80200
## Title: |cFF16C3F2Project|r|cFFFFFFFFAzilroka|r
## Author: Azilroka
## Version: 1.50
......@@ -12,7 +12,7 @@ Init.lua
Modules\Enhanced_Config.lua
LibElvUIPlugin-1.0.lua
Libs\LibElvUIPlugin-1.0\LibElvUIPlugin-1.0.lua
Media\Media.lua
Modules\Load_Modules.xml
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment