Compare commits
5 Commits
v50400-1.7
...
v60200-1.7
| Author | SHA1 | Date | |
|---|---|---|---|
| 9c84784542 | |||
| 5775870bcd | |||
| 00683de69b | |||
| 2b8a6af9e2 | |||
| 232f424a6f |
@ -1,4 +1,4 @@
|
|||||||
## Interface: 50400
|
## Interface: 60200
|
||||||
## Author: Ramble (modified by Isharra) (updated by thegabbert) (converted to Ace3 by Takika)
|
## Author: Ramble (modified by Isharra) (updated by thegabbert) (converted to Ace3 by Takika)
|
||||||
## Title: MyBags |cff007FFF -Ace3-|r
|
## Title: MyBags |cff007FFF -Ace3-|r
|
||||||
## Notes: Complete Replacement for Inventory and Bank Bags.
|
## Notes: Complete Replacement for Inventory and Bank Bags.
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
local MBC = "MyBagsCore-1.0"
|
local MBC = "MyBagsCore-1.0"
|
||||||
local MBC_MINOR = "2014.02.11.3"
|
local MBC_MINOR = "2014.10.21.1"
|
||||||
if not LibStub then error(MBC .. " requires LibStub.") end
|
if not LibStub then error(MBC .. " requires LibStub.") end
|
||||||
local MyBagsCore = LibStub:NewLibrary(MBC, MBC_MINOR)
|
local MyBagsCore = LibStub:NewLibrary(MBC, MBC_MINOR)
|
||||||
if not MyBagsCore then return end
|
if not MyBagsCore then return end
|
||||||
@ -484,7 +484,7 @@ function MyBagsCore:BagIDToInvSlotID(bag, isBank)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if isBank then
|
if isBank then
|
||||||
return BankButtonIDToInvSlotID(bag, 1)
|
return BankButtonIDToInvSlotID(bag - 4, 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
return ContainerIDToInventoryID(bag)
|
return ContainerIDToInventoryID(bag)
|
||||||
@ -1265,7 +1265,7 @@ function MyBagsCore:GetXY(row, col)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function MyBagsCore:LayoutBagFrame(bagFrame)
|
function MyBagsCore:LayoutBagFrame(bagFrame)
|
||||||
local bagFrameName = bagFrame:GetName()
|
local bagFrameName = bagFrame:GetName()
|
||||||
local bagParent = bagFrame:GetParent():GetName()
|
local bagParent = bagFrame:GetParent():GetName()
|
||||||
local searchBox = _G[bagParent .. "SearchBox"]
|
local searchBox = _G[bagParent .. "SearchBox"]
|
||||||
local searchText = searchBox:GetText()
|
local searchText = searchBox:GetText()
|
||||||
@ -1355,8 +1355,41 @@ function MyBagsCore:LayoutBagFrame(bagFrame)
|
|||||||
self.curRow = self.curRow + 1
|
self.curRow = self.curRow + 1
|
||||||
end
|
end
|
||||||
|
|
||||||
local newItemTexture = _G[itemBase .. slot .. "NewItemTexture"]
|
local newItemTexture = _G[itemBase .. slot].NewItemTexture
|
||||||
newItemTexture:Hide()
|
local flash = _G[itemBase .. slot].flashAnim;
|
||||||
|
local newItemAnim = _G[itemBase .. slot].newitemglowAnim;
|
||||||
|
local isNewItem = C_NewItems.IsNewItem(bagFrame:GetID(), itemButton:GetID())
|
||||||
|
local isBattlePayItem = IsBattlePayItem(bagFrame:GetID(), itemButton:GetID())
|
||||||
|
|
||||||
|
local battlepayItemTexture = _G[itemBase .. slot].BattlepayItemTexture;
|
||||||
|
battlepayItemTexture:Hide();
|
||||||
|
|
||||||
|
if (isNewItem) then
|
||||||
|
if (isBattlePayItem) then
|
||||||
|
newItemTexture:Hide();
|
||||||
|
battlepayItemTexture:Show();
|
||||||
|
else
|
||||||
|
if (quality and NEW_ITEM_ATLAS_BY_QUALITY[quality]) then
|
||||||
|
newItemTexture:SetAtlas(NEW_ITEM_ATLAS_BY_QUALITY[quality]);
|
||||||
|
else
|
||||||
|
newItemTexture:SetAtlas("bags-glow-white");
|
||||||
|
end
|
||||||
|
battlepayItemTexture:Hide();
|
||||||
|
newItemTexture:Show();
|
||||||
|
end
|
||||||
|
if (not flash:IsPlaying() and not newItemAnim:IsPlaying()) then
|
||||||
|
flash:Play();
|
||||||
|
newItemAnim:Play();
|
||||||
|
end
|
||||||
|
else
|
||||||
|
battlepayItemTexture:Hide();
|
||||||
|
newItemTexture:Hide();
|
||||||
|
if (flash:IsPlaying() or newItemAnim:IsPlaying()) then
|
||||||
|
flash:Stop();
|
||||||
|
newItemAnim:Stop();
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
itemButton:Show()
|
itemButton:Show()
|
||||||
itemButton:ClearAllPoints()
|
itemButton:ClearAllPoints()
|
||||||
itemButton:SetPoint("TOPLEFT", self.frame:GetName(), "TOPLEFT", self:GetXY(self.curRow, self.curCol))
|
itemButton:SetPoint("TOPLEFT", self.frame:GetName(), "TOPLEFT", self:GetXY(self.curRow, self.curCol))
|
||||||
@ -1479,17 +1512,19 @@ function MyBagsCore:LayoutFrame()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function MyBagsCore:LayoutFrameOnEvent(event, unit)
|
function MyBagsCore:LayoutFrameOnEvent(event, unit)
|
||||||
if event == "UNIT_INVENTORY_CHANGED" and unit ~= "player" then
|
if event == "UNIT_INVENTORY_CHANGED" and unit ~= "player" then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if event == "ITEM_LOCK_CHANGED" and not self.watchLock then
|
if event == "ITEM_LOCK_CHANGED" and not self.watchLock then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if self.isLive then
|
if event == "BAG_UPDATE_COOLDOWN" then
|
||||||
self:LayoutFrame()
|
if unit == "player" and self.isLive then
|
||||||
end
|
self:LayoutFrame()
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function MyBagsCore:LockButton_OnClick()
|
function MyBagsCore:LockButton_OnClick()
|
||||||
|
|||||||
@ -399,6 +399,7 @@ function MyBank:OnEnable()
|
|||||||
MyBankFrameBag4:SetID(9)
|
MyBankFrameBag4:SetID(9)
|
||||||
MyBankFrameBag5:SetID(10)
|
MyBankFrameBag5:SetID(10)
|
||||||
MyBankFrameBag6:SetID(11)
|
MyBankFrameBag6:SetID(11)
|
||||||
|
|
||||||
if self.GetOpt("Replace") then
|
if self.GetOpt("Replace") then
|
||||||
BankFrame:UnregisterEvent("BANKFRAME_OPENED")
|
BankFrame:UnregisterEvent("BANKFRAME_OPENED")
|
||||||
BankFrame:UnregisterEvent("BANKFRAME_CLOSED")
|
BankFrame:UnregisterEvent("BANKFRAME_CLOSED")
|
||||||
@ -406,19 +407,19 @@ function MyBank:OnEnable()
|
|||||||
end
|
end
|
||||||
MyBankFramePortrait:SetTexture("Interface\\Addons\\MyBags\\Skin\\MyBankPortrait")
|
MyBankFramePortrait:SetTexture("Interface\\Addons\\MyBags\\Skin\\MyBankPortrait")
|
||||||
StaticPopupDialogs["PURCHASE_BANKBAG"] = {
|
StaticPopupDialogs["PURCHASE_BANKBAG"] = {
|
||||||
preferredIndex = 3;
|
preferredIndex = STATICPOPUPS_NUMDIALOGS,
|
||||||
text = TEXT(CONFIRM_BUY_BANK_SLOT),
|
text = TEXT(CONFIRM_BUY_BANK_SLOT),
|
||||||
button1 = TEXT(YES),
|
button1 = TEXT(YES),
|
||||||
button2 = TEXT(NO),
|
button2 = TEXT(NO),
|
||||||
OnAccept = function()
|
OnAccept = function(self)
|
||||||
if CT_oldPurchaseSlot then
|
if CT_oldPurchaseSlot then
|
||||||
CT_oldPurchaseSlot()
|
CT_oldPurchaseSlot()
|
||||||
else
|
else
|
||||||
PurchaseSlot()
|
PurchaseSlot()
|
||||||
end;
|
end;
|
||||||
end,
|
end,
|
||||||
OnShow = function()
|
OnShow = function(self)
|
||||||
MoneyFrame_Update(this:GetName().."MoneyFrame", GetBankSlotCost());
|
MoneyFrame_Update(self:GetName() .. "MoneyFrame", GetBankSlotCost());
|
||||||
end,
|
end,
|
||||||
showAlert = 1,
|
showAlert = 1,
|
||||||
hasMoneyFrame = 1,
|
hasMoneyFrame = 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user