From d0a7c2090946362a77301684f50e2c350b0e2218 Mon Sep 17 00:00:00 2001 From: skotlex Date: Tue, 9 May 2006 19:02:47 +0000 Subject: - Cleaned up somewhat the implementation of BladeStop. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6531 54d463be-8e91-2dee-dedb-b68131a5f0ec --- Changelog-Trunk.txt | 1 + src/map/battle.c | 13 +++++++------ src/map/status.c | 19 +++++++++---------- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 2685f485a..aaceac826 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,7 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. 2006/05/09 + * Cleaned up somewhat the implementation of BladeStop. [Skotlex] * Fixed the head_bottom (pet-armor) position in packet 0x22c (walk packet) when crafted for non-players. [Skotlex] * Script commands sc_start, sc_start2 and sc_start4 will now start diff --git a/src/map/battle.c b/src/map/battle.c index 045e7ed90..0c9724266 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -3122,13 +3122,14 @@ int battle_weapon_attack( struct block_list *src,struct block_list *target, int skilllv = tsc->data[SC_BLADESTOP_WAIT].val1; int duration = skill_get_time2(MO_BLADESTOP,skilllv); status_change_end(target, SC_BLADESTOP_WAIT, -1); - clif_damage(src, target, tick, status_get_amotion(src), 1, 0, 1, 0, 0); //Display MISS. - sc_start4(target, SC_BLADESTOP, 100, skilllv, 2, (int)target, (int)src, duration); - skilllv = sd?pc_checkskill(sd, MO_BLADESTOP):1; - sc_start4(src, SC_BLADESTOP, 100, skilllv, 1, (int)src, (int)target, duration); - return 0; + if(sc_start4(src, SC_BLADESTOP, 100, sd?pc_checkskill(sd, MO_BLADESTOP):5, 0, 0, (int)target, duration)) + { //Target locked. + clif_damage(src, target, tick, status_get_amotion(src), 1, 0, 1, 0, 0); //Display MISS. + clif_bladestop(target,src,1); + sc_start4(target, SC_BLADESTOP, 100, skilllv, 0, 0,(int)src, duration); + return 0; + } } - } //Recycled the damage variable rather than use a new one... [Skotlex] if(sd && (damage = pc_checkskill(sd,MO_TRIPLEATTACK)) > 0) // triple blow works with bows ^^ [celest] diff --git a/src/map/status.c b/src/map/status.c index 3a3cf5351..6f3ea5770 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -4099,10 +4099,6 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val val2 = 20+val1; break; - case SC_BLADESTOP: /* 白刃取り */ - if(val2==2) clif_bladestop((struct block_list *)val3,(struct block_list *)val4,1); - break; - case SC_MOONLIT: val2 = bl->id; skill_setmapcell(bl,CG_MOONLIT, val1, CELL_SETMOONLIT); @@ -5093,14 +5089,17 @@ int status_change_end( struct block_list* bl , int type,int tid ) } break; case SC_BLADESTOP: + if(sc->data[type].val4) { - struct status_change *tsc = status_get_sc((struct block_list *)sc->data[type].val4); - //片方が切れたので相手の白刃?態が切れてないのなら解除 + struct block_list *tbl = (struct block_list *)sc->data[type].val4; + struct status_change *tsc = status_get_sc(tbl); + sc->data[type].val4 = 0; if(tsc && tsc->data[SC_BLADESTOP].timer!=-1) - status_change_end((struct block_list *)sc->data[type].val4,SC_BLADESTOP,-1); - - if(sc->data[type].val2==2) - clif_bladestop((struct block_list *)sc->data[type].val3,(struct block_list *)sc->data[type].val4,0); + { + tsc->data[SC_BLADESTOP].val4 = 0; + status_change_end(tbl,SC_BLADESTOP,-1); + } + clif_bladestop(bl,tbl,0); } break; case SC_DANCING: -- cgit v1.2.3-70-g09d2