mirror of
https://github.com/parnic/breakables.git
synced 2025-06-17 01:41:51 -05:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
a701b935b0 | |||
4158971161 | |||
1741f54321 |
@ -53,7 +53,7 @@ function Breakables:OnInitialize()
|
||||
self.defaults = {
|
||||
profile = {
|
||||
buttonFrameLeft = {100, 100},
|
||||
buttonFrameTop = {-100, -150},
|
||||
buttonFrameTop = {700, 650},
|
||||
hideIfNoBreakables = true,
|
||||
maxBreakablesToShow = 5,
|
||||
showSoulbound = false,
|
||||
@ -64,7 +64,7 @@ function Breakables:OnInitialize()
|
||||
fontSize = 7,
|
||||
}
|
||||
}
|
||||
self.db = LibStub("AceDB-3.0"):New("BreakablesDB", self.defaults)
|
||||
self.db = LibStub("AceDB-3.0"):New("BreakablesDB", self.defaults, true)
|
||||
self.settings = self.db.profile
|
||||
|
||||
self:RegisterChatCommand("brk", "OnSlashCommand")
|
||||
@ -190,7 +190,7 @@ end
|
||||
function Breakables:CheckShouldFindBreakables()
|
||||
local latestTime = -1
|
||||
for i=0,#nextCheck do
|
||||
if nextCheck[i] > latestTime then
|
||||
if nextCheck[i] and nextCheck[i] > latestTime then
|
||||
latestTime = nextCheck[i]
|
||||
end
|
||||
end
|
||||
@ -407,7 +407,7 @@ function Breakables:CreateButtonFrame()
|
||||
if not self.buttonFrame[i] then
|
||||
self.buttonFrame[i] = CreateFrame("Button", "BreakablesButtonFrame1", self.frame, "SecureActionButtonTemplate")
|
||||
end
|
||||
self.buttonFrame[i]:SetPoint("TOPLEFT", UIParent, "TOPLEFT", self.settings.buttonFrameLeft[i], self.settings.buttonFrameTop[i])
|
||||
self.buttonFrame[i]:SetPoint("TOPLEFT", UIParent, "BOTTOMLEFT", self.settings.buttonFrameLeft[i], self.settings.buttonFrameTop[i])
|
||||
|
||||
if CanMill and (i == 1 or self.buttonFrame[1].type ~= BREAKABLE_HERB) then
|
||||
self.buttonFrame[i].type = BREAKABLE_HERB
|
||||
@ -483,9 +483,8 @@ function Breakables:OnMouseUp(frame)
|
||||
end
|
||||
end
|
||||
|
||||
local _, _, _, xOff, yOff = frame:GetPoint(1)
|
||||
self.settings.buttonFrameLeft[frameNum] = xOff
|
||||
self.settings.buttonFrameTop[frameNum] = yOff
|
||||
self.settings.buttonFrameLeft[frameNum] = frame:GetLeft()
|
||||
self.settings.buttonFrameTop[frameNum] = frame:GetTop()
|
||||
end
|
||||
|
||||
function Breakables:FindBreakables(bag)
|
||||
|
@ -2,11 +2,12 @@
|
||||
<Script file="libs\LibStub\LibStub.lua"/>
|
||||
<Script file="libs\CallbackHandler-1.0\CallbackHandler-1.0.lua"/>
|
||||
<Include file="libs\AceAddon-3.0\AceAddon-3.0.xml"/>
|
||||
<Include file="libs\AceGUI-3.0\AceGUI-3.0.xml"/>
|
||||
<Include file="libs\AceConfig-3.0\AceConfig-3.0.xml"/>
|
||||
<Include file="libs\AceConsole-3.0\AceConsole-3.0.xml"/>
|
||||
<Include file="libs\AceDB-3.0\AceDB-3.0.xml"/>
|
||||
<Include file="libs\AceDBOptions-3.0\AceDBOptions-3.0.xml"/>
|
||||
<Include file="libs\AceEvent-3.0\AceEvent-3.0.xml"/>
|
||||
<Include file="libs\AceGUI-3.0\AceGUI-3.0.xml"/>
|
||||
<Include file="libs\AceLocale-3.0\AceLocale-3.0.xml"/>
|
||||
<Include file="libs\LibBabble-Inventory-3.0\lib.xml"/>
|
||||
</Ui>
|
Reference in New Issue
Block a user