summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/items.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-31 12:47:08 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-31 12:47:08 +0000
commit97e66bedd0d8a8d95781f8058b5560768f97a1ea (patch)
tree4693cb1cc3cd56a3eaf663e5e3ae6487226acd99 /crawl-ref/source/items.cc
parente815ad3dcd37899ea93e57bef68408ee4e971c87 (diff)
downloadcrawl-ref-97e66bedd0d8a8d95781f8058b5560768f97a1ea.tar.gz
crawl-ref-97e66bedd0d8a8d95781f8058b5560768f97a1ea.zip
[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
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);
}