summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorblackhole89 <blackhole89@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-23 19:29:40 +0000
committerblackhole89 <blackhole89@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-23 19:29:40 +0000
commita072cb579041699023f5197ffcb303acef112e2f (patch)
treeb82f79fa794b7dc2b3ecc887e9794d703d64e782
parent08e3879a38da10dc3f0bdd3f7278c0355a1d263a (diff)
downloadhercules-a072cb579041699023f5197ffcb303acef112e2f.tar.gz
hercules-a072cb579041699023f5197ffcb303acef112e2f.tar.bz2
hercules-a072cb579041699023f5197ffcb303acef112e2f.tar.xz
hercules-a072cb579041699023f5197ffcb303acef112e2f.zip
"castnodex&~1"
aka, testing for castnodex having any bit in not 1 set instead of not having bit 1 set. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5719 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt1
-rw-r--r--src/map/skill.c10
2 files changed, 6 insertions, 5 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 73c173742..5568fc2c8 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -5,6 +5,7 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. EV
GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
2006/03/23
+ * Fixed DEX-based casting time and delay reduction. [blackhole89]
* Modified the function pc_percent_heal to prevent overflow problems. [Skotlex]
* Changed the second entry in the water_height.txt listing to specify
directly the .rsw file (instead of .gat). [Skotlex]
diff --git a/src/map/skill.c b/src/map/skill.c
index 6bcd82c4b..9aee1a01a 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -8234,7 +8234,7 @@ int skill_castfix( struct block_list *bl, int skill_id, int skill_lv, int time)
nullpo_retr(0, sd);
// calculate base cast time (reduced by dex)
- if (castnodex&~1) {
+ if (!(castnodex&1)) { // castnodex&~1? wtf. [blackhole89]
int scale = battle_config.castrate_dex_scale - status_get_dex(bl);
if (scale > 0) // not instant cast
time = time * scale / battle_config.castrate_dex_scale;
@@ -8249,7 +8249,7 @@ int skill_castfix( struct block_list *bl, int skill_id, int skill_lv, int time)
if (sd->castrate != 100)
time -= time * (100 - sd->castrate) / 100;
} else if (bl->type == BL_PET) { //Skotlex: Simple scaling
- if (castnodex&~1) {
+ if (!(castnodex&1)) {
int scale = battle_config.castrate_dex_scale - status_get_dex(bl);
if (scale > 0) // not instant cast
time = time * scale / battle_config.castrate_dex_scale;
@@ -8259,7 +8259,7 @@ int skill_castfix( struct block_list *bl, int skill_id, int skill_lv, int time)
time = time * battle_config.cast_rate / 100;
}
- if (castnodex&~2)
+ if (!(castnodex&2))
{ // calculate cast time reduced by skill bonuses
sc = status_get_sc(bl);
/* ƒTƒtƒ‰ƒMƒEƒ€ */
@@ -8300,7 +8300,7 @@ int skill_delayfix( struct block_list *bl, int skill_id, int skill_lv, int time
} else if (time < 0)
time = -time + status_get_amotion(bl); // if set to <0, the attack motion is added.
- if (battle_config.delay_dependon_dex && delaynodex&~1)
+ if (battle_config.delay_dependon_dex && !(delaynodex&1))
{ // if skill casttime is allowed to be reduced by dex
int scale = battle_config.castrate_dex_scale - status_get_dex(bl);
if (scale > 0)
@@ -8319,7 +8319,7 @@ int skill_delayfix( struct block_list *bl, int skill_id, int skill_lv, int time
time = battle_config.min_skill_delay_limit;
}
- if (delaynodex&~2)
+ if (!(delaynodex&2))
{ /* ƒuƒ‰ƒM‚ÌŽ? */
sc= status_get_sc(bl);
if (sc && sc->count) {