summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
authormomacabu <momacabu@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-11-10 05:06:39 +0000
committermomacabu <momacabu@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-11-10 05:06:39 +0000
commit6557fcf9fa5d484b2d3c9ce24acd52d565c5c4a8 (patch)
treee85d1ee569b0a5ffbc93621682243dec332af1ce /src/map/map.c
parent7726e501b5156319a2940601ea1ef3ccfd7326fc (diff)
downloadhercules-6557fcf9fa5d484b2d3c9ce24acd52d565c5c4a8.tar.gz
hercules-6557fcf9fa5d484b2d3c9ce24acd52d565c5c4a8.tar.bz2
hercules-6557fcf9fa5d484b2d3c9ce24acd52d565c5c4a8.tar.xz
hercules-6557fcf9fa5d484b2d3c9ce24acd52d565c5c4a8.zip
- Fixed bugreport:6816, bugreport:6818, bugreport:6843, buying a Pet Egg is now working. Special thanks to Ind;
- Fixed a bug where pet egg was not deleted properly after clearing the floor. - Adjusted comment from msg_athena.conf, these IDs are being used! git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16897 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/map/map.c b/src/map/map.c
index e187c2625..880428084 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -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)
{
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");
return 1;
}
- if(data)
+ if (data)
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_delblock(&fitem->bl);
map_freeblock(&fitem->bl);
-
return 0;
}