From 962d203f95fd8b81d504f60aa28bb17cc268395d Mon Sep 17 00:00:00 2001 From: malufett Date: Mon, 17 Jun 2013 00:31:23 -0700 Subject: Fixed Bug#7380 -showprogressbar should now work as official.(Thanks Kyeme & Ryuuzaki) Fixed insane damage of Hatred Skills. (http://hercules.ws/board/topic/1110-renewal-attack/ - Thanks Axiom) --- src/map/battle.c | 4 ++-- src/map/clif.c | 6 +++--- src/map/pc.c | 2 +- src/map/script.c | 1 + 4 files changed, 7 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/map/battle.c b/src/map/battle.c index 31fe502f6..731c6f618 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -753,8 +753,8 @@ int battle_calc_masteryfix(struct block_list *src, struct block_list *target, ui int ratio = sd->status.base_level + status_get_dex(src) + status_get_luk(src); if ( i == 2 ) ratio += status_get_str(src); //Star Anger if (skill < 4 ) - ratio /= 12 - 3 * skill; - damage += damage * ratio; + ratio /= (12 - 3 * skill); + damage += damage * ratio / 100; } if( sc ){ diff --git a/src/map/clif.c b/src/map/clif.c index a752f1bc1..9fae03ef0 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -9757,7 +9757,7 @@ void clif_parse_progressbar(int fd, struct map_session_data * sd) if( iTimer->gettick() < sd->progressbar.timeout && sd->st ) sd->st->state = END; - sd->progressbar.npc_id = sd->progressbar.timeout = 0; + sd->state.workinprogress = sd->progressbar.npc_id = sd->progressbar.timeout = 0; npc_scriptcont(sd, npc_id, false); } @@ -9777,8 +9777,8 @@ void clif_parse_WalkToXY(int fd, struct map_session_data *sd) if (sd->sc.opt1 && ( sd->sc.opt1 == OPT1_STONEWAIT || sd->sc.opt1 == OPT1_BURNING )) ; //You CAN walk on this OPT1 value. - else if( sd->progressbar.npc_id ) - clif->progressbar_abort(sd); + /*else if( sd->progressbar.npc_id ) + clif->progressbar_abort(sd);*/ else if (pc_cant_act(sd)) return; diff --git a/src/map/pc.c b/src/map/pc.c index 635f48db5..b7644f2fb 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -4255,7 +4255,7 @@ int pc_useitem(struct map_session_data *sd,int n) nullpo_ret(sd); - if( sd->npc_id ){ + if( sd->npc_id || sd->state.workinprogress&1 ){ /* TODO: add to clif->messages enum */ #ifdef RENEWAL clif->msg(sd, 0x783); // TODO look for the client date that has this message. diff --git a/src/map/script.c b/src/map/script.c index 823febbc6..682faa42b 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -16312,6 +16312,7 @@ BUILDIN(progressbar) sd->progressbar.npc_id = st->oid; sd->progressbar.timeout = iTimer->gettick() + second*1000; + sd->state.workinprogress = 3; clif->progressbar(sd, strtol(color, (char **)NULL, 0), second); return true; -- cgit v1.2.3-70-g09d2