summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorxantara <xantara@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-02-04 08:00:39 +0000
committerxantara <xantara@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-02-04 08:00:39 +0000
commitacb7f395c7a25610fe75deb219435466c0aa6d69 (patch)
tree91159068a2af3604ded73121a758159a6fd45754 /src/map
parent343d829cf7d0ed7a09c90e14145c483ea99573d6 (diff)
downloadhercules-acb7f395c7a25610fe75deb219435466c0aa6d69.tar.gz
hercules-acb7f395c7a25610fe75deb219435466c0aa6d69.tar.bz2
hercules-acb7f395c7a25610fe75deb219435466c0aa6d69.tar.xz
hercules-acb7f395c7a25610fe75deb219435466c0aa6d69.zip
` Fixed Warg Dash skill to continuously run until codiling with an object (bugreport:5143)
` Fixed Warg Mastery, Warg Rider, and Warg Dash skills to check conditions before cast begins (bugreport:5181) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15542 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/clif.c2
-rw-r--r--src/map/skill.c26
-rw-r--r--src/map/unit.c16
3 files changed, 34 insertions, 10 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index acefa03c3..37c424a82 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -9356,7 +9356,7 @@ void clif_parse_WalkToXY(int fd, struct map_session_data *sd)
else if (pc_cant_act(sd))
return;
- if(sd->sc.data[SC_RUN])
+ if(sd->sc.data[SC_RUN] || sd->sc.data[SC_WUGDASH])
return;
pc_delinvincibletimer(sd);
diff --git a/src/map/skill.c b/src/map/skill.c
index f7abeb1ca..a535d312b 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -7231,9 +7231,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
case RA_WUGMASTERY:
if( sd )
{
- if( pc_isridingwug(sd) )
- clif_skill_fail(sd,skillid,USESKILL_FAIL_LEVEL,0);
- else if( !pc_iswug(sd) )
+ if( !pc_iswug(sd) )
pc_setoption(sd,sd->sc.option|OPTION_WUG);
else
pc_setoption(sd,sd->sc.option&~OPTION_WUG);
@@ -7249,8 +7247,6 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
} else if( pc_isridingwug(sd) ) {
pc_setoption(sd,sd->sc.option&~OPTION_WUGRIDER);
pc_setoption(sd,sd->sc.option|OPTION_WUG);
- } else if( sd ) {
- clif_skill_fail(sd,skillid,USESKILL_FAIL_LEVEL,0);
}
clif_skill_nodamage(src,bl,skillid,skilllv,1);
}
@@ -10390,7 +10386,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, short skill, sh
case BS_MAXIMIZE: case NV_TRICKDEAD: case TF_HIDING: case AS_CLOAKING: case CR_AUTOGUARD:
case ML_AUTOGUARD: case CR_DEFENDER: case ML_DEFENDER: case ST_CHASEWALK: case PA_GOSPEL:
case CR_SHRINK: case TK_RUN: case GS_GATLINGFEVER: case TK_READYCOUNTER: case TK_READYDOWN:
- case TK_READYSTORM: case TK_READYTURN: case SG_FUSION:
+ case TK_READYSTORM: case TK_READYTURN: case SG_FUSION: case RA_WUGDASH:
if( sc && sc->data[status_skill2sc(skill)] )
return 1;
}
@@ -10777,6 +10773,24 @@ int skill_check_condition_castbegin(struct map_session_data* sd, short skill, sh
return 0;
}
break;
+ case RA_WUGMASTERY:
+ if( pc_isfalcon(sd) || pc_isridingwug(sd) ) {
+ clif_skill_fail(sd,skill,USESKILL_FAIL_LEVEL,0);
+ return 0;
+ }
+ break;
+ case RA_WUGRIDER:
+ if( !pc_isridingwug(sd) && !pc_iswug(sd) ) {
+ clif_skill_fail(sd,skill,USESKILL_FAIL_LEVEL,0);
+ return 0;
+ }
+ break;
+ case RA_WUGDASH:
+ if(!pc_isridingwug(sd)) {
+ clif_skill_fail(sd,skill,USESKILL_FAIL_LEVEL,0);
+ return 0;
+ }
+ break;
/**
* Royal Guard
**/
diff --git a/src/map/unit.c b/src/map/unit.c
index 9161c61d1..ac9e09d1f 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -252,7 +252,7 @@ static int unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data
clif_move(ud);
} else if(ud->state.running) {
//Keep trying to run.
- if (!unit_run(bl))
+ if ( !(unit_run(bl) || unit_wugdash(bl,sd)) )
ud->state.running = 0;
}
else if (ud->target) {
@@ -845,8 +845,10 @@ int unit_stop_walking(struct block_list *bl,int type)
ud->canmove_tick = gettick() + (type>>8);
//Readded, the check in unit_set_walkdelay means dmg during running won't fall through to this place in code [Kevin]
- if (ud->state.running)
+ if (ud->state.running) {
status_change_end(bl, SC_RUN, INVALID_TIMER);
+ status_change_end(bl, SC_WUGDASH, INVALID_TIMER);
+ }
return 1;
}
@@ -944,7 +946,11 @@ int unit_resume_running(int tid, unsigned int tick, int id, intptr_t data)
struct unit_data *ud = (struct unit_data *)data;
TBL_PC * sd = map_id2sd(id);
- clif_skill_nodamage(ud->bl,ud->bl,TK_RUN,ud->skilllv,
+ if(sd && pc_isridingwug(sd))
+ clif_skill_nodamage(ud->bl,ud->bl,RA_WUGDASH,ud->skilllv,
+ sc_start4(ud->bl,status_skill2sc(RA_WUGDASH),100,ud->skilllv,unit_getdir(ud->bl),0,0,1));
+ else
+ clif_skill_nodamage(ud->bl,ud->bl,TK_RUN,ud->skilllv,
sc_start4(ud->bl,status_skill2sc(TK_RUN),100,ud->skilllv,unit_getdir(ud->bl),0,0,0));
if (sd) clif_walkok(sd);
@@ -1219,6 +1225,9 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh
if( sd && pc_checkskill(sd,TK_HIGHJUMP) )
casttime *= 2;
break;
+ case RA_WUGDASH:
+ if (sc && sc->data[SC_WUGDASH])
+ casttime = 0;
}
// moved here to prevent Suffragium from ending if skill fails
@@ -1980,6 +1989,7 @@ int unit_remove_map_(struct block_list *bl, clr_type clrtype, const char* file,
status_change_end(bl, SC_GOSPEL, INVALID_TIMER);
status_change_end(bl, SC_CHANGE, INVALID_TIMER);
status_change_end(bl, SC_STOP, INVALID_TIMER);
+ status_change_end(bl, SC_WUGDASH, INVALID_TIMER);
}
if (bl->type&(BL_CHAR|BL_PET)) {