getmapflag MF_RESTRICTED (#4193)

* Corrected the value returned by getmapflag script command for MF_RESTRICTED
This commit is contained in:
Atemo 2019-06-03 20:45:19 +02:00 committed by GitHub
parent 3cb23fd5aa
commit f8ea43ebc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 8 deletions

View File

@ -2190,7 +2190,7 @@ static int battle_skill_damage_skill(struct block_list *src, struct block_list *
(damage->map&4 && mapdata_flag_gvg2(mapdata)) ||
(damage->map&8 && mapdata->flag[MF_BATTLEGROUND]) ||
(damage->map&16 && mapdata->flag[MF_SKILL_DAMAGE]) ||
(damage->map&(8*mapdata->zone) && mapdata->flag[MF_RESTRICTED]))
(damage->map&(mapdata->zone) && mapdata->flag[MF_RESTRICTED]))
{
return damage->rate[battle_skill_damage_type(target)];
}

View File

@ -1632,7 +1632,7 @@ bool itemdb_isNoEquip(struct item_data *id, uint16 m) {
(id->flag.no_equip&4 && mapdata_flag_gvg2_no_te(mapdata)) || // GVG
(id->flag.no_equip&8 && mapdata->flag[MF_BATTLEGROUND]) || // Battleground
(id->flag.no_equip&16 && mapdata_flag_gvg2_te(mapdata)) || // WOE:TE
(id->flag.no_equip&(8*mapdata->zone) && mapdata->flag[MF_RESTRICTED]) // Zone restriction
(id->flag.no_equip&(mapdata->zone) && mapdata->flag[MF_RESTRICTED]) // Zone restriction
)
return true;
return false;

View File

@ -4847,9 +4847,9 @@ bool map_setmapflag_sub(int16 m, enum e_mapflag mapflag, bool status, union u_ma
mapdata->flag[mapflag] = status;
if (!status)
mapdata->zone ^= 1 << (args->flag_val + 1);
mapdata->zone ^= (1 << (args->flag_val + 1)) << 3;
else
mapdata->zone |= 1 << (args->flag_val + 1);
mapdata->zone |= (1 << (args->flag_val + 1)) << 3;
break;
case MF_NOCOMMAND:
if (status) {

View File

@ -12965,7 +12965,7 @@ bool pc_job_can_entermap(enum e_job jobid, int m, int group_lv) {
(job_info[idx].noenter_map.zone&4 && mapdata_flag_gvg2_no_te(mapdata)) || // GVG
(job_info[idx].noenter_map.zone&8 && mapdata->flag[MF_BATTLEGROUND]) || // Battleground
(job_info[idx].noenter_map.zone&16 && mapdata_flag_gvg2_te(mapdata)) || // WOE:TE
(job_info[idx].noenter_map.zone&(8*mapdata->zone) && mapdata->flag[MF_RESTRICTED]) // Zone restriction
(job_info[idx].noenter_map.zone&(mapdata->zone) && mapdata->flag[MF_RESTRICTED]) // Zone restriction
)
return false;

View File

@ -754,7 +754,7 @@ bool skill_isNotOk(uint16 skill_id, struct map_session_data *sd)
(skill_nocast&4 && mapdata_flag_gvg2_no_te(mapdata)) ||
(skill_nocast&8 && mapdata->flag[MF_BATTLEGROUND]) ||
(skill_nocast&16 && mapdata_flag_gvg2_te(mapdata)) || // WOE:TE
(mapdata->zone && skill_nocast&(8*mapdata->zone) && mapdata->flag[MF_RESTRICTED]) ){
(mapdata->zone && skill_nocast&(mapdata->zone) && mapdata->flag[MF_RESTRICTED]) ){
clif_msg(sd, SKILL_CANT_USE_AREA); // This skill cannot be used within this area
return true;
}

View File

@ -14504,13 +14504,12 @@ void status_change_clear_onChangeMap(struct block_list *bl, struct status_change
bool mapIsGVG = mapdata_flag_gvg2_no_te(mapdata);
bool mapIsBG = mapdata->flag[MF_BATTLEGROUND] != 0;
bool mapIsTE = mapdata_flag_gvg2_te(mapdata);
unsigned int mapZone = mapdata->zone << 3;
for (i = 0; i < SC_MAX; i++) {
if (!sc->data[i] || !SCDisabled[i])
continue;
if (status_change_isDisabledOnMap_((sc_type)i, mapIsVS, mapIsPVP, mapIsGVG, mapIsBG, mapZone, mapIsTE))
if (status_change_isDisabledOnMap_((sc_type)i, mapIsVS, mapIsPVP, mapIsGVG, mapIsBG, mapdata->zone, mapIsTE))
status_change_end(bl, (sc_type)i, INVALID_TIMER);
}
}