ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Lua/XML Help (https://www.esoui.com/forums/forumdisplay.php?f=175)
-   -   Itemlink issue with [Dietrich] (lockpick) (https://www.esoui.com/forums/showthread.php?t=2100)

Klingo 08/11/14 03:39 PM

Itemlink issue with [Dietrich] (lockpick)
 
So far I used the function mentioned here (http://www.esoui.com/forums/showthread.php?t=991) for all itemLinks I had to create, and this always worked perfectly fine.

But then there is this one exception. If the game runs in german [ /script SetCVar("language.2","de") ], the itemLink for lockpicks (de: Dietrich) does not work.
E.g. with this "cursorPickup"-event it can easily be reproduced:
Lua Code:
  1. function pickupTest(type, param1, bagId, slotIndex, param4, param5, param6, itemSoundCategory)
  2.     CHAT_SYSTEM:AddMessage(">>>"..zo_strformat(SI_TOOLTIP_ITEM_NAME, GetItemLink(bagId, slotIndex, LINK_STYLE_BRACKETS)))
  3. end
  4. EVENT_MANAGER:RegisterForEvent("MyPickupTester", EVENT_CURSOR_PICKUP, pickupTest)

The result then looks like this:


With "GetItemName(integer bagId, integer slotIndex)" the output is:
EN: Lockpick
DE: Dietrich^m|Dietriche^p
FR: crochet^m

Apparently, this german masculine/plural combination in the itemName does not really work with SI_TOOLTIP_ITEM_NAME.

Does anyone maybe have an idea how to resolve this? :/

Garkin 08/11/14 04:24 PM

I think this is a bug on ZOS side, here is workaround:
Lua Code:
  1. local function GetFormatedItemLink(bagId, slotId, linkStyle)
  2.    local link = GetItemLink(bagId, slotId, linkStyle)
  3.    if link == "" then return end
  4.  
  5.    local name = zo_strformat(SI_TOOLTIP_ITEM_NAME, GetItemName(bagId, slotId))
  6.    local data = link:match("|H.-:(.-)|h")
  7.  
  8.    if linkStyle == LINK_STYLE_BRACKETS then
  9.       return ("|H%s:%s|h[%s]|h"):format(LINK_STYLE_BRACKETS, data, name)
  10.    else
  11.       return ("|H%s:%s|h%s|h"):format(LINK_STYLE_DEFAULT, data, name)
  12.    end
  13. end
  14.  
  15. function pickupTest(type, param1, bagId, slotIndex, param4, param5, param6, itemSoundCategory)
  16.    CHAT_SYSTEM:AddMessage(">>>"..GetFormatedItemLink(bagId, slotIndex, LINK_STYLE_BRACKETS))
  17. end
  18. EVENT_MANAGER:RegisterForEvent("MyPickupTester", EVENT_CURSOR_PICKUP, pickupTest)

merlight 08/11/14 05:03 PM

Yea, looks like ZO_Bug. "In Chat einfügen" doesn't work either.

zgrssd 08/11/14 06:53 PM

For a long time after launch there was a bug that the Character Gender was shown at the end of the ChatName in german chat. i.e. "Leonida Peterson^f"
That was simply a bug in how the names were parsed (they actually always send [name]^[gender] across, but hide the suffix during display). I would just report it. They might be able to fix it eventually.

Klingo 08/12/14 01:55 PM

Quote:

Originally Posted by Garkin (Post 11378)
I think this is a bug on ZOS side, here is workaround:

Works like a charm, thanks a lot!

Baertram 08/14/14 06:39 PM

It's definately a bug from ZOS side. If you try to destroy it the destroy popup will only show a text like "Do you want to ..."
The item's name and the following text is missing.


All times are GMT -6. The time now is 08:03 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI