• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[JASS] AddItemToStock() Color Issue

Not open for further replies.
Level 13
May 24, 2005
Hello everyone,

there seems to be a problem with the native function
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:
Not open for further replies.