summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-17 18:12:06 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-17 18:12:06 +0000
commit14eabce08792bbf83b2f8001d3b341a6fe9dfb67 (patch)
treede7a2efa437dfef53aedbec80d158d1c14b29a74 /src/map/status.c
parent613ddf2665f265e5ad07dcdfff4b6a4c04e4596b (diff)
downloadhercules-14eabce08792bbf83b2f8001d3b341a6fe9dfb67.tar.gz
hercules-14eabce08792bbf83b2f8001d3b341a6fe9dfb67.tar.bz2
hercules-14eabce08792bbf83b2f8001d3b341a6fe9dfb67.tar.xz
hercules-14eabce08792bbf83b2f8001d3b341a6fe9dfb67.zip
- Added state.running to unit_data to make it easier to check for running characters (saves having to get the sc data and check for the corresponding timer all the time)
- removed pc_run, pc_walktodir, replaced with unit_run. - moved the code that makes you walk that extra cell to unit_stop_walking, which is now invoked before resetting the walk-target. - Flag &2 in unit_stop_walking is now to make the character force-move that extra tile if the walkpath pos is 0 at hit time. - Added variable walk_count to unit_data to be use as a counter for cells walked for walk-triggered skills (walk path_pos is not good enough since it keeps resetting each time the walk path is updated) - Increased WALK_SKILL_INTERVAL to 5 (it is the closest value that makes the average mob trigger a chase skill every second) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6137 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 9b7ed47f0..2cfbbaf89 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -4758,8 +4758,12 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
clif_updatestatus(sd,updateflag); /* ステ?タスをクライアントに送る */
if (sd->pd)
pet_sc_check(sd, type); //Skotlex: Pet Status Effect Healing
- if (type==SC_RUN)
- pc_run(sd,val1,val2);
+ }
+
+ if (type==SC_RUN) {
+ struct unit_data *ud = unit_bl2ud(bl);
+ if (ud)
+ ud->state.running = unit_run(bl);
}
return 1;
}
@@ -4961,13 +4965,20 @@ int status_change_end( struct block_list* bl , int type,int tid )
}
break;
case SC_RUN://駆け足
- unit_stop_walking(bl,1);
+ {
+ struct unit_data *ud = unit_bl2ud(bl);
+ if (ud) {
+ ud->state.running = 0;
+ if (ud->walktimer != -1)
+ unit_stop_walking(bl,1);
+ }
if (sc->data[type].val1 >= 7 &&
DIFF_TICK(gettick(), sc->data[type].val4) <= 1000 &&
(!sd || (sd->weapontype1 == 0 && sd->weapontype2 == 0))
)
sc_start(bl,SC_SPURT,100,sc->data[type].val1,skill_get_time2(StatusSkillChangeTable[type], sc->data[type].val1));
calc_flag = 1;
+ }
break;
case SC_AUTOBERSERK:
if (sc->data[SC_PROVOKE].timer != -1 && sc->data[SC_PROVOKE].val2 == 1)