summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-26 21:12:08 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-26 21:12:08 +0000
commita4386f464b6b5eb470bf9a9d147fc0ec6e68afaf (patch)
tree857a98315828f5cbd2af5f7329ad1d29d6381590 /src/map/pc.c
parent45821c82aec3018db2cf660d96b2246b194d9501 (diff)
downloadhercules-a4386f464b6b5eb470bf9a9d147fc0ec6e68afaf.tar.gz
hercules-a4386f464b6b5eb470bf9a9d147fc0ec6e68afaf.tar.bz2
hercules-a4386f464b6b5eb470bf9a9d147fc0ec6e68afaf.tar.xz
hercules-a4386f464b6b5eb470bf9a9d147fc0ec6e68afaf.zip
- Item use interval is set to a default of 100ms now.
- Updated Full Buster so that the can't act delay carries on to the weapon attack delay and can't use item intervals. - Added script command getbattleflag to retrieve the current value of a battle_config switch. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6296 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index ba54db609..fc0dc4ae6 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -2671,6 +2671,7 @@ int pc_isUseitem(struct map_session_data *sd,int n)
*/
int pc_useitem(struct map_session_data *sd,int n)
{
+ unsigned int tick = gettick();
int amount;
unsigned char *script;
@@ -2684,8 +2685,7 @@ int pc_useitem(struct map_session_data *sd,int n)
return 0;
//Prevent mass item usage. [Skotlex]
- if (battle_config.item_use_interval &&
- DIFF_TICK(sd->canuseitem_tick, gettick()) > 0)
+ if(DIFF_TICK(sd->canuseitem_tick, tick) > 0)
return 0;
if (sd->sc.count && (
@@ -2719,8 +2719,8 @@ int pc_useitem(struct map_session_data *sd,int n)
if (sd->sc.data[SC_SPIRIT].timer != -1 && sd->sc.data[SC_SPIRIT].val2 == SL_ROGUE)
potion_flag = 3; //Even more effective potions.
}
- if (battle_config.item_use_interval)
- sd->canuseitem_tick= gettick() + battle_config.item_use_interval; //Update item use time.
+
+ sd->canuseitem_tick= tick + battle_config.item_use_interval; //Update item use time.
run_script(script,0,sd->bl.id,0);
potion_flag = 0;
return 1;