Make sure item strings are there

This commit is contained in:
jl777
2019-02-09 22:25:09 -11:00
parent d5db98b42c
commit 564a7aece8
2 changed files with 12 additions and 4 deletions

View File

@@ -1354,6 +1354,15 @@ void rogue_restoreobject(THING *o,struct rogue_packitem *item)
void rogue_packitemstr(char *packitemstr,struct rogue_packitem *item)
{
static int32_t didinit;
if ( didinit == 0 )
{
init_names(); /* Set up names of scrolls */
init_colors(); /* Set up colors of potions */
init_stones(); /* Set up stone settings of rings */
init_materials(); /* Set up materials of wands */
didinit = 1;
}
THING *obj = new_item();
rogue_restoreobject(obj,item);
strcpy(packitemstr,inv_name(obj,FALSE));