NDui

NDui

143k Downloads

背包物品刷新的问题

fafaraway opened this issue · 1 comments

commented

我给BOA和BOE类型的物品分别加上了对应的字符串

if C.DB.inventory.bind_type and UpdateBindType then
	local itemLink = GetContainerItemLink(item.bagID, item.slotID)
	if not itemLink then
		return
	end

	local isBOA = CheckBoundStatus(item.link, item.bagID, item.slotID, ITEM_BNETACCOUNTBOUND) or CheckBoundStatus(item.link, item.bagID, item.slotID, ITEM_BIND_TO_BNETACCOUNT) or CheckBoundStatus(item.link, item.bagID, item.slotID, ITEM_ACCOUNTBOUND)
	local isSoulBound = CheckBoundStatus(item.link, item.bagID, item.slotID, ITEM_SOULBOUND)
	local _, _, itemRarity, _, _, _, _, _, _, _, _, _, _, bindType = GetItemInfo(itemLink)

	if isBOA or itemRarity == 7 or itemRarity == 8 then
		self.BindType:SetText('|cff00ccffBOA|r')
	elseif bindType == 2 and not isSoulBound then
		self.BindType:SetText('|cff1eff00BOE|r')
	else
		self.BindType:SetText('')
	end
end

这个功能本身没有问题,但是当背包里BOA或者BOE物品的位置发生变动,BOA或者BOE的字符串仍然会显示到空的位置上,这个该如何刷新呢?

bag1

bag2

commented

if not item then return end
return end前加一个settext
你社区里加一下我战网好了,有问题战网问,不要开issue了