From 15976eb40c2689d53d537ab425447eca572d9e7e Mon Sep 17 00:00:00 2001 From: skotlex Date: Fri, 30 Jun 2006 13:53:13 +0000 Subject: - Moved item group enumeration from itemdb.h to map.h - Cleanup in itemheal related code, fixed the item heal group bonus not working on Groups beyond 7. - Fixed pet's loot not being moved to your inventory on logout. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7419 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/script.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/map/script.c') diff --git a/src/map/script.c b/src/map/script.c index 21fe6dab5..c442f210f 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -3343,6 +3343,7 @@ int buildin_heal(struct script_state *st) */ int buildin_itemheal(struct script_state *st) { + struct map_session_data *sd; int hp,sp; hp=conv_num(st,& (st->stack->stack_data[st->start+2])); @@ -3353,8 +3354,10 @@ int buildin_itemheal(struct script_state *st) potion_sp = sp; return 0; } - - pc_itemheal(script_rid2sd(st),hp,sp); + + sd = script_rid2sd(st); + if (!sd) return 0; + pc_itemheal(sd,sd->itemid,hp,sp); return 0; } /*========================================== -- cgit v1.2.3-60-g2f50