summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-24 19:01:53 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-24 19:01:53 +0000
commit0b4c74ca60babc8e1cc3a5cc2225b5705a430586 (patch)
tree1ee9ffddee70be1397d153ec29d62aab958be559 /src/map/skill.c
parentf8ebb28853a8a9c51725778688af0c4bb54d31e0 (diff)
downloadhercules-0b4c74ca60babc8e1cc3a5cc2225b5705a430586.tar.gz
hercules-0b4c74ca60babc8e1cc3a5cc2225b5705a430586.tar.bz2
hercules-0b4c74ca60babc8e1cc3a5cc2225b5705a430586.tar.xz
hercules-0b4c74ca60babc8e1cc3a5cc2225b5705a430586.zip
- Adjusted skill_castfix_sc so that Suffragium will get consumed even on instant cast skills, but Memorize won't.
- Adjusted map_countoncell to receive the BL_* defines currently used instead of 0 to signal all. - BladeStop will now end when either of the characters is moved (knocked out?) around. - Moved the Zeny penalty code from respawn to pc_dead. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7859 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 230b35e55..3e92d7357 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -7053,7 +7053,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
// GXは重なっていたら3HITしない
if ((skillid==CR_GRANDCROSS || skillid==NPC_GRANDDARKNESS) && !battle_config.gx_allhit)
- ts->tick += sg->interval*(map_count_oncell(bl->m,bl->x,bl->y,0)-1);
+ ts->tick += sg->interval*(map_count_oncell(bl->m,bl->x,bl->y,BL_CHAR)-1);
}
//Temporarily set magic power to have it take effect. [Skotlex]
if (sg->state.magic_power && sc && sc->data[SC_MAGICPOWER].timer == -1)
@@ -8582,14 +8582,16 @@ int skill_castfix_sc (struct block_list *bl, int time)
{
struct status_change *sc = status_get_sc(bl);
-// if (time <= 0) return 0; //Reports say that Suffragium should be consumed even on instant cast skills [Skotlex]
-
if (sc && sc->count) {
if (sc->data[SC_SUFFRAGIUM].timer != -1) {
time -= time * (sc->data[SC_SUFFRAGIUM].val1 * 15) / 100;
status_change_end(bl, SC_SUFFRAGIUM, -1);
}
- if (sc->data[SC_MEMORIZE].timer != -1) {
+
+ if (time <= 0)
+ return 0; //Only Suffragium gets consumed even if time is 0
+
+ if (sc->data[SC_MEMORIZE].timer != -1 && time > 0) {
time>>=1;
if ((--sc->data[SC_MEMORIZE].val2) <= 0)
status_change_end(bl, SC_MEMORIZE, -1);