summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c39
1 files changed, 36 insertions, 3 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 4ba5cc669..648a8940f 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -10769,6 +10769,7 @@ static int script_mapflag_pvp_sub(struct block_list *bl,va_list ap) {
sd->pvp_lost = 0;
}
clif->map_property(sd, MAPPROPERTY_FREEPVPZONE);
+ clif->maptypeproperty2(&sd->bl,SELF);
return 0;
}
BUILDIN_FUNC(setmapflag)
@@ -10811,9 +10812,14 @@ BUILDIN_FUNC(setmapflag)
break;
case MF_PVP_NOPARTY: map[m].flag.pvp_noparty = 1; break;
case MF_PVP_NOGUILD: map[m].flag.pvp_noguild = 1; break;
- case MF_GVG:
+ case MF_GVG: {
+ struct block_list bl;
map[m].flag.gvg = 1;
clif->map_property_mapall(m, MAPPROPERTY_AGITZONE);
+ bl.type = BL_NUL;
+ bl.m = m;
+ clif->maptypeproperty2(&bl,ALL_SAMEMAP);
+ }
break;
case MF_GVG_NOPARTY: map[m].flag.gvg_noparty = 1; break;
case MF_NOTRADE: map[m].flag.notrade = 1; break;
@@ -10893,15 +10899,25 @@ BUILDIN_FUNC(removemapflag)
case MF_NOBRANCH: map[m].flag.nobranch = 0; break;
case MF_NOPENALTY: map[m].flag.noexppenalty = 0; map[m].flag.nozenypenalty = 0; break;
case MF_NOZENYPENALTY: map[m].flag.nozenypenalty = 0; break;
- case MF_PVP:
+ case MF_PVP: {
+ struct block_list bl;
+ bl.type = BL_NUL;
+ bl.m = m;
map[m].flag.pvp = 0;
clif->map_property_mapall(m, MAPPROPERTY_NOTHING);
+ clif->maptypeproperty2(&bl,ALL_SAMEMAP);
+ }
break;
case MF_PVP_NOPARTY: map[m].flag.pvp_noparty = 0; break;
case MF_PVP_NOGUILD: map[m].flag.pvp_noguild = 0; break;
- case MF_GVG:
+ case MF_GVG: {
+ struct block_list bl;
+ bl.type = BL_NUL;
+ bl.m = m;
map[m].flag.gvg = 0;
clif->map_property_mapall(m, MAPPROPERTY_NOTHING);
+ clif->maptypeproperty2(&bl,ALL_SAMEMAP);
+ }
break;
case MF_GVG_NOPARTY: map[m].flag.gvg_noparty = 0; break;
case MF_NOTRADE: map[m].flag.notrade = 0; break;
@@ -10958,6 +10974,7 @@ BUILDIN_FUNC(pvpon)
const char *str;
TBL_PC* sd = NULL;
struct s_mapiterator* iter;
+ struct block_list bl;
str = script_getstr(st,2);
m = map_mapname2mapid(str);
@@ -10967,6 +10984,10 @@ BUILDIN_FUNC(pvpon)
map_zone_change2(m, strdb_get(zone_db, MAP_ZONE_PVP_NAME));
map[m].flag.pvp = 1;
clif->map_property_mapall(m, MAPPROPERTY_FREEPVPZONE);
+ bl.type = BL_NUL;
+ bl.m = m;
+ clif->maptypeproperty2(&bl,ALL_SAMEMAP);
+
if(battle_config.pk_mode) // disable ranking functions if pk_mode is on [Valaris]
return 0;
@@ -11004,6 +11025,7 @@ BUILDIN_FUNC(pvpoff)
{
int16 m;
const char *str;
+ struct block_list bl;
str=script_getstr(st,2);
m = map_mapname2mapid(str);
@@ -11013,6 +11035,9 @@ BUILDIN_FUNC(pvpoff)
map_zone_change2(m, map[m].prev_zone);
map[m].flag.pvp = 0;
clif->map_property_mapall(m, MAPPROPERTY_NOTHING);
+ bl.type = BL_NUL;
+ bl.m = m;
+ clif->maptypeproperty2(&bl,ALL_SAMEMAP);
if(battle_config.pk_mode) // disable ranking options if pk_mode is on [Valaris]
return 0;
@@ -11029,9 +11054,13 @@ BUILDIN_FUNC(gvgon)
str=script_getstr(st,2);
m = map_mapname2mapid(str);
if(m >= 0 && !map[m].flag.gvg) {
+ struct block_list bl;
map_zone_change2(m, strdb_get(zone_db, MAP_ZONE_GVG_NAME));
map[m].flag.gvg = 1;
clif->map_property_mapall(m, MAPPROPERTY_AGITZONE);
+ bl.type = BL_NUL;
+ bl.m = m;
+ clif->maptypeproperty2(&bl,ALL_SAMEMAP);
}
return 0;
@@ -11044,9 +11073,13 @@ BUILDIN_FUNC(gvgoff)
str=script_getstr(st,2);
m = map_mapname2mapid(str);
if(m >= 0 && map[m].flag.gvg) {
+ struct block_list bl;
map_zone_change2(m, map[m].prev_zone);
map[m].flag.gvg = 0;
clif->map_property_mapall(m, MAPPROPERTY_NOTHING);
+ bl.type = BL_NUL;
+ bl.m = m;
+ clif->maptypeproperty2(&bl,ALL_SAMEMAP);
}
return 0;