From c2d8bd8f8617e0a6d33933efdb3f4d996483946c Mon Sep 17 00:00:00 2001 From: Inkfish Date: Mon, 15 Jun 2009 15:29:32 +0000 Subject: * Skill through items will not be blocked when 90% overweight. (bugreport:3246) * Now you can drop items when hiding. * Now you can't logout when hiding, cloaking or chase walking. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13892 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/clif.c | 10 +++++----- src/map/skill.c | 23 ++++++++++++----------- 2 files changed, 17 insertions(+), 16 deletions(-) (limited to 'src') diff --git a/src/map/clif.c b/src/map/clif.c index f0062517f..ddb0fcca8 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -8303,9 +8303,9 @@ void clif_parse_QuitGame(int fd, struct map_session_data *sd) WFIFOW(fd,0) = 0x18b; /* Rovert's prevent logout option fixed [Valaris] */ - if (!sd->sc.data[SC_CLOAKING] && !sd->sc.data[SC_HIDING] && - (!battle_config.prevent_logout || DIFF_TICK(gettick(), sd->canlog_tick) > battle_config.prevent_logout) - ) { + if( !sd->sc.data[SC_CLOAKING] && !sd->sc.data[SC_HIDING] && !sd->sc.data[SC_CHASEWALK] && + (!battle_config.prevent_logout || DIFF_TICK(gettick(), sd->canlog_tick) > battle_config.prevent_logout) ) + { set_eof(fd); WFIFOW(fd,2)=0; } else { @@ -8648,7 +8648,8 @@ void clif_parse_Restart(int fd, struct map_session_data *sd) break; case 0x01: /* Rovert's Prevent logout option - Fixed [Valaris] */ - if (!battle_config.prevent_logout || DIFF_TICK(gettick(), sd->canlog_tick) > battle_config.prevent_logout) + if( !sd->sc.data[SC_CLOAKING] && !sd->sc.data[SC_HIDING] && !sd->sc.data[SC_CHASEWALK] && + (!battle_config.prevent_logout || DIFF_TICK(gettick(), sd->canlog_tick) > battle_config.prevent_logout) ) { //Send to char-server for character selection. chrif_charselectreq(sd, session[fd]->client_addr); } else { @@ -8901,7 +8902,6 @@ void clif_parse_DropItem(int fd, struct map_session_data *sd) break; if (sd->sc.count && ( - sd->sc.data[SC_HIDING] || sd->sc.data[SC_AUTOCOUNTER] || sd->sc.data[SC_BLADESTOP] || (sd->sc.data[SC_NOCHAT] && sd->sc.data[SC_NOCHAT]->val1&MANNER_NOITEM) diff --git a/src/map/skill.c b/src/map/skill.c index a2b337e6a..e2bbe6707 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -8114,11 +8114,6 @@ int skill_check_condition_castbegin(struct map_session_data* sd, short skill, sh return 1; } - if(pc_is90overweight(sd)) { - clif_skill_fail(sd,skill,9,0); - return 0; - } - if( sd->menuskill_id == AM_PHARMACY ) { switch( skill ) @@ -8164,6 +8159,12 @@ int skill_check_condition_castbegin(struct map_session_data* sd, short skill, sh return 1; } + if( pc_is90overweight(sd) ) + { + clif_skill_fail(sd,skill,9,0); + return 0; + } + switch( skill ) { // Turn off check. case BS_MAXIMIZE: case NV_TRICKDEAD: case TF_HIDING: case AS_CLOAKING: case CR_AUTOGUARD: @@ -8600,12 +8601,6 @@ int skill_check_condition_castend(struct map_session_data* sd, short skill, shor return 1; } - if( pc_is90overweight(sd) ) - { - clif_skill_fail(sd,skill,9,0); - return 0; - } - if( sd->menuskill_id == AM_PHARMACY ) { // Cast start or cast end?? switch( skill ) @@ -8623,6 +8618,12 @@ int skill_check_condition_castend(struct map_session_data* sd, short skill, shor if( sd->skillitem == skill ) // Casting finished (Item skill or Hocus-Pocus) return 1; + if( pc_is90overweight(sd) ) + { + clif_skill_fail(sd,skill,9,0); + return 0; + } + // perform skill-specific checks (and actions) switch( skill ) { -- cgit v1.2.3-70-g09d2