浏览代码

Update getinventorylist - favorite field (#6302)

- added favorite field
HAO YAN 3 年之前
父节点
当前提交
7a0233388a
共有 2 个文件被更改,包括 2 次插入0 次删除
  1. 1 0
      doc/script_commands.txt
  2. 1 0
      src/map/script.cpp

+ 1 - 0
doc/script_commands.txt

@@ -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

+ 1 - 0
src/map/script.cpp

@@ -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++;
 		}
 	}