|
@@ -1301,23 +1301,23 @@ int map_get_new_object_id(void)
|
|
int map_clearflooritem_timer(int tid, unsigned int tick, int id, intptr_t data)
|
|
int map_clearflooritem_timer(int tid, unsigned int tick, int id, intptr_t data)
|
|
{
|
|
{
|
|
struct flooritem_data* fitem = (struct flooritem_data*)idb_get(id_db, id);
|
|
struct flooritem_data* fitem = (struct flooritem_data*)idb_get(id_db, id);
|
|
- if( fitem==NULL || fitem->bl.type!=BL_ITEM || (!data && fitem->cleartimer != tid) )
|
|
|
|
|
|
+
|
|
|
|
+ if (fitem == NULL || fitem->bl.type != BL_ITEM || (!data && fitem->cleartimer != tid))
|
|
{
|
|
{
|
|
ShowError("map_clearflooritem_timer : error\n");
|
|
ShowError("map_clearflooritem_timer : error\n");
|
|
return 1;
|
|
return 1;
|
|
}
|
|
}
|
|
|
|
|
|
- if(data)
|
|
|
|
|
|
+ if (data)
|
|
delete_timer(fitem->cleartimer,map_clearflooritem_timer);
|
|
delete_timer(fitem->cleartimer,map_clearflooritem_timer);
|
|
- 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);
|
|
|
|
|
|
+ if (search_petDB_index(fitem->item_data.nameid, PET_EGG) >= 0)
|
|
|
|
+ intif_delete_petdata(MakeDWord(fitem->item_data.card[1], fitem->item_data.card[2]));
|
|
|
|
+
|
|
|
|
+ clif_clearflooritem(fitem, 0);
|
|
map_deliddb(&fitem->bl);
|
|
map_deliddb(&fitem->bl);
|
|
map_delblock(&fitem->bl);
|
|
map_delblock(&fitem->bl);
|
|
map_freeblock(&fitem->bl);
|
|
map_freeblock(&fitem->bl);
|
|
-
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|