diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/common/socket.c | 2 | ||||
-rw-r--r-- | src/map/unit.c | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/common/socket.c b/src/common/socket.c index c9e282997..f8e65fb60 100644 --- a/src/common/socket.c +++ b/src/common/socket.c @@ -175,7 +175,7 @@ static int recv_to_fifo(int fd) if( (fd < 0) || (fd >= FD_SETSIZE) || (NULL == session[fd]) || (session[fd]->eof) ) return -1; - len = recv(fd, (char *) session[fd]->rdata + session[fd]->rdata_size, RFIFOSPACE(fd), 0); + len = recv(fd, (char *) session[fd]->rdata + session[fd]->rdata_size, RFIFOSPACE(fd), 0); if (len == SOCKET_ERROR) { if (s_errno == S_ECONNABORTED) { diff --git a/src/map/unit.c b/src/map/unit.c index 4997f13b2..213168682 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -988,7 +988,10 @@ int unit_skilluse_id2(struct block_list *src, int target_id, int skill_num, int if(sc && sc->data[SC_CLOAKING].timer != -1 && !(sc->data[SC_CLOAKING].val4&4) && skill_num != AS_CLOAKING) + { status_change_end(src,SC_CLOAKING,-1); + if (!src->prev) return 0; //Warped away! + } if(casttime > 0) { ud->skilltimer = add_timer( tick+casttime, skill_castend_id, src->id, 0 ); @@ -1088,7 +1091,10 @@ int unit_skilluse_pos2( struct block_list *src, int skill_x, int skill_y, int sk if (sc && sc->data[SC_CLOAKING].timer != -1 && !(sc->data[SC_CLOAKING].val4&4)) + { status_change_end(src,SC_CLOAKING,-1); + if (!src->prev) return 0; //Warped away! + } if(casttime > 0) { ud->skilltimer = add_timer( tick+casttime, skill_castend_pos, src->id, 0 ); |