summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2014-09-20 17:44:03 -0300
committershennetsind <ind@henn.et>2014-09-20 17:44:03 -0300
commita9cbfd803a82464e9d715f806409526cedb25537 (patch)
treee5e6b6fbcc2bdca7d12f45a962404faf49d14f7d /src/map
parent36ac07469df414237e5a4f4f347087d24de82169 (diff)
downloadhercules-a9cbfd803a82464e9d715f806409526cedb25537.tar.gz
hercules-a9cbfd803a82464e9d715f806409526cedb25537.tar.bz2
hercules-a9cbfd803a82464e9d715f806409526cedb25537.tar.xz
hercules-a9cbfd803a82464e9d715f806409526cedb25537.zip
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 <ind@henn.et>
Diffstat (limited to 'src/map')
-rw-r--r--src/map/map.c2
-rw-r--r--src/map/status.c9
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;
}