summaryrefslogtreecommitdiff
path: root/src/map/npc.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/npc.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/npc.c')
-rw-r--r--src/map/npc.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 7389808c5..65f5ee577 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -1536,11 +1536,16 @@ int npc_buylist(struct map_session_data* sd, int n, unsigned short* item_list)
int amount = item_list[i*2+0];
struct item item_tmp;
- memset(&item_tmp,0,sizeof(item_tmp));
- item_tmp.nameid = nameid;
- item_tmp.identify = 1;
+ if (itemdb_type(nameid) == IT_PETEGG)
+ pet_create_egg(sd, nameid);
+ else
+ {
+ memset(&item_tmp,0,sizeof(item_tmp));
+ item_tmp.nameid = nameid;
+ item_tmp.identify = 1;
- pc_additem(sd,&item_tmp,amount,LOG_TYPE_NPC);
+ pc_additem(sd,&item_tmp,amount,LOG_TYPE_NPC);
+ }
}
// custom merchant shop exp bonus