summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-30 13:53:13 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-30 13:53:13 +0000
commit15976eb40c2689d53d537ab425447eca572d9e7e (patch)
treefbabf9d6f2e9b87485babe28c19567d9e097d949 /src/map/script.c
parent90cbdc408520d9902be4f67d29a3ebc7f8625c5b (diff)
downloadhercules-15976eb40c2689d53d537ab425447eca572d9e7e.tar.gz
hercules-15976eb40c2689d53d537ab425447eca572d9e7e.tar.bz2
hercules-15976eb40c2689d53d537ab425447eca572d9e7e.tar.xz
hercules-15976eb40c2689d53d537ab425447eca572d9e7e.zip
- 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
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c7
1 files changed, 5 insertions, 2 deletions
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;
}
/*==========================================