summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/script_commands.txt1
-rw-r--r--src/map/script.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 19f189f81..237b1b3d7 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -3115,6 +3115,7 @@ invoking character has in its inventory, including all the data needed to
recreate these items perfectly if they are destroyed. Here's what you get:
@inventorylist_id[] - array of item ids.
+@inventorylist_idx[] - array of item inventory index.
@inventorylist_amount[] - their corresponding item amounts.
@inventorylist_equip[] - will return the slot the item is equipped on, if at all.
@inventorylist_refine[] - for how much it is refined.
diff --git a/src/map/script.c b/src/map/script.c
index bba559df8..348efae6f 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -14857,6 +14857,7 @@ static BUILDIN(getinventorylist)
}
pc->setreg(sd,reference_uid(script->add_variable("@inventorylist_expire"), j),sd->status.inventory[i].expire_time);
pc->setreg(sd,reference_uid(script->add_variable("@inventorylist_bound"), j),sd->status.inventory[i].bound);
+ pc->setreg(sd, reference_uid(script->add_variable("@inventorylist_idx"), j), i);
j++;
}
}