From 5d69a4fee853ea1308565126a029b3b724f407ab Mon Sep 17 00:00:00 2001 From: Aleos Date: Tue, 12 Feb 2019 10:53:10 -0500 Subject: [PATCH] Fixed Camouflage (#3933) * Fixes #3788. * Fixes the Provoke icon getting removed when clif_changeoption is called and it's not an infinite duration. Thanks to @Everade! --- src/map/clif.cpp | 7 +++++-- src/map/status.cpp | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/map/clif.cpp b/src/map/clif.cpp index 72a596a259..138ac59cd2 100644 --- a/src/map/clif.cpp +++ b/src/map/clif.cpp @@ -3974,8 +3974,11 @@ void clif_changeoption(struct block_list* bl) //Whenever we send "changeoption" to the client, the provoke icon is lost //There is probably an option for the provoke icon, but as we don't know it, we have to do this for now - if (sc->data[SC_PROVOKE] && sc->data[SC_PROVOKE]->timer == INVALID_TIMER) - clif_status_change(bl, StatusIconChangeTable[SC_PROVOKE], 1, INFINITE_TICK, 0, 0, 0); + if (sc->data[SC_PROVOKE]) { + const struct TimerData *td = get_timer(sc->data[SC_PROVOKE]->timer); + + clif_status_change(bl, StatusIconChangeTable[SC_PROVOKE], 1, (!td ? INFINITE_TICK : DIFF_TICK(td->tick, gettick())), 0, 0, 0); + } } diff --git a/src/map/status.cpp b/src/map/status.cpp index e6c834251a..04b92a75b8 100644 --- a/src/map/status.cpp +++ b/src/map/status.cpp @@ -696,7 +696,7 @@ void initChangeTables(void) set_sc( RA_ELECTRICSHOCKER , SC_ELECTRICSHOCKER , EFST_ELECTRICSHOCKER , SCB_NONE ); set_sc( RA_WUGDASH , SC_WUGDASH , EFST_WUGDASH , SCB_SPEED|SCB_DSPD ); set_sc( RA_WUGBITE , SC_BITE , EFST_WUGBITE , SCB_NONE ); - set_sc( RA_CAMOUFLAGE , SC_CAMOUFLAGE , EFST_CAMOUFLAGE , SCB_SPEED|SCB_DEF|SCB_DEF2 ); + set_sc( RA_CAMOUFLAGE , SC_CAMOUFLAGE , EFST_CAMOUFLAGE , SCB_SPEED ); set_sc( RA_FIRINGTRAP , SC_BURNING , EFST_BURNT , SCB_MDEF ); set_sc_with_vfx( RA_ICEBOUNDTRAP, SC_FREEZING , EFST_FROSTMISTY , SCB_SPEED|SCB_ASPD|SCB_DEF ); set_sc( RA_UNLIMIT , SC_UNLIMIT , EFST_UNLIMIT , SCB_DEF|SCB_DEF2|SCB_MDEF|SCB_MDEF2 );