Combuctor 整合背包Addon小修改

 雖然以前很習慣自己手動整理背包,不過看到許多人用使用像OneBag或Bagnon等整合背包似乎也很方便,因此
也找了一些類似的Addon來使用,最後是選上Combuctor,因為它除了背包整合功能外還多了分類標籤和物品品質
過濾等功能,這樣在一個大的整合背包找東西才方便,不過它有個小缺點是每當開啟拍賣場或是專業技能視窗時會自
動打開背包,但Combuctor設定功能中沒有將它關閉的選項,且預設的分類標籤很少,結果每開一個角色就要幫他
選一次,很不方便,因此決定直接修改原始內容。

 打開World of Warcraft\Interface\AddOns\Combuctor\Combuctor.lua:
self:RegisterEvent(‘MAIL_CLOSED’, AutoHideInventory)

	self:RegisterEvent('TRADE_SHOW', AutoShowInventory)
	self:RegisterEvent('TRADE_CLOSED', AutoHideInventory)
	self:RegisterEvent('TRADE_SKILL_SHOW', AutoShowInventory)
	self:RegisterEvent('TRADE_SKILL_CLOSE', AutoHideInventory)
	self:RegisterEvent('AUCTION_HOUSE_SHOW', AutoShowInventory)
	self:RegisterEvent('AUCTION_HOUSE_CLOSED', AutoHideInventory)
	self:RegisterEvent('AUCTION_HOUSE_SHOW', AutoShowInventory)
	self:RegisterEvent('AUCTION_HOUSE_CLOSED', AutoHideInventory)

把不想自動顯示背包的地方註解(或是刪除)即可:

	self:RegisterEvent('MAIL_CLOSED', AutoHideInventory)
	self:RegisterEvent('TRADE_SHOW', AutoShowInventory)
	self:RegisterEvent('TRADE_CLOSED', AutoHideInventory)
--	self:RegisterEvent('TRADE_SKILL_SHOW', AutoShowInventory)
--	self:RegisterEvent('TRADE_SKILL_CLOSE', AutoHideInventory)
--	self:RegisterEvent('AUCTION_HOUSE_SHOW', AutoShowInventory)
--	self:RegisterEvent('AUCTION_HOUSE_CLOSED', AutoHideInventory)
--	self:RegisterEvent('AUCTION_HOUSE_SHOW', AutoShowInventory)
--	self:RegisterEvent('AUCTION_HOUSE_CLOSED', AutoHideInventory)

再來是增加預設分類標籤,一樣修改相同的檔案,在 local function getDefaultInventorySets(class) 這個函式中加入想預設增加的標籤。
例如我希望每個角色預設加入裝備、消耗品、任務、專業技能物品、雜項五個分類:

local function getDefaultInventorySets(class)
	local sets, exclude

	if class == 'HUNTER' then
		sets, exclude = addSet(sets, exclude, L.All, L.All, L.Shards)
	elseif class == 'WARLOCK' then
		sets, exclude = addSet(sets, exclude, L.All, L.All, L.Ammo)
	else
		sets, exclude = addSet(sets, exclude, L.All, L.All, L.Ammo, L.Shards)
	end
	
	sets, exclude = addSet(sets, exclude, L.Equipment)
	sets, exclude = addSet(sets, exclude, L.Usable)
	sets, exclude = addSet(sets, exclude, L.Quest)
	sets, exclude = addSet(sets, exclude, L.TradeGood)
	sets, exclude = addSet(sets, exclude, L.Misc)
	
	return sets, exclude
end

其中第99~103行就是我額外加入的敘述,可以依自己的需求增減,以下再附上各標籤對應的名稱,這些名稱
可以在World of Warcraft\Interface\AddOns\Combuctor\localization\localization.zhTW.lua找到。
combuctor

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。

這個網站採用 Akismet 服務減少垃圾留言。進一步了解 Akismet 如何處理網站訪客的留言資料