diff options
author | panikon <panikon@zoho.com> | 2014-01-14 00:07:55 -0200 |
---|---|---|
committer | panikon <panikon@zoho.com> | 2014-01-14 00:07:55 -0200 |
commit | 6860ff92acdb9a018e9085676299ef631ecea57c (patch) | |
tree | 3e255d196921bf8557e519d8a1dd1020d8a053b9 /src/map/battle.c | |
parent | 9832e82b0e8dbda38bf4feb18e48cf5335e213ee (diff) | |
download | hercules-6860ff92acdb9a018e9085676299ef631ecea57c.tar.gz hercules-6860ff92acdb9a018e9085676299ef631ecea57c.tar.bz2 hercules-6860ff92acdb9a018e9085676299ef631ecea57c.tar.xz hercules-6860ff92acdb9a018e9085676299ef631ecea57c.zip |
Updated return values of some atcommands.
Altered many function types from int to bool(C99) and added meaningful return values.
Altered many function types from int to void as they didn't have any meaningful return value.
Replaced chrif_char_offline with a macro as this function did exactly the same as chrif_char_offline_nsd.
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 1759bea05..fd31f5a1f 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -5747,21 +5747,21 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t #undef GET_NORMAL_ATTACK #undef GET_NORMAL_ATTACK2 -int battle_check_undead(int race,int element) +bool battle_check_undead(int race,int element) { if(battle_config.undead_detect_type == 0) { if(element == ELE_UNDEAD) - return 1; + return true; } else if(battle_config.undead_detect_type == 1) { if(race == RC_UNDEAD) - return 1; + return true; } else { if(element == ELE_UNDEAD || race == RC_UNDEAD) - return 1; + return true; } - return 0; + return false; } //Returns the upmost level master starting with the given object |