Update getinventorylist - favorite field (#6302)

- added favorite field
This commit is contained in:
HAO YAN 2021-10-11 15:31:24 +08:00 committed by GitHub
parent 04d9e33112
commit 7a0233388a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -2955,6 +2955,7 @@ recreate these items perfectly if they are destroyed. Here's what you get:
@inventorylist_option_value5[] - fifth array of random option values
@inventorylist_option_parameter5[] - fifth array of random option parameters
@inventorylist_tradable - Returns if an item is tradable or not (Pass item_trade.txt, bound, and rental restrictions).
@inventorylist_favorite - Returns if an item is favorite or not
This could be handy to save/restore a character's inventory, since no other
command returns such a complete set of data, and could also be the only way to

View File

@ -14381,6 +14381,7 @@ BUILDIN_FUNC(getinventorylist)
pc_setreg(sd,reference_uid(add_str(randopt_var), j),sd->inventory.u.items_inventory[i].option[k].param);
}
pc_setreg(sd,reference_uid(add_str("@inventorylist_tradable"), j),pc_can_trade_item(sd, i));
pc_setreg(sd,reference_uid(add_str("@inventorylist_favorite"), j),sd->inventory.u.items_inventory[i].favorite);
j++;
}
}