TipTac Reborn

TipTac Reborn

862k Downloads

Position of gold, silver, and copper currency icon of item wrong

frozn opened this issue ยท 9 comments

commented

From Gythwulf from curseforge:

I get strange artifacts on and around the tooltip since DF prepatch. In the below screenshot, you can see a gold, silver, and copper currency icon. When I first hover over an item, those are outside of the tooltip, then they snap to somewhere inside the tooltip, and they don't move when I move the cursor, even though the tooltip anchor does move. Sometimes I get random gem icons floating outside of the tooltip as well.

Has anyone else experienced this?

https://imgur.com/a/MpqCfRY

Source: https://www.curseforge.com/wow/addons/tip-tac?comment=3349

commented

I haven't experienced this, although, in the Character Panel they do seem to "shrink" down during the initial hover over period.

Has you can see here: https://i.imgur.com/ewXg9IC.gif

Very minimal but other than that, the gold/silver/copper icons are consistent.

However, could this be the case when experience C Stack Overflow errors? Because I have found that after this error occurs, there seems to be an issue with displaying tooltips.

commented

Don't have any screenshots but I had the same issue with semi-random floating icons when mousing over stuff. They never snapped back to inside the tooltip that I can recall having seen though.

Also possibly of note, have not seen this re-occur since I patched the mod I use to expose more item info/more granular vendor value data to the tooltip (so no default vendor value/currency icons rendered anymore), not even the non-currency icons.

commented

I also have this seemingly randomly. I think it may be caused by another addon tainting the tooltip coin string somehow. It's difficult to reproduce consistently.

I tried two other tooltip addons and it was happening in both of them as well. However with default tooltips it never happens.

commented

I can reproduce it: If I disable addon Broker_DurabilityInfo, the vendor price including coins are visible and in place. If i enable this addon, the vendor price disappears and the coin icons moved to another position.

I digged a little bit deeper and found out, that Broker_DurabilityInfo uses an hidden GameTooltip and set it to display the involved items. It uses the return values to calculate the repair costs. But calling SetInventoryItem() or SetBagItem() on the hidden GameTooltip (see code below) somehow has an impact on the GameTooltip which is currently displayed.

This is also responsible for another error (#107): The styling of level and race doesn't work, if it is in line 3 (1st line player name, 2nd line guild). In this case modifying the line 3 with _G["GameTooltipTextLeft3"]:SetText() isn't possible any more.

If you hover over a player who isn't in a guild, modifying line 2 with _G["GameTooltipTextLeft2"]:SetText() works oddly. If I comment out the loops with SetInventoryItem() and SetBagItem() or disable addon Broker_DurabilityInfo, modifying line 3 works also.

Somehow I have a feeling that this might be an internal Blizzard bug. With DF Beta (10.0.2) there is an overhaul of GameTooltip incoming where you don't need hidden scanning GameTooltip frames to determine infos from a tooltip. The new namespace C_TooltipInfo provides APIs for retrieving structured data for use in tooltips:

https://wowpedia.fandom.com/wiki/Patch_10.0.2/API_changes#Tooltip_Changes

Nevertheless, the calls on the hidden GameTooltip frame should not have any influence on the other currently visible GameTooltip frame.

local hiddenFrame = CreateFrame("GameTooltip")
hiddenFrame:SetOwner(WorldFrame, "ANCHOR_NONE")

for index,item in pairs(slotNames) do
	local val, max = GetInventoryItemDurability(slotNames[index][ID])
	local hasItem, hasCooldown, repairCost = hiddenFrame:SetInventoryItem("player", slotNames[index][ID])    <-------------
	if max then
		if merchantState == AT_MERCHANT then
			repairCost = self:MerchantCorrection(repairCost)
		end
		total = total + max
		current = current + val
		totalcost = totalcost + repairCost
		slotNames[index][VALUE] = val
		slotNames[index][MAX] = max
		slotNames[index][COST] = repairCost
		percent = val/max
		if percent < percentmin then percentmin = percent end
	else
		slotNames [index][MAX] = 0
	end
end

for bag = 0, 4 do
	local nrslots = GetContainerNumSlots(bag)
	for slot = 1, nrslots do
		local val, max = GetContainerItemDurability(bag, slot)
		local hasCooldown, repairCost = hiddenFrame:SetBagItem(bag, slot)        <--------
		if max then
			if merchantState == AT_MERCHANT then
				repairCost = self:MerchantCorrection(repairCost)
			end
			bagTotal = bagTotal + max
			bagCurrent = bagCurrent + val
			bagCost = bagCost + repairCost
			percent = val/max
			if percent < percentmin then percentmin = percent end
		end
	end
end
commented

@frozn Your comment made me realize that the culprit for me was an adibags plugin that separated BoE items into their own category, which of course includes tooltip scanning. Thank you.

commented

I opened the following ticket for blizzard:

Hello,

within addon developing for wow I noticed a bug under DF 10.0.0 regarding the GameTooltip:

If you hover over a unit or npc, the GameTooltip pops up showing the unit name plus other infos. But if you enter the following command in the chat window creating a hidden scanning tooltip, the content of the currently displaying GameTooltip disappears:

/run local hgtt = CreateFrame("GameTooltip"); hgtt:SetOwner(WorldFrame, "ANCHOR_NONE"); local hasItem, hasCooldown, repairCost = hgtt:SetInventoryItem("player", 1);

In addition if you hover over an item, it behaves differently. If you enter the mention command above, the content of the item tooltip excluding the coin icons (from vendor price) only shortly disappear and then comes back, which seems also strange.

In my opinion the function calls on the hidden scanning tooltip frame should have no influence on the currently displaing GameTooltip frame, even with the upcoming new namespace C_TooltipInfo for retrieving structured data with DF 10.0.2.

Greatings,

commented

Item tooltips are still behaving properly for me (using another mod that modifies currency values in tooltips so they're rendered in text), but I noticed the other day that world quest tooltips are not... and this includes ones with progress bars that you fill in. The coin icons are floating disconnected above the quest tooltip, and the progress bars. Presumably same cause, but more than just currency icons so posting here. Actually grabbed a screenshot this time, included below:
WoWScrnShot_110222_171237

commented

Any addons that scan hidden tooltips will taint them right now. There will be a new API for getting tooltip info without having to scan them in 10.0.2 which should fix this as long as the addons are updated.

TipTac is not the problem.

commented

Summary:

The issue with the sometimes blank tooltips currently is caused by other addons using a hidden scanning tooltip to determine informations about items/spells etc. and is a bug in the current wow patch 10.0.0. This will be fixed with the upcoming wow patch 10.0.2 (currently on PTR, works fine here).

Additionally the styling of level, class and race in tooltip line 3 for players in a guild doesn't also work in this case under patch 10.0.0.