summaryrefslogtreecommitdiff
path: root/src/map/battle.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/battle.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/battle.c')
-rw-r--r--src/map/battle.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 77c1981a2..72283688f 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3939,22 +3939,19 @@ int battle_set_value(char *w1, char *w2) {
*battle_data_int[i].val = battle_config_switch(w2);
return 1;
}
-/*
- int val = battle_config_switch(w2);
- switch(battle_data[i].size) {
- case 1:
- *((unsigned char *) battle_data[i].val) = val;
- break;
- case 2:
- *((unsigned short *) battle_data[i].val) = val;
- break;
- case 4:
- *((unsigned int *) battle_data[i].val) = val;
- break;
- }
- return 1;
+ return 0;
+}
+
+int battle_get_value(char *w1) {
+ int i;
+ for(i = 0; i < sizeof(battle_data_short) / (sizeof(battle_data_short[0])); i++)
+ if (strcmpi(w1, battle_data_short[i].str) == 0) {
+ return * battle_data_short[i].val;
+ }
+ for(i = 0; i < sizeof(battle_data_int) / (sizeof(battle_data_int[0])); i++)
+ if (strcmpi(w1, battle_data_int[i].str) == 0) {
+ return *battle_data_int[i].val;
}
-*/
return 0;
}
@@ -4064,7 +4061,7 @@ void battle_set_defaults() {
battle_config.shop_exp=0;
battle_config.combo_delay_rate=100;
battle_config.item_check=1;
- battle_config.item_use_interval=500;
+ battle_config.item_use_interval=100; //Use some very low value that won't bother players, but should cap bots.
battle_config.wedding_modifydisplay=0;
battle_config.wedding_ignorepalette=0;
battle_config.xmas_ignorepalette=0; // [Valaris]