From 97e66bedd0d8a8d95781f8058b5560768f97a1ea Mon Sep 17 00:00:00 2001 From: dshaligram Date: Mon, 31 Mar 2008 12:47:08 +0000 Subject: [1923246] Item pickup marker moves itself when the item it's guarding is apported. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3976 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/items.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/items.cc') 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); } -- cgit v1.2.3-54-g00ecf