summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-02-20 16:21:37 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-02-20 16:21:37 +0000
commitb5bcd3c54bfe30e7602a92d4b39ee15973f3c46f (patch)
treefb12351bc05dea4dea9158a427724b8b89a467c0 /src/map/pc.c
parent85db367d556b31b432b2e3b2c909cca14d6248f2 (diff)
downloadhercules-b5bcd3c54bfe30e7602a92d4b39ee15973f3c46f.tar.gz
hercules-b5bcd3c54bfe30e7602a92d4b39ee15973f3c46f.tar.bz2
hercules-b5bcd3c54bfe30e7602a92d4b39ee15973f3c46f.tar.xz
hercules-b5bcd3c54bfe30e7602a92d4b39ee15973f3c46f.zip
Changed pc_can_give_items() to use standard boolean logic instead of the inverted 1/0 one (bugreport:396)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12220 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 97818bbf2..f76df3d0b 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -318,16 +318,12 @@ int pc_setrestartvalue(struct map_session_data *sd,int type)
}
/*==========================================
- Determines if the GM can give / drop / trade / vend items [Lupus]
+ Determines if the GM can give / drop / trade / vend items
Args: GM Level (current player GM level)
- * Returns
- 1 = this GM can't do it
- 0 = this one can do it
*------------------------------------------*/
-int pc_can_give_items(int level)
+bool pc_can_give_items(int level)
{
- return ( level >= battle_config.gm_cant_drop_min_lv
- && level <= battle_config.gm_cant_drop_max_lv);
+ return( level < battle_config.gm_cant_drop_min_lv || level > battle_config.gm_cant_drop_max_lv );
}
/*==========================================
@@ -5817,7 +5813,7 @@ int pc_setriding(TBL_PC* sd, int flag)
int pc_candrop(struct map_session_data *sd,struct item *item)
{
int level = pc_isGM(sd);
- if ( pc_can_give_items(level) ) //check if this GM level can drop items
+ if ( !pc_can_give_items(level) ) //check if this GM level can drop items
return 0;
return (itemdb_isdropable(item, level));
}