From 0876387f293ee633f7bfe12f8adf3f4a37d5b736 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Fri, 8 Nov 2013 15:39:36 -0200 Subject: Fixed Bug 7807 NPC Duplicates with xs/ys weren't being properly loaded, Special Thanks to Haruna. Also fixes an issue with the instance empty timer. http://hercules.ws/board/tracker/issue-7807-endless-tower/ Signed-off-by: shennetsind --- src/map/clif.c | 22 +++++++++++----------- src/map/npc.c | 2 +- 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 );// , - else if( type == SCRIPT && sscanf(w4, "%*d,%d,%d", &xs, &ys) == 2);// ,, + else if( type == SCRIPT && sscanf(w4, "%*[^,],%d,%d", &xs, &ys) == 2);// ,, 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 -- cgit v1.2.3-70-g09d2