diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-02-02 08:28:34 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-02-02 08:28:34 +0000 |
commit | 86a9bdcc2bfc6f38c1ca68013a6c2af370fe5495 (patch) | |
tree | c911937e5d6dbd7c26e7d0f22e7c7b965a8e4203 /src/map/map.c | |
parent | 97eec218a3f43cd6929ed2a4d530140dc352d515 (diff) | |
download | hercules-86a9bdcc2bfc6f38c1ca68013a6c2af370fe5495.tar.gz hercules-86a9bdcc2bfc6f38c1ca68013a6c2af370fe5495.tar.bz2 hercules-86a9bdcc2bfc6f38c1ca68013a6c2af370fe5495.tar.xz hercules-86a9bdcc2bfc6f38c1ca68013a6c2af370fe5495.zip |
Fixing r13503...
- Added missing id_db removal calls for all flooritem objects (bugreport:2729)
- Added missing destruction of skillunit_db on mapserver exit
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13505 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/map.c')
-rw-r--r-- | src/map/map.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/map/map.c b/src/map/map.c index 372647088..7dfd56488 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -1171,18 +1171,23 @@ int map_get_new_object_id(void) *------------------------------------------*/ int map_clearflooritem_timer(int tid, unsigned int tick, int id, intptr data) { - struct flooritem_data* fitem = idb_get(id_db, id); - if(fitem==NULL || fitem->bl.type!=BL_ITEM || (!data && fitem->cleartimer != tid)){ + struct flooritem_data* fitem = (struct flooritem_data*)idb_get(id_db, id); + if( fitem==NULL || fitem->bl.type!=BL_ITEM || (!data && fitem->cleartimer != tid) ) + { ShowError("map_clearflooritem_timer : error\n"); return 1; } + if(data) delete_timer(fitem->cleartimer,map_clearflooritem_timer); - else if(fitem->item_data.card[0] == CARD0_PET) + else + if(fitem->item_data.card[0] == CARD0_PET) // pet egg intif_delete_petdata( MakeDWord(fitem->item_data.card[1],fitem->item_data.card[2]) ); + clif_clearflooritem(fitem,0); map_delblock(&fitem->bl); map_freeblock(&fitem->bl); + map_deliddb(&fitem->bl); return 0; } |