diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-06-30 13:26:34 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-07-05 02:02:28 +0300 |
commit | 04aa6241bbfd842afb6e747b4ff77a7b369d5974 (patch) | |
tree | ed90c3e46bf574bf5350b8e9b2c8d49173baf032 | |
parent | 1a8b776d1df017c6f0753af3604337762781e1f6 (diff) | |
download | hercules-04aa6241bbfd842afb6e747b4ff77a7b369d5974.tar.gz hercules-04aa6241bbfd842afb6e747b4ff77a7b369d5974.tar.bz2 hercules-04aa6241bbfd842afb6e747b4ff77a7b369d5974.tar.xz hercules-04aa6241bbfd842afb6e747b4ff77a7b369d5974.zip |
Remove useless checks from map server.
-rw-r--r-- | src/map/battle.c | 6 | ||||
-rw-r--r-- | src/map/clif.c | 2 | ||||
-rw-r--r-- | src/map/skill.c | 2 | ||||
-rw-r--r-- | src/map/status.c | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 8a834574b..3575dea6f 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -3627,7 +3627,7 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list } } #ifndef HMAP_ZONE_DAMAGE_CAP_TYPE - if( target && skill_id ) { + if (skill_id) { for(i = 0; i < map->list[target->m].zone->capped_skills_count; i++) { if( skill_id == map->list[target->m].zone->capped_skills[i]->nameid && (map->list[target->m].zone->capped_skills[i]->type & target->type) ) { if( target->type == BL_MOB && map->list[target->m].zone->capped_skills[i]->subtype != MZS_NONE ) { @@ -4101,7 +4101,7 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list * } } #ifndef HMAP_ZONE_DAMAGE_CAP_TYPE - if( target && skill_id ) { + if (skill_id) { for(i = 0; i < map->list[target->m].zone->capped_skills_count; i++) { if( skill_id == map->list[target->m].zone->capped_skills[i]->nameid && (map->list[target->m].zone->capped_skills[i]->type & target->type) ) { if( target->type == BL_MOB && map->list[target->m].zone->capped_skills[i]->subtype != MZS_NONE ) { @@ -5314,7 +5314,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list if(skill_id == CR_GRANDCROSS || skill_id == NPC_GRANDDARKNESS) return wd; //Enough, rest is not needed. #ifndef HMAP_ZONE_DAMAGE_CAP_TYPE - if( target && skill_id ) { + if (skill_id) { for(i = 0; i < map->list[target->m].zone->capped_skills_count; i++) { if( skill_id == map->list[target->m].zone->capped_skills[i]->nameid && (map->list[target->m].zone->capped_skills[i]->type & target->type) ) { if( target->type == BL_MOB && map->list[target->m].zone->capped_skills[i]->subtype != MZS_NONE ) { diff --git a/src/map/clif.c b/src/map/clif.c index d9b20e570..1250b34b9 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -12746,7 +12746,7 @@ bool clif_sub_guild_invite(int fd, struct map_session_data *sd, struct map_sessi return false; } - if ( t_sd && t_sd->state.noask ) {// @noask [LuzZza] + if (t_sd->state.noask) {// @noask [LuzZza] clif->noask_sub(sd, t_sd, 2); return false; } diff --git a/src/map/skill.c b/src/map/skill.c index c6233c31d..56537fcbc 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -2714,7 +2714,7 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr } /* monsters with skill lv higher than MAX_SKILL_LEVEL may get this value beyond the max depending on conditions, we cap to the system's limit */ - if( dsrc && dsrc->type == BL_MOB && skill_lv > MAX_SKILL_LEVEL && dmg.blewcount > 25 ) + if (dsrc->type == BL_MOB && skill_lv > MAX_SKILL_LEVEL && dmg.blewcount > 25) dmg.blewcount = 25; //blown-specific handling diff --git a/src/map/status.c b/src/map/status.c index bfe606bca..4b6443792 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -5145,7 +5145,7 @@ signed short status_calc_mdef2(struct block_list *bl, struct status_change *sc, if(sc->data[SC_MINDBREAKER]) mdef2 -= mdef2 * sc->data[SC_MINDBREAKER]->val3/100; #ifdef RENEWAL - if(sc && sc->data[SC_ASSUMPTIO]) + if (sc->data[SC_ASSUMPTIO]) mdef2 <<= 1; return (short)cap_value(mdef2,SHRT_MIN,SHRT_MAX); #else |