diff options
author | FlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-11-11 04:02:48 +0000 |
---|---|---|
committer | FlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-11-11 04:02:48 +0000 |
commit | 646a036e453c9b4693ca0202b66e7d07dd6e26d5 (patch) | |
tree | dde95ae552d744fe5840502ebf02bfeaa2b26d89 /src/map/pc.c | |
parent | 9288b397b39c214b268f17769f2203657928b815 (diff) | |
download | hercules-646a036e453c9b4693ca0202b66e7d07dd6e26d5.tar.gz hercules-646a036e453c9b4693ca0202b66e7d07dd6e26d5.tar.bz2 hercules-646a036e453c9b4693ca0202b66e7d07dd6e26d5.tar.xz hercules-646a036e453c9b4693ca0202b66e7d07dd6e26d5.zip |
* Updated script_commands.txt
* Made scripts terminate with an error: (fixes bugreport:2429)
- when getitem/getitem2 tries to delete more items than the player has
- when trying to set Zeny to a negative number.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13368 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 87f05f197..62a875e13 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -5399,6 +5399,8 @@ int pc_setparam(struct map_session_data *sd,int type,int val) sd->status.status_point = val; break; case SP_ZENY: + if( val < 0 ) + return 0;// can't set negative zeny sd->status.zeny = cap_value(val, 0, MAX_ZENY); break; case SP_BASEEXP: |