diff options
author | shennetsind <ind@henn.et> | 2013-09-09 21:34:19 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-09-09 21:34:19 -0300 |
commit | 2ca326b3fa3853fbc06095dbbbfee537a0387b5f (patch) | |
tree | 33e97c18d7e6c7e77485a91109237017b150f23f | |
parent | e2330c62a66a605fcfc5878cf7bb8875d97fff4f (diff) | |
download | hercules-2ca326b3fa3853fbc06095dbbbfee537a0387b5f.tar.gz hercules-2ca326b3fa3853fbc06095dbbbfee537a0387b5f.tar.bz2 hercules-2ca326b3fa3853fbc06095dbbbfee537a0387b5f.tar.xz hercules-2ca326b3fa3853fbc06095dbbbfee537a0387b5f.zip |
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 <ind@henn.et>
-rw-r--r-- | src/map/status.c | 17 |
1 files changed, 16 insertions, 1 deletions
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; |