summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/object1.c9
-rw-r--r--src/types.h6
2 files changed, 15 insertions, 0 deletions
diff --git a/src/object1.c b/src/object1.c
index 63789794..7d40a8c3 100644
--- a/src/object1.c
+++ b/src/object1.c
@@ -6193,6 +6193,15 @@ void object_pickup(int this_o_idx)
if (process_hooks(HOOK_GET, "(O,d)", o_ptr, this_o_idx))
return;
+ /* Hooks */
+ {
+ hook_get_in in = { o_ptr, this_o_idx };
+ if (process_hooks_new(HOOK_GET, &in, NULL))
+ {
+ return;
+ }
+ }
+
q_ptr = &p_ptr->inventory[INVEN_AMMO];
/* Carry the item */
diff --git a/src/types.h b/src/types.h
index a7d94037..3bbbb270 100644
--- a/src/types.h
+++ b/src/types.h
@@ -2260,6 +2260,12 @@ struct hook_move_in {
int x;
};
+typedef struct hook_get_in hook_get_in;
+struct hook_get_in {
+ object_type *o_ptr;
+ int o_idx;
+};
+
/*
* Structure for the "quests"
*/