summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt4
-rw-r--r--src/map/battle.c8
-rw-r--r--src/map/unit.c4
3 files changed, 11 insertions, 5 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 651a4a5ad..126e898ae 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,8 +3,10 @@ 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/07/11
+ * Fixed the subele bonus (elemental reduction) being applied to the element
+ of the attacker instead of the element of the attack. [Skotlex]
+ * mob skills now won't trigger on unit_stopwalking calls. [Skotlex]
* Coded @reset. [Skotlex]
* Reenabled @changesex [Skotlex]
* Added function pet_create_egg which handles creating pet eggs correctly
diff --git a/src/map/battle.c b/src/map/battle.c
index 25bacc337..0b30f4f1d 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1833,7 +1833,9 @@ static struct Damage battle_calc_weapon_attack(
s_race2 = status_get_race2(src);
s_class = status_get_class(src);
- cardfix=cardfix*(100-tsd->subele[sstatus->def_ele])/100;
+ cardfix=cardfix*(100-tsd->subele[s_ele])/100;
+ if (flag.lh && s_ele_ != s_ele)
+ cardfix=cardfix*(100-tsd->subele[s_ele_])/100;
cardfix=cardfix*(100-tsd->subsize[sstatus->size])/100;
cardfix=cardfix*(100-tsd->subrace2[s_race2])/100;
cardfix=cardfix*(100-tsd->subrace[sstatus->race])/100;
@@ -2357,7 +2359,7 @@ struct Damage battle_calc_magic_attack(
short cardfix=100;
if (flag.elefix)
- cardfix=cardfix*(100-tsd->subele[sstatus->def_ele])/100;
+ cardfix=cardfix*(100-tsd->subele[s_ele])/100;
cardfix=cardfix*(100-tsd->subsize[sstatus->size])/100;
cardfix=cardfix*(100-tsd->subrace2[s_race2])/100;
cardfix=cardfix*(100-tsd->subrace[sstatus->race])/100;
@@ -2595,7 +2597,7 @@ struct Damage battle_calc_misc_attack(
if(md.damage && flag.cardfix && tsd){
int cardfix = 10000;
int race2 = status_get_race(src);
- cardfix=cardfix*(100-tsd->subele[sstatus->def_ele])/100;
+ cardfix=cardfix*(100-tsd->subele[s_ele])/100;
cardfix=cardfix*(100-tsd->subsize[sstatus->size])/100;
cardfix=cardfix*(100-tsd->subrace2[race2])/100;
cardfix=cardfix*(100-tsd->subrace[sstatus->race])/100;
diff --git a/src/map/unit.c b/src/map/unit.c
index 57a557395..5497f8c2e 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -198,7 +198,9 @@ static int unit_walktoxy_timer(int tid,unsigned int tick,int id,int data)
return 0;
if (md->min_chase > md->db->range2) md->min_chase--;
//Walk skills are triggered regardless of target due to the idle-walk mob state.
- if(!(ud->walk_count%WALK_SKILL_INTERVAL) &&
+ //However, avoid triggering them when there's a forced stop-walk call
+ //(tid == -1) or client desync problems can appear.
+ if(tid != -1 && !(ud->walk_count%WALK_SKILL_INTERVAL) &&
mobskill_use(md, tick, -1))
return 0;
}