diff options
author | shennetsind <ind@henn.et> | 2013-05-16 21:54:21 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-05-16 21:54:21 -0300 |
commit | fbd043f22a4b7ffa5eb6244897f923198200056f (patch) | |
tree | c1fa55296e812db52f4be4b0d2a64d266467f657 /src | |
parent | cb9b70eae92e401f4b644b95d2fa87e781d5ce82 (diff) | |
download | hercules-fbd043f22a4b7ffa5eb6244897f923198200056f.tar.gz hercules-fbd043f22a4b7ffa5eb6244897f923198200056f.tar.bz2 hercules-fbd043f22a4b7ffa5eb6244897f923198200056f.tar.xz hercules-fbd043f22a4b7ffa5eb6244897f923198200056f.zip |
Map Zone DB skill_damage_cap update
http://hercules.ws/board/topic/302-introducing-hercules-map-zone-database/
As per community suggestion in
http://hercules.ws/board/topic/559-about-adjust-skill-damage-mapflag/
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src')
-rw-r--r-- | src/map/battle.c | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 1cb6bea4f..f6fba5ca5 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -3377,19 +3377,19 @@ 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( src && skill_id ) { - for(i = 0; i < map[src->m].zone->capped_skills_count; i++) { - if( skill_id == map[src->m].zone->capped_skills[i]->nameid && (map[src->m].zone->capped_skills[i]->type & src->type) ) { - if( src->type == BL_MOB && map[src->m].zone->capped_skills[i]->subtype != MZS_NONE ) { - if( (((TBL_MOB*)src)->status.mode&MD_BOSS) && !(map[src->m].zone->disabled_skills[i]->subtype&MZS_BOSS) ) + if( target && skill_id ) { + for(i = 0; i < map[target->m].zone->capped_skills_count; i++) { + if( skill_id == map[target->m].zone->capped_skills[i]->nameid && (map[target->m].zone->capped_skills[i]->type & target->type) ) { + if( target->type == BL_MOB && map[target->m].zone->capped_skills[i]->subtype != MZS_NONE ) { + if( (((TBL_MOB*)target)->status.mode&MD_BOSS) && !(map[target->m].zone->disabled_skills[i]->subtype&MZS_BOSS) ) continue; - if( ((TBL_MOB*)src)->special_state.clone && !(map[src->m].zone->disabled_skills[i]->subtype&MZS_CLONE) ) + if( ((TBL_MOB*)target)->special_state.clone && !(map[target->m].zone->disabled_skills[i]->subtype&MZS_CLONE) ) continue; } - if( wd.damage > map[src->m].zone->capped_skills[i]->cap ) - wd.damage = map[src->m].zone->capped_skills[i]->cap; - if( wd.damage2 > map[src->m].zone->capped_skills[i]->cap ) - wd.damage2 = map[src->m].zone->capped_skills[i]->cap; + if( wd.damage > map[target->m].zone->capped_skills[i]->cap ) + wd.damage = map[target->m].zone->capped_skills[i]->cap; + if( wd.damage2 > map[target->m].zone->capped_skills[i]->cap ) + wd.damage2 = map[target->m].zone->capped_skills[i]->cap; break; } } @@ -4087,19 +4087,19 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list } } #ifndef HMAP_ZONE_DAMAGE_CAP_TYPE - if( src && skill_id ) { - for(i = 0; i < map[src->m].zone->capped_skills_count; i++) { - if( skill_id == map[src->m].zone->capped_skills[i]->nameid && (map[src->m].zone->capped_skills[i]->type & src->type) ) { - if( src->type == BL_MOB && map[src->m].zone->capped_skills[i]->subtype != MZS_NONE ) { - if( (((TBL_MOB*)src)->status.mode&MD_BOSS) && !(map[src->m].zone->disabled_skills[i]->subtype&MZS_BOSS) ) + if( target && skill_id ) { + for(i = 0; i < map[target->m].zone->capped_skills_count; i++) { + if( skill_id == map[target->m].zone->capped_skills[i]->nameid && (map[target->m].zone->capped_skills[i]->type & target->type) ) { + if( target->type == BL_MOB && map[target->m].zone->capped_skills[i]->subtype != MZS_NONE ) { + if( (((TBL_MOB*)target)->status.mode&MD_BOSS) && !(map[target->m].zone->disabled_skills[i]->subtype&MZS_BOSS) ) continue; - if( ((TBL_MOB*)src)->special_state.clone && !(map[src->m].zone->disabled_skills[i]->subtype&MZS_CLONE) ) + if( ((TBL_MOB*)target)->special_state.clone && !(map[target->m].zone->disabled_skills[i]->subtype&MZS_CLONE) ) continue; } - if( ad.damage > map[src->m].zone->capped_skills[i]->cap ) - ad.damage = map[src->m].zone->capped_skills[i]->cap; - if( ad.damage2 > map[src->m].zone->capped_skills[i]->cap ) - ad.damage2 = map[src->m].zone->capped_skills[i]->cap; + if( ad.damage > map[target->m].zone->capped_skills[i]->cap ) + ad.damage = map[target->m].zone->capped_skills[i]->cap; + if( ad.damage2 > map[target->m].zone->capped_skills[i]->cap ) + ad.damage2 = map[target->m].zone->capped_skills[i]->cap; break; } } @@ -4489,19 +4489,19 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list * } } #ifndef HMAP_ZONE_DAMAGE_CAP_TYPE - if( src && skill_id ) { - for(i = 0; i < map[src->m].zone->capped_skills_count; i++) { - if( skill_id == map[src->m].zone->capped_skills[i]->nameid && (map[src->m].zone->capped_skills[i]->type & src->type) ) { - if( src->type == BL_MOB && map[src->m].zone->capped_skills[i]->subtype != MZS_NONE ) { - if( (((TBL_MOB*)src)->status.mode&MD_BOSS) && !(map[src->m].zone->disabled_skills[i]->subtype&MZS_BOSS) ) + if( target && skill_id ) { + for(i = 0; i < map[target->m].zone->capped_skills_count; i++) { + if( skill_id == map[target->m].zone->capped_skills[i]->nameid && (map[target->m].zone->capped_skills[i]->type & target->type) ) { + if( target->type == BL_MOB && map[target->m].zone->capped_skills[i]->subtype != MZS_NONE ) { + if( (((TBL_MOB*)target)->status.mode&MD_BOSS) && !(map[target->m].zone->disabled_skills[i]->subtype&MZS_BOSS) ) continue; - if( ((TBL_MOB*)src)->special_state.clone && !(map[src->m].zone->disabled_skills[i]->subtype&MZS_CLONE) ) + if( ((TBL_MOB*)target)->special_state.clone && !(map[target->m].zone->disabled_skills[i]->subtype&MZS_CLONE) ) continue; } - if( md.damage > map[src->m].zone->capped_skills[i]->cap ) - md.damage = map[src->m].zone->capped_skills[i]->cap; - if( md.damage2 > map[src->m].zone->capped_skills[i]->cap ) - md.damage2 = map[src->m].zone->capped_skills[i]->cap; + if( md.damage > map[target->m].zone->capped_skills[i]->cap ) + md.damage = map[target->m].zone->capped_skills[i]->cap; + if( md.damage2 > map[target->m].zone->capped_skills[i]->cap ) + md.damage2 = map[target->m].zone->capped_skills[i]->cap; break; } } @@ -4584,20 +4584,20 @@ struct Damage battle_calc_attack(int attack_type,struct block_list *bl,struct bl } #ifdef HMAP_ZONE_DAMAGE_CAP_TYPE - if( bl && skill_id ) { + if( target && skill_id ) { int i; - for(i = 0; i < map[bl->m].zone->capped_skills_count; i++) { - if( skill_id == map[bl->m].zone->capped_skills[i]->nameid && (map[bl->m].zone->capped_skills[i]->type & bl->type) ) { - if( bl->type == BL_MOB && map[bl->m].zone->capped_skills[i]->subtype != MZS_NONE ) { - if( (((TBL_MOB*)bl)->status.mode&MD_BOSS) && !(map[bl->m].zone->disabled_skills[i]->subtype&MZS_BOSS) ) + for(i = 0; i < map[target->m].zone->capped_skills_count; i++) { + if( skill_id == map[target->m].zone->capped_skills[i]->nameid && (map[target->m].zone->capped_skills[i]->type & target->type) ) { + if( target->type == BL_MOB && map[target->m].zone->capped_skills[i]->subtype != MZS_NONE ) { + if( (((TBL_MOB*)target)->status.mode&MD_BOSS) && !(map[target->m].zone->disabled_skills[i]->subtype&MZS_BOSS) ) continue; - if( ((TBL_MOB*)bl)->special_state.clone && !(map[bl->m].zone->disabled_skills[i]->subtype&MZS_CLONE) ) + if( ((TBL_MOB*)target)->special_state.clone && !(map[target->m].zone->disabled_skills[i]->subtype&MZS_CLONE) ) continue; } - if( d.damage > map[bl->m].zone->capped_skills[i]->cap ) - d.damage = map[bl->m].zone->capped_skills[i]->cap; - if( d.damage2 > map[bl->m].zone->capped_skills[i]->cap ) - d.damage2 = map[bl->m].zone->capped_skills[i]->cap; + if( d.damage > map[target->m].zone->capped_skills[i]->cap ) + d.damage = map[target->m].zone->capped_skills[i]->cap; + if( d.damage2 > map[target->m].zone->capped_skills[i]->cap ) + d.damage2 = map[target->m].zone->capped_skills[i]->cap; break; } } |