summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt5
-rw-r--r--conf-tmpl/battle/skill.conf7
-rw-r--r--src/map/battle.c3
-rw-r--r--src/map/battle.h1
-rw-r--r--src/map/clif.c3
-rw-r--r--src/map/skill.c11
6 files changed, 24 insertions, 6 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 1ddb18a3b..de57bb940 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,11 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/04/27
+ * Removed the sending of the online guild list when you log-on, may fix the
+ "getting stuck" problem. [Skotlex]
+ * Added battle config default_skill_delay. Specifies the default skill
+ delay for most skills, it is also applied as a walkdelay (total skill
+ walkdelay is default_skill_delay + that skill's can't walk delay) [Skotlex]
* skill_castend_id and skill_castend_pos will trigger unit_stop_walking
with flag 1 (fix pos) rather than none. Should fix some skills making you
appear moving while doing them. [Skotlex]
diff --git a/conf-tmpl/battle/skill.conf b/conf-tmpl/battle/skill.conf
index 14d4d6f4f..0db893f6a 100644
--- a/conf-tmpl/battle/skill.conf
+++ b/conf-tmpl/battle/skill.conf
@@ -43,6 +43,13 @@ delay_dependon_dex: no
// Note: Setting this to anything above 0 can stop speedhacks.
min_skill_delay_limit: 100
+// Default skill delay for non-weapon based skills which have no delay specified.
+// This delay is also the min can't walk delay of all skills.
+// NOTE: Do not set this too low, if a character starts moving too soon after
+// doing a skill, the client will not update this, and the player/mob will
+// appear to "teleport" afterwards.
+default_skill_delay: 300
+
// At what dex does the cast time become zero (instacast)
castrate_dex_scale: 150
diff --git a/src/map/battle.c b/src/map/battle.c
index 8168ec153..16132afab 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3831,6 +3831,8 @@ static const struct battle_data_short {
{ "finding_ore_rate", &battle_config.finding_ore_rate}, // [celest]
{ "exp_calc_type", &battle_config.exp_calc_type}, // [celest]
{ "min_skill_delay_limit", &battle_config.min_skill_delay_limit}, // [celest]
+ { "default_skill_delay", &battle_config.default_skill_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},
@@ -4231,6 +4233,7 @@ void battle_set_defaults() {
battle_config.area_size = 14;
battle_config.exp_calc_type = 1;
battle_config.min_skill_delay_limit = 100;
+ battle_config.default_skill_delay = 300; //Default skill delay according to official servers.
battle_config.require_glory_guild = 0;
battle_config.idle_no_share = 0;
battle_config.party_even_share_bonus = 0;
diff --git a/src/map/battle.h b/src/map/battle.h
index 0d78cc460..ce1468151 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -359,6 +359,7 @@ extern struct Battle_Config {
unsigned short finding_ore_rate; // orn
unsigned short exp_calc_type;
unsigned short min_skill_delay_limit;
+ unsigned short default_skill_delay;
unsigned short require_glory_guild;
unsigned short idle_no_share;
unsigned short party_even_share_bonus;
diff --git a/src/map/clif.c b/src/map/clif.c
index 43e3374b5..387839a1c 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -8108,8 +8108,9 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
if(sd->status.pet_id > 0 && sd->pd && sd->pet.intimate > 900)
clif_pet_emotion(sd->pd,(sd->pd->class_ - 100)*100 + 50 + pet_hungry_val(sd));
+ //Removed, for some reason chars get stuck on map-change when you send this packet!? [Skotlex]
//[LuzZza]
- clif_guild_send_onlineinfo(sd);
+ //clif_guild_send_onlineinfo(sd);
} else
//New 'night' effect by dynamix [Skotlex]
diff --git a/src/map/skill.c b/src/map/skill.c
index d1b25b791..be60ae18f 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -2638,7 +2638,6 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl,int s
status_change_end(src,SC_COMBO,-1);
}
if(!check_distance_bl(src, bl, 2)) { //Need to move to target.
- struct unit_data *ud;
int dx,dy;
if (!unit_can_move(src)) { //You need to be able to move to attack/reach target.
@@ -2664,7 +2663,8 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl,int s
skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
else if (sd)
clif_skill_fail(sd,skillid,0,0);
-
+ /* Should be uneeded as you "slide", not run to the target.
+ struct unit_data *ud;
ud = unit_bl2ud(src);
if (ud) {
if(dx < 0) dx = -dx;
@@ -2676,6 +2676,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl,int s
if(DIFF_TICK(ud->canact_tick,ud->canmove_tick)<0)
ud->canact_tick = ud->canmove_tick;
}
+ */
}
else //Assume minimum distance of 1 for Charge.
skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,skillid == KN_CHARGEATK?1:flag);
@@ -5680,7 +5681,7 @@ int skill_castend_id( int tid, unsigned int tick, int id,int data )
ud->canact_tick = tick;
else
ud->canact_tick = tick + skill_delayfix(src, ud->skillid, ud->skilllv);
- unit_set_walkdelay(src, tick, skill_get_walkdelay(ud->skillid, ud->skilllv), 1);
+ unit_set_walkdelay(src, tick, battle_config.default_skill_delay+skill_get_walkdelay(ud->skillid, ud->skilllv), 1);
if(battle_config.skill_log && battle_config.skill_log&src->type)
ShowInfo("Type %d, ID %d skill castend id [id =%d, lv=%d, target ID %d)\n",
@@ -5789,7 +5790,7 @@ int skill_castend_pos( int tid, unsigned int tick, int id,int data )
src->type, src->id, ud->skillid, ud->skilllv, ud->skillx, ud->skilly);
unit_stop_walking(src,1);
ud->canact_tick = tick + skill_delayfix(src, ud->skillid, ud->skilllv);
- unit_set_walkdelay(src, tick, skill_get_walkdelay(ud->skillid, ud->skilllv), 1);
+ unit_set_walkdelay(src, tick, battle_config.default_skill_delay+skill_get_walkdelay(ud->skillid, ud->skilllv), 1);
skill_castend_pos2(src,ud->skillx,ud->skilly,ud->skillid,ud->skilllv,tick,0);
if (ud->skilltimer == -1) {
@@ -8277,7 +8278,7 @@ int skill_delayfix(struct block_list *bl, int skill_id, int skill_lv)
if (skill_get_type(skill_id) == BF_WEAPON && !(skill_get_nk(skill_id)&NK_NO_DAMAGE))
time = status_get_adelay(bl); //Use attack delay as default delay.
else
- time = 300; // default delay, according to official servers
+ time = battle_config.default_skill_delay;
} else if (time < 0)
time = -time + status_get_adelay(bl); // if set to <0, the attack delay is added.