From 73ab0c441de0f74c2e621a594df7e269ce89bfc5 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Mon, 10 Mar 2014 17:03:08 -0300 Subject: Fixed Bug 8046 Fixed issue with permanent statuses being removed during logout for memory-freeing operations, special thanks to streusel and all those who contributed to the bug report. http://hercules.ws/board/tracker/issue-8046-cart-disappearance/ Signed-off-by: shennetsind --- src/map/status.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/map/status.c') diff --git a/src/map/status.c b/src/map/status.c index 5dcf35198..f23a48fe0 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -9605,7 +9605,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const if (sce->timer != tid && tid != INVALID_TIMER) return 0; - if( sd && sce->timer == INVALID_TIMER ) + if( sd && sce->timer == INVALID_TIMER && !sd->state.loggingout ) chrif->del_scdata_single(sd->status.account_id,sd->status.char_id,type); if (tid == INVALID_TIMER) { -- cgit v1.2.3-60-g2f50 From 400c6a2e625197f70326587401b13ab02659682f Mon Sep 17 00:00:00 2001 From: Haru Date: Tue, 11 Mar 2014 02:58:45 +0100 Subject: Fixed some warnings (unused functions) pointed out by clang-5.1. Signed-off-by: Haru --- src/map/clif.c | 20 ++++++++------------ src/map/status.c | 2 ++ 2 files changed, 10 insertions(+), 12 deletions(-) (limited to 'src/map/status.c') diff --git a/src/map/clif.c b/src/map/clif.c index c61a72597..1c5f7e003 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -99,17 +99,16 @@ static inline void WBUFPOS2(uint8* p, unsigned short pos, short x0, short y0, sh p[5] = (uint8)((sx0<<4) | (sy0&0x0f)); } - +#if 0 // Currently unused static inline void WFIFOPOS(int fd, unsigned short pos, short x, short y, unsigned char dir) { WBUFPOS(WFIFOP(fd,pos), 0, x, y, dir); } - +#endif // 0 static inline void WFIFOPOS2(int fd, unsigned short pos, short x0, short y0, short x1, short y1, unsigned char sx0, unsigned char sy0) { WBUFPOS2(WFIFOP(fd,pos), 0, x0, y0, x1, y1, sx0, sy0); } - static inline void RBUFPOS(const uint8* p, unsigned short pos, short* x, short* y, unsigned char* dir) { p += pos; @@ -126,7 +125,11 @@ static inline void RBUFPOS(const uint8* p, unsigned short pos, short* x, short* } } +static inline void RFIFOPOS(int fd, unsigned short pos, short* x, short* y, unsigned char* dir) { + RBUFPOS(RFIFOP(fd,pos), 0, x, y, dir); +} +#if 0 // currently unused static inline void RBUFPOS2(const uint8* p, unsigned short pos, short* x0, short* y0, short* x1, short* y1, unsigned char* sx0, unsigned char* sy0) { p += pos; @@ -154,19 +157,12 @@ static inline void RBUFPOS2(const uint8* p, unsigned short pos, short* x0, short sy0[0] = ( p[5] & 0x0f ) >> 0; } } - - -static inline void RFIFOPOS(int fd, unsigned short pos, short* x, short* y, unsigned char* dir) { - RBUFPOS(RFIFOP(fd,pos), 0, x, y, dir); -} - - static inline void RFIFOPOS2(int fd, unsigned short pos, short* x0, short* y0, short* x1, short* y1, unsigned char* sx0, unsigned char* sy0) { RBUFPOS2(WFIFOP(fd,pos), 0, x0, y0, x1, y1, sx0, sy0); } +#endif // 0 - -//To idenfity disguised characters. +//To identify disguised characters. static inline bool disguised(struct block_list* bl) { return (bool)( bl->type == BL_PC && ((TBL_PC*)bl)->disguise != -1 ); } diff --git a/src/map/status.c b/src/map/status.c index f23a48fe0..4a81fcb05 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1985,7 +1985,9 @@ unsigned short status_base_atk(const struct block_list *bl, const struct status_ return cap_value(str, 0, USHRT_MAX); } +#ifndef RENEWAL static inline unsigned short status_base_matk_min(const struct status_data *st){ return st->int_+(st->int_/7)*(st->int_/7); } +#endif // not RENEWAL static inline unsigned short status_base_matk_max(const struct status_data *st){ return st->int_+(st->int_/5)*(st->int_/5); } unsigned short status_base_matk(const struct status_data *st, int level) { -- cgit v1.2.3-60-g2f50