summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt3
-rw-r--r--conf-tmpl/Changelog.txt3
-rw-r--r--conf-tmpl/battle/battle.conf8
-rw-r--r--src/map/battle.c45
-rw-r--r--src/map/battle.h1
-rw-r--r--src/map/unit.c4
6 files changed, 25 insertions, 39 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index a87ba6b0e..b20276494 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,9 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/08/31
+ * Added setting attack_walk_delay which specifies whether a character
+ should (or not) be able to move inmediately after starting a normal attack
+ (battle.conf). Defaults to 0 since that's what Aegis uses. [Skotlex]
* Fixed @summon's delete timer being screwed up. [Skotlex]
* Cleaned up a bit the summon script command. [Skotlex]
* Fixed the clone script command's delete-timer being screwed up. [Skotlex]
diff --git a/conf-tmpl/Changelog.txt b/conf-tmpl/Changelog.txt
index 7c8d23934..09fea0dca 100644
--- a/conf-tmpl/Changelog.txt
+++ b/conf-tmpl/Changelog.txt
@@ -1,6 +1,9 @@
Date Added
2006/08/31
+ * Added setting attack_walk_delay which specifies whether a character
+ should (or not) be able to move inmediately after starting a normal attack
+ (battle.conf). Defaults to 0 since that's what Aegis uses. [Skotlex]
* Corrected battle config name max_walk_rate, it should be named
max_walk_speed. [Skotlex]
2006/08/29
diff --git a/conf-tmpl/battle/battle.conf b/conf-tmpl/battle/battle.conf
index 1b7c34051..a653bd22d 100644
--- a/conf-tmpl/battle/battle.conf
+++ b/conf-tmpl/battle/battle.conf
@@ -44,6 +44,14 @@ enable_critical: 1
mob_critical_rate: 100
critical_rate: 100
+// Should normal attacks give you a walk delay?
+// If no, characters can move as soon as they start an attack (attack animation
+// or walk animation may be omitted client-side, causing cropped attacks or
+// monsters that teleport to you)
+// If set, total walk delay is set to your attack animation duration divided by
+// this value (eg: 1 -> 100%, 2 -> 50%, 4->25%...)
+attack_walk_delay: 0
+
// Move-delay adjustment after being hit. (Note 2)
// The 'can't walk' delay after being hit is calculated as a percentage of the damage animation duration.
// NOTE: Only affects the normal delay from a single attack, not the delay added by the multihit_delay option below.
diff --git a/src/map/battle.c b/src/map/battle.c
index a39a006c1..fdac13afc 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3698,6 +3698,7 @@ static const struct battle_data_short {
{ "min_skill_delay_limit", &battle_config.min_skill_delay_limit}, // [celest]
{ "default_skill_delay", &battle_config.default_skill_delay}, // [Skotlex]
{ "no_skill_delay", &battle_config.no_skill_delay}, // [Skotlex]
+ { "attack_walk_delay", &battle_config.attack_walk_delay }, // [Skotlex]
{ "require_glory_guild", &battle_config.require_glory_guild}, // [celest]
{ "idle_no_share", &battle_config.idle_no_share}, // [celest], for a feature by [MouseJstr]
{ "party_even_share_bonus", &battle_config.party_even_share_bonus},
@@ -4129,6 +4130,7 @@ void battle_set_defaults() {
battle_config.min_skill_delay_limit = 100;
battle_config.default_skill_delay = 300; //Default skill delay according to official servers.
battle_config.no_skill_delay = BL_MOB;
+ battle_config.attack_walk_delay = 0;
battle_config.require_glory_guild = 0;
battle_config.idle_no_share = 0;
battle_config.party_even_share_bonus = 0;
@@ -4318,54 +4320,21 @@ void battle_validate_conf() {
if (battle_config.night_duration != 0 && battle_config.night_duration < 60000) // added by [Yor]
battle_config.night_duration = 60000;
-/* if (battle_config.ban_spoof_namer < 0) // added by [Yor]
- battle_config.ban_spoof_namer = 0;
- else*/ if (battle_config.ban_spoof_namer > 32767)
- battle_config.ban_spoof_namer = 32767;
-
-/* if (battle_config.hack_info_GM_level < 0) // added by [Yor]
- battle_config.hack_info_GM_level = 0;
- else*/ if (battle_config.hack_info_GM_level > 100)
+ if (battle_config.ban_spoof_namer > SHRT_MAX)
+ battle_config.ban_spoof_namer = SHRT_MAX;
+
+ if (battle_config.hack_info_GM_level > 100)
battle_config.hack_info_GM_level = 100;
-/* if (battle_config.any_warp_GM_min_level < 0) // added by [Yor]
- battle_config.any_warp_GM_min_level = 0;
- else*/ if (battle_config.any_warp_GM_min_level > 100)
+ if (battle_config.any_warp_GM_min_level > 100)
battle_config.any_warp_GM_min_level = 100;
-/* //This is a hassle to keep updated each time there's a new limit to packet_ver_flag.... [Skotlex]
- // at least 1 client must be accepted
- if ((battle_config.packet_ver_flag & 255) == 0) // added by [Yor]
- battle_config.packet_ver_flag = 255; // accept all clients
-*/
-/* Deprecated by dynamix's new night system (using SI_NIGHT)
- if (battle_config.night_darkness_level <= 0)
- battle_config.night_darkness_level = 9;
- else if (battle_config.night_darkness_level > 10) // Celest
- battle_config.night_darkness_level = 10;
-*/
-/* if (battle_config.motd_type < 0)
- battle_config.motd_type = 0;
- else if (battle_config.motd_type > 1)
- battle_config.motd_type = 1;
-*/
-// if (battle_config.finding_ore_rate < 0)
-// battle_config.finding_ore_rate = 0;
-
if (battle_config.vending_max_value > MAX_ZENY || battle_config.vending_max_value==0)
battle_config.vending_max_value = MAX_ZENY;
if (battle_config.min_skill_delay_limit < 10)
battle_config.min_skill_delay_limit = 10; // minimum delay of 10ms
- //Spawn delays [Skotlex]
-/* if (battle_config.mob_spawn_delay < 0)
- battle_config.mob_spawn_delay = 0;
- if (battle_config.boss_spawn_delay < 0)
- battle_config.boss_spawn_delay = 0;
- if (battle_config.plant_spawn_delay < 0)
- battle_config.plant_spawn_delay = 0;
-*/
if (battle_config.no_spawn_on_player > 100)
battle_config.no_spawn_on_player = 100;
if (battle_config.mob_remove_delay < 15000) //Min 15 sec
diff --git a/src/map/battle.h b/src/map/battle.h
index fdac323c5..f4cdbd58d 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -364,6 +364,7 @@ extern struct Battle_Config {
unsigned short min_skill_delay_limit;
unsigned short default_skill_delay;
unsigned short no_skill_delay;
+ unsigned short attack_walk_delay;
unsigned short require_glory_guild;
unsigned short idle_no_share;
unsigned short party_update_interval;
diff --git a/src/map/unit.c b/src/map/unit.c
index 6881d487d..b81e5f066 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1315,7 +1315,9 @@ static int unit_attack_timer_sub(struct block_list* src, int tid, unsigned int t
ud->attackabletime = tick + sstatus->adelay;
// You can't move if you can't attack neither.
- unit_set_walkdelay(src, tick, sstatus->amotion, 1);
+ if (battle_config.attack_walk_delay)
+ unit_set_walkdelay(src, tick,
+ sstatus->amotion/battle_config.attack_walk_delay, 1);
}
if(ud->state.attack_continue)