From 0d13237a47e0421b187a26995205c4ce76e86d9d Mon Sep 17 00:00:00 2001 From: skotlex Date: Mon, 9 Oct 2006 18:55:43 +0000 Subject: - sc_cast_cancel is now a type 4 setting. - Fixed SC_NOCHAT printing the "skills are now available" message twice on natural expiration. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8953 54d463be-8e91-2dee-dedb-b68131a5f0ec --- Changelog-Trunk.txt | 3 +++ conf-tmpl/Changelog.txt | 3 +++ conf-tmpl/battle/status.conf | 4 ++-- src/map/battle.c | 2 +- src/map/status.c | 16 +++++++--------- 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index f97d90f95..8c40815ca 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -3,6 +3,9 @@ Date Added AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. +2006/10/09 + * Fixed SC_NOCHAT printing the "skills are now available" message twice on + natural expiration. [Skotlex] 2006/10/08 * Updated sql files [Playtester] 2006/10/06 diff --git a/conf-tmpl/Changelog.txt b/conf-tmpl/Changelog.txt index b17b896e6..d4a4b6c76 100644 --- a/conf-tmpl/Changelog.txt +++ b/conf-tmpl/Changelog.txt @@ -1,5 +1,8 @@ Date Added +2006/10/06 + * status_cast_cancel is now a type 4 (object bitmasks) setting + (status.conf). [Skotlex] 2006/10/06 * Removed gm_all_skill_add_abra which was doing nothing anyway. [Skotlex] 2006/10/03 diff --git a/conf-tmpl/battle/status.conf b/conf-tmpl/battle/status.conf index 000c159ea..4c45e2015 100644 --- a/conf-tmpl/battle/status.conf +++ b/conf-tmpl/battle/status.conf @@ -29,8 +29,8 @@ // features. //-------------------------------------------------------------- -// Should skill casting be cancelled when inflicted by curse/stun/sleep/etc (includes silence)? -status_cast_cancel: no +// Should skill casting be cancelled when inflicted by curse/stun/sleep/etc (includes silence) [Note 4]? +status_cast_cancel: 0 // Will certain skill status-changes be removed on logout? // This mimics official servers, where Extremity Fist's no SP regen, diff --git a/src/map/battle.c b/src/map/battle.c index 16187cc46..7b83f5e20 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -4191,7 +4191,7 @@ void battle_set_defaults() { battle_config.allow_es_magic_pc = 0; battle_config.skill_caster_check = 1; - battle_config.sc_castcancel = 0; + battle_config.sc_castcancel = BL_NUL; battle_config.pc_sc_def_rate = 100; battle_config.mob_sc_def_rate = 100; battle_config.pc_luk_sc_def = 300; diff --git a/src/map/status.c b/src/map/status.c index b5dc06b07..d0c8310e8 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -968,8 +968,9 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, int if(sc && sc->count) { - if(sc->opt1 >0 && (battle_config.sc_castcancel || flag != 1)) - //When sc do not cancel casting, the spell should come out. + if(sc->opt1 >0 && flag != 1) + //When sc do not cancel casting, the spell should come out, and when it does, we can never have + //a flag == 1 && sc->opt1 case, since cancelling should had been stopped before. return 0; if ( @@ -5649,7 +5650,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val unit_stop_attack(bl); skill_stop_dancing(bl); // Cancel cast when get status [LuzZza] - if (battle_config.sc_castcancel) + if (battle_config.sc_castcancel&bl->type) unit_skillcastcancel(bl, 0); case SC_STOP: case SC_CONFUSION: @@ -5665,7 +5666,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val unit_stop_attack(bl); break; case SC_SILENCE: - if (battle_config.sc_castcancel) + if (battle_config.sc_castcancel&bl->type) unit_skillcastcancel(bl, 0); break; } @@ -6053,11 +6054,8 @@ int status_change_end( struct block_list* bl , int type,int tid ) status_change_end(bl,SC_LONGING,-1); break; case SC_NOCHAT: - if (sd) { - if (sd->status.manner < 0 && tid != -1) - sd->status.manner = 0; - clif_updatestatus(sd,SP_MANNER); - } + if (sd && sd->status.manner < 0 && tid != -1) + sd->status.manner = 0; break; case SC_SPLASHER: { -- cgit v1.2.3-70-g09d2