NDui

NDui

143k Downloads

[addon conflict - retail] pawn and ndui conflict

JourneyOver opened this issue ยท 3 comments

commented

As usual not sure if on NDui side or pawn side (i'm leaning more towards NDui side), but ever since the pre-patch phase 2 with both enabled bags do not work correctly. When picking up new items or moving items around in bags they technically move around but they leave the icon behind and are invisible on the new spot. If I disable pawn and leave NDui enabled bags work just fine, if I disable NDui and enable pawn bags work just fine..

video showing the issue to get a better understanding of what I mean:
https://youtu.be/VAC5cHvTCg0

edit: One thing I forgot to show was the error I get when I have both enabled:

Interface/AddOns/Pawn/Pawn.lua:422: attempt to call global 'GetContainerItemInfo' (a nil value)
Count: 1

Call Stack:
[string "=[C]"]: in function `GetContainerItemInfo'
[string "@Interface/AddOns/Pawn/Pawn.lua"]:422: in function `PawnIsContainerItemAnUpgrade'
[string "@Interface/AddOns/NDui/Modules/Bags/Core.lua"]:1010: in function <Interface/AddOns/NDui/Modules/Bags/Core.lua:1006>
[string "@Interface/AddOns/NDui/Modules/Bags/Core.lua"]:1090: in function `OnUpdateButton'
[string "@Interface/AddOns/NDui/Libs/cargBags/mixins-add/default.scaffold.lua"]:72: in function `ButtonUpdate'
[string "@Interface/AddOns/NDui/Libs/cargBags/base/implementation.lua"]:401: in function `UpdateSlot'
[string "@Interface/AddOns/NDui/Libs/cargBags/base/implementation.lua"]:426: in function `UpdateBag'
[string "@Interface/AddOns/NDui/Libs/cargBags/base/implementation.lua"]:453: in function `func'
[string "@Interface/AddOns/NDui/Libs/cargBags/base/implementation.lua"]:233: in function `OnEvent'
[string "@Interface/AddOns/NDui/Libs/cargBags/base/implementation.lua"]:88: in function `?'
[string "@Interface/AddOns/NDui/Libs/cargBags/base/core.lua"]:157: in function <Interface/AddOns/NDui/Libs/cargBags/base/core.lua:157>
[string "=[C]"]: ?
[string "=[C]"]: in function `Show'
[string "@Interface/AddOns/NDui/Libs/cargBags/base/implementation.lua"]:110: in function `Toggle'
[string "@Interface/AddOns/NDui/Libs/cargBags/base/core.lua"]:74: in function `ToggleAllBags'
[string "OPENALLBAGS"]:1: in function <[string "OPENALLBAGS"]:1>
commented

It should be the issue in pawns.
GetContainerItemInfo is replaced into C_Container.GetContainerItemInfo in 10.0.2.

commented

so this is a conflict between NDui and pawn but the conflict is caused on pawns side they would need to fix it? @siweia which is probably what this VgerMods/Pawn#15 will actually do if they ever merge it and create another release.

edit: Well that was a simple fix actually I went into pawn and just changed:

diff --git a/_retail_/Interface/AddOns/Pawn/Pawn.lua b/_retail_/Interface/AddOns/Pawn/Pawn.lua
index fbda571..9e8be1a 100644
--- a/_retail_/Interface/AddOns/Pawn/Pawn.lua
+++ b/_retail_/Interface/AddOns/Pawn/Pawn.lua
@@ -419,7 +419,7 @@ function PawnInitialize()
 		PawnOriginalIsContainerItemAnUpgrade = IsContainerItemAnUpgrade
 		PawnIsContainerItemAnUpgrade = function(bagID, slot, ...)
 			if PawnCommon.ShowBagUpgradeAdvisor then
-				local _, Count, _, _, _, _, ItemLink = GetContainerItemInfo(bagID, slot)
+				local _, Count, _, _, _, _, ItemLink = C_Container.GetContainerItemInfo(bagID, slot)
 				if not Count then return false end -- If the stack count is 0, it's clearly not an upgrade
 				if not ItemLink then return nil end -- If we didn't get an item link, but there's an item there, try again later
 				return PawnShouldItemLinkHaveUpgradeArrow(ItemLink, true) -- true means to check player level

and everything works xD tbh I'm thinking of getting rid of pawn anyways so this just gives me a little bit more of an excuse.

commented

Looks like pawn finally released an update and this is what they had to say as well:

Version 2.7.9
Dragonflight: In 10.0.2, Blizzard deleted the code for the game's built-in bag arrows. For now, green arrows in your bags won't work unless you have a Pawn-compatible bag addon installed. You can still see upgrade advice when you hover over the item, just not on the item's icon itself.
This version includes an update so that Pawn-compatible bag addons will work again.
I'm as confused as you are.

I'm going to go ahead and close this as well as the issue is solved I believed.