diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/pc.c | 6 | ||||
-rw-r--r-- | src/map/pc.h | 1 | ||||
-rw-r--r-- | src/map/skill.c | 19 | ||||
-rw-r--r-- | src/map/unit.c | 18 |
4 files changed, 43 insertions, 1 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 3ca882d38..22d2ace6d 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -6681,6 +6681,12 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos) return 0; } + if( DIFF_TICK(sd->canequip_tick,gettick()) > 0 ) + { + clif_equipitemack(sd,n,0,0); + return 0; + } + id = sd->inventory_data[n]; pos = pc_equippoint(sd,n); //With a few exceptions, item should go in all specified slots. diff --git a/src/map/pc.h b/src/map/pc.h index 154468855..8a3f912b0 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -181,6 +181,7 @@ struct map_session_data { int invincible_timer; unsigned int canlog_tick; unsigned int canuseitem_tick; // [Skotlex] + unsigned int canequip_tick; // [Inkfish] unsigned int cantalk_tick; unsigned int cansendmail_tick; // [Mail System Flood Protection] unsigned int ks_floodprotect_tick; // [Kill Steal Protection] diff --git a/src/map/skill.c b/src/map/skill.c index f05688426..8549759c0 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -5688,7 +5688,15 @@ int skill_castend_id(int tid, unsigned int tick, int id, intptr data) ud->canact_tick = tick + skill_delayfix(src, ud->skillid, ud->skilllv); if ( battle_config.display_status_timers && sd ) clif_status_change(src, SI_ACTIONDELAY, 1, skill_delayfix(src, ud->skillid, ud->skilllv)); - + if( sd ) + { + switch( ud->skillid ) + { + case GS_DESPERADO: + sd->canequip_tick = tick + skill_get_time(ud->skillid, ud->skilllv); + break; + } + } if (skill_get_state(ud->skillid) != ST_MOVE_ENABLE) unit_set_walkdelay(src, tick, battle_config.default_walk_delay+skill_get_walkdelay(ud->skillid, ud->skilllv), 1); @@ -5867,6 +5875,15 @@ int skill_castend_pos(int tid, unsigned int tick, int id, intptr data) ud->canact_tick = tick + skill_delayfix(src, ud->skillid, ud->skilllv); if ( battle_config.display_status_timers && sd ) clif_status_change(src, SI_ACTIONDELAY, 1, skill_delayfix(src, ud->skillid, ud->skilllv)); +// if( sd ) +// { +// switch( ud->skillid ) +// { +// case ????: +// sd->canequip_tick = tick + ????; +// break; +// } +// } unit_set_walkdelay(src, tick, battle_config.default_walk_delay+skill_get_walkdelay(ud->skillid, ud->skilllv), 1); map_freeblock_lock(); diff --git a/src/map/unit.c b/src/map/unit.c index 577dc8ae7..bd2997723 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1072,6 +1072,14 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh ud->canact_tick = tick + casttime + 100; if ( battle_config.display_status_timers && sd ) clif_status_change(src, SI_ACTIONDELAY, 1, casttime); + if( sd ) + { + switch( skill_num ) + { + case CG_ARROWVULCAN: + sd->canequip_tick = tick + casttime; + } + } ud->skilltarget = target_id; ud->skillx = 0; ud->skilly = 0; @@ -1179,6 +1187,14 @@ int unit_skilluse_pos2( struct block_list *src, short skill_x, short skill_y, sh ud->canact_tick = tick + casttime + 100; if ( battle_config.display_status_timers && sd ) clif_status_change(src, SI_ACTIONDELAY, 1, casttime); +// if( sd ) +// { +// switch( skill_num ) +// { +// case ????: +// sd->canequip_tick = tick + casttime; +// } +// } ud->skillid = skill_num; ud->skilllv = skill_lv; ud->skillx = skill_x; @@ -1597,6 +1613,8 @@ int unit_skillcastcancel(struct block_list *bl,int type) ud->canact_tick = tick; if ( battle_config.display_status_timers && sd ) clif_status_change(bl, SI_ACTIONDELAY, 0, 0); + if( sd ) + sd->canequip_tick = tick; if(type&1 && sd) skill = sd->skillid_old; |