summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/map/clif.c22
-rw-r--r--src/map/npc.c2
2 files changed, 12 insertions, 12 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 70b81ffab..f0a85d478 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -9277,6 +9277,16 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) {
if( map->list[sd->bl.m].users++ == 0 && battle_config.dynamic_mobs )
map->spawnmobs(sd->bl.m);
+ if( map->list[sd->bl.m].instance_id >= 0 ) {
+ instance->list[map->list[sd->bl.m].instance_id].users++;
+ instance->check_idle(map->list[sd->bl.m].instance_id);
+ }
+
+ if( pc->has_permission(sd,PC_PERM_VIEW_HPMETER) ) {
+ map->list[sd->bl.m].hpmeter_visible++;
+ sd->state.hpmeter_visible = 1;
+ }
+
if( !(sd->sc.option&OPTION_INVISIBLE) ) { // increment the number of pvp players on the map
map->list[sd->bl.m].users_pvp++;
}
@@ -9469,17 +9479,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) {
sprintf(output, "[ Kill Steal Protection Disabled. KS is allowed in this map ]");
clif->broadcast(&sd->bl, output, strlen(output) + 1, BC_BLUE, SELF);
}
-
- if( map->list[sd->bl.m].instance_id >= 0 ) {
- instance->list[map->list[sd->bl.m].instance_id].users++;
- instance->check_idle(map->list[sd->bl.m].instance_id);
- }
-
- if( pc->has_permission(sd,PC_PERM_VIEW_HPMETER) ) {
- map->list[sd->bl.m].hpmeter_visible++;
- sd->state.hpmeter_visible = 1;
- }
-
+
map->iwall_get(sd); // Updates Walls Info on this Map to Client
status_calc_pc(sd, SCO_NONE);/* some conditions are map-dependent so we must recalculate */
sd->state.changemap = false;
diff --git a/src/map/npc.c b/src/map/npc.c
index 9330d59d3..03e4aa9fa 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -2564,7 +2564,7 @@ const char* npc_parse_duplicate(char* w1, char* w2, char* w3, char* w4, const ch
}
if( type == WARP && sscanf(w4, "%d,%d", &xs, &ys) == 2 );// <spanx>,<spany>
- else if( type == SCRIPT && sscanf(w4, "%*d,%d,%d", &xs, &ys) == 2);// <sprite id>,<triggerX>,<triggerY>
+ else if( type == SCRIPT && sscanf(w4, "%*[^,],%d,%d", &xs, &ys) == 2);// <sprite id>,<triggerX>,<triggerY>
else if( type == WARP ) {
ShowError("npc_parse_duplicate: Invalid span format for duplicate warp in file '%s', line '%d'. Skipping line...\n * w1=%s\n * w2=%s\n * w3=%s\n * w4=%s\n", filepath, strline(buffer,start-buffer), w1, w2, w3, w4);
return end;// next line, try to continue