diff options
author | shennetsind <ind@henn.et> | 2013-11-08 15:39:36 -0200 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-11-08 15:39:36 -0200 |
commit | 0876387f293ee633f7bfe12f8adf3f4a37d5b736 (patch) | |
tree | e79f8fc8faf616955ec4f91dc88b3b1ba96c320a /src/map | |
parent | bc9743ce3455f9d9cbc9c934b2a19343ad369fc5 (diff) | |
download | hercules-0876387f293ee633f7bfe12f8adf3f4a37d5b736.tar.gz hercules-0876387f293ee633f7bfe12f8adf3f4a37d5b736.tar.bz2 hercules-0876387f293ee633f7bfe12f8adf3f4a37d5b736.tar.xz hercules-0876387f293ee633f7bfe12f8adf3f4a37d5b736.zip |
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 <ind@henn.et>
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/clif.c | 22 | ||||
-rw-r--r-- | 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 );// <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 |