summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/items.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/items.cc')
-rw-r--r--crawl-ref/source/items.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index 63f2ec5318..93c1d9dad8 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -1792,14 +1792,17 @@ bool copy_item_to_grid( const item_def &item, int x_plos, int y_plos,
// location.
//
//---------------------------------------------------------------
-bool move_top_item( int src_x, int src_y, int dest_x, int dest_y )
+bool move_top_item( const coord_def &pos, const coord_def &dest )
{
- int item = igrd[ src_x ][ src_y ];
+ int item = igrd(pos);
if (item == NON_ITEM)
return (false);
+ dungeon_events.fire_position_event(
+ dgn_event(DET_ITEM_MOVED, pos, 0, item, -1, dest), pos);
+
// Now move the item to its new possition...
- move_item_to_grid( &item, dest_x, dest_y );
+ move_item_to_grid( &item, dest.x, dest.y );
return (true);
}