From 2ca326b3fa3853fbc06095dbbbfee537a0387b5f Mon Sep 17 00:00:00 2001 From: shennetsind Date: Mon, 9 Sep 2013 21:34:19 -0300 Subject: Fixed Bug #7637 Fixed visual effects stacking which'd make them remain visible even after they were gone. Special Thanks to Michieru, mleo1 http://hercules.ws/board/tracker/issue-7637-camouflage-never-ending/ Signed-off-by: shennetsind --- src/map/status.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/map/status.c') diff --git a/src/map/status.c b/src/map/status.c index 0a29a5d2f..d656a8e3a 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -6497,7 +6497,22 @@ int status_get_sc_def(struct block_list *bl, enum sc_type type, int rate, int ti } /* [Ind/Hercules] fast-checkin sc-display array */ void status_display_add(struct map_session_data *sd, enum sc_type type, int dval1, int dval2, int dval3) { - struct sc_display_entry *entry = ers_alloc(pc_sc_display_ers, struct sc_display_entry); + struct sc_display_entry *entry; + int i; + + for( i = 0; i < sd->sc_display_count; i++ ) { + if( sd->sc_display[i]->type == type ) + break; + } + + if( i != sd->sc_display_count ) { + sd->sc_display[i]->val1 = dval1; + sd->sc_display[i]->val2 = dval2; + sd->sc_display[i]->val3 = dval3; + return; + } + + entry = ers_alloc(pc_sc_display_ers, struct sc_display_entry); entry->type = type; entry->val1 = dval1; -- cgit v1.2.3-60-g2f50