From 665f1306a130d4b8c359972bf4e58ef9d3bd9cd8 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Wed, 6 Nov 2013 20:28:45 -0200 Subject: Fixed Bug 7799 SC_MOONSTAR, SC_SUPER_STAR are no longer removeable by sc_end all, and sc clear. Modified sc_config.txt, added a new flag (0x80/128) for such cases. http://hercules.ws/board/tracker/issue-7799-sc-moonstar/ Special Thanks to kyeme. Signed-off-by: shennetsind --- src/map/script.c | 11 ++--------- src/map/status.c | 13 ++----------- src/map/status.h | 15 ++++++++------- 3 files changed, 12 insertions(+), 27 deletions(-) (limited to 'src') diff --git a/src/map/script.c b/src/map/script.c index 8fd7f425c..a944447e2 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -9425,15 +9425,8 @@ BUILDIN(sc_end) { if (!sce) return true; - switch (type) { - case SC_WEIGHTOVER50: - case SC_WEIGHTOVER90: - case SC_NOCHAT: - case SC_PUSH_CART: - return true; - default: - break; - } + if( status->get_sc_type(type)&SC_NO_CLEAR ) + return true; //This should help status_change_end force disabling the SC in case it has no limit. sce->val1 = sce->val2 = sce->val3 = sce->val4 = 0; diff --git a/src/map/status.c b/src/map/status.c index 1df98a957..e2cc39a70 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -9223,17 +9223,8 @@ int status_change_clear(struct block_list* bl, int type) { } } } - if( type == 3 ) { - switch (i) {// TODO: This list may be incomplete - case SC_WEIGHTOVER50: - case SC_WEIGHTOVER90: - case SC_NOCHAT: - case SC_PUSH_CART: - case SC_JAILED: - case SC_ALL_RIDING: - continue; - } - } + if( type == 3 && status->get_sc_type(i)&SC_NO_CLEAR ) + continue; status_change_end(bl, (sc_type)i, INVALID_TIMER); diff --git a/src/map/status.h b/src/map/status.h index e588fbb3f..784c8ca5f 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -34,13 +34,14 @@ enum refine_type { }; typedef enum sc_conf_type { - SC_NO_REM_DEATH = 0x1, - SC_NO_SAVE = 0x2, - SC_NO_DISPELL = 0x4, - SC_NO_CLEARANCE = 0x8, - SC_BUFF = 0x10, - SC_DEBUFF = 0x20, - SC_MADO_NO_RESET = 0x40 + SC_NO_REM_DEATH = 0x01, + SC_NO_SAVE = 0x02, + SC_NO_DISPELL = 0x04, + SC_NO_CLEARANCE = 0x08, + SC_BUFF = 0x10, + SC_DEBUFF = 0x20, + SC_MADO_NO_RESET = 0x40, + SC_NO_CLEAR = 0x80, } sc_conf_type; // Status changes listing. These code are for use by the server. -- cgit v1.2.3-70-g09d2