From a9cbfd803a82464e9d715f806409526cedb25537 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sat, 20 Sep 2014 17:44:03 -0300 Subject: Fixed Bug 8260 Fixed issue with map zone inheritance failing to inherit subtype, and fixed MOB_BOSS subtype criteria in order to separate from non-MOB_BOSS. Special Thanks to Angelmelody, Michieru. http://hercules.ws/board/tracker/issue-8260-the-uint-type-of-map-zone-system-was-not-working-properly/ Signed-off-by: shennetsind --- src/map/map.c | 2 ++ src/map/status.c | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/map/map.c b/src/map/map.c index 0c8c2d949..14af392b7 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -5020,6 +5020,7 @@ void read_map_zone_db(void) { CREATE( entry, struct map_zone_disabled_skill_entry, 1 ); entry->nameid = izone->disabled_skills[j]->nameid; entry->type = izone->disabled_skills[j]->type; + entry->subtype = izone->disabled_skills[j]->subtype; zone->disabled_skills[zone->disabled_skills_count-1] = entry; } } @@ -5114,6 +5115,7 @@ void read_map_zone_db(void) { entry->nameid = izone->capped_skills[j]->nameid; entry->cap = izone->capped_skills[j]->cap; entry->type = izone->capped_skills[j]->type; + entry->subtype = izone->capped_skills[j]->subtype; zone->capped_skills[zone->capped_skills_count-1] = entry; } } diff --git a/src/map/status.c b/src/map/status.c index 746ca51e2..a8a0f066d 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1601,8 +1601,13 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, uin if( src->type == BL_PC ) clif->msg((TBL_PC*)src, SKILL_CANT_USE_AREA); // This skill cannot be used within this area else if( src->type == BL_MOB && map->list[src->m].zone->disabled_skills[i]->subtype != MZS_NONE ) { - if( (st->mode&MD_BOSS) && !(map->list[src->m].zone->disabled_skills[i]->subtype&MZS_BOSS) ) - break; + if( st->mode&MD_BOSS ) { /** is boss **/ + if( !( map->list[src->m].zone->disabled_skills[i]->subtype&MZS_BOSS ) ) + break; + } else { /** is not boss **/ + if( map->list[src->m].zone->disabled_skills[i]->subtype&MZS_BOSS ) + break; + } } return 0; } -- cgit v1.2.3-60-g2f50