• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[JASS] AddItemToStock() Color Issue

Status
Not open for further replies.
Level 13
Joined
May 24, 2005
Messages
609
Hello everyone,

there seems to be a problem with the native function
JASS:
native AddItemToStock takes unit whichUnit, integer itemId, integer currentStock, integer stockMax returns nothing
Some time ago, the issue has already been discussed in this thread: http://www.hiveworkshop.com/forums/world-editor-help-zone-98/add-items-shops-via-triggers-201405/.
However, a solution has not been found yet so I want to give this another try.


Issue description:
Let's say I'm using a custom item with a colored name that is set in the editor fields 'Text - Name (unam)' and 'Text - Tooltip - Basic (utip)'.
For example, something like: |cffA772FAHelm of Battlethirst|r
In this example, the item name is colored in purple due to the color code A772FA.
Now I use the function AddItemToStock(myMerchant, myItem, 1, 1) to add the above item to a merchant during runtime.
While the addition of the item works fine, the name of the item displays in white in the merchant offers, not in purple, as it has actually been defined above.
Thus, unfortunately, it seems that the AddItemToStock function unintentionally ignores / removes the color code from the item name.


Maybe someone knows a solution or a work-around to this issue.
Thanks for your help!
 
Last edited:
Status
Not open for further replies.
Top