Просмотр исходного кода

Update getinventorylist - favorite field (#6302)

- added favorite field
HAO YAN 3 лет назад
Родитель
Сommit
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++;
 		}
 	}