Skip to content
Permalink
Browse files

getmapflag MF_RESTRICTED (#4193)

* Corrected the value returned by getmapflag script command for MF_RESTRICTED
  • Loading branch information...
Atemo committed Jun 3, 2019
1 parent 3cb23fd commit f8ea43ebc70934a07903ab93a552febdae219c3c
Showing with 7 additions and 8 deletions.
  1. +1 −1 src/map/battle.cpp
  2. +1 −1 src/map/itemdb.cpp
  3. +2 −2 src/map/map.cpp
  4. +1 −1 src/map/pc.cpp
  5. +1 −1 src/map/skill.cpp
  6. +1 −2 src/map/status.cpp
@@ -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)];
}
@@ -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;
@@ -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) {
@@ -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;

@@ -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;
}
@@ -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);
}
}

0 comments on commit f8ea43e

Please sign in to comment.
You can’t perform that action at this time.