summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authorcsnv <ctt@csnv.es>2014-09-06 02:04:53 +0200
committercsnv <ctt@csnv.es>2014-09-06 02:07:15 +0200
commit41f28c0b9c6f1a285c0dba458e582209a1710fdb (patch)
treebd0c62910fd12d9396f55af4881d8336215d2ab3 /src/map/unit.c
parent41e2a782a7c86140a2440b67258c428e09113195 (diff)
downloadhercules-41f28c0b9c6f1a285c0dba458e582209a1710fdb.tar.gz
hercules-41f28c0b9c6f1a285c0dba458e582209a1710fdb.tar.bz2
hercules-41f28c0b9c6f1a285c0dba458e582209a1710fdb.tar.xz
hercules-41f28c0b9c6f1a285c0dba458e582209a1710fdb.zip
Fixes CR_DEVOTION and MG_STONECURSE behaviour, hiding behaviour.
Fixed CR_DEVOTION to not be casted on other characters while the limit is already reached. Follow-up: e7be72538ea9c203bfd7a976d82e268e04303ca4 MG_STONECURSE now correctly displays effect when terminating SC_STONE. No longer works on hidden characters. Bug report http://hercules.ws/board/tracker/issue-7958-stone-curse/ Hiding no longer prevents skills from working if they were casted before hiding and are not intended to inflict damage (buff/de-buff skills). Tested on aegis.
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index af0c0a948..519427635 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1241,6 +1241,17 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui
casttime = -1;
temp = 1;
break;
+ case CR_DEVOTION:
+ if (sd) {
+ int i = 0, count = min(skill_lv, 5);
+ ARR_FIND(0, count, i, sd->devotion[i] == target_id);
+ if (i == count) {
+ ARR_FIND(0, count, i, sd->devotion[i] == 0);
+ if(i == count)
+ return 0; // Can't cast on other characters when limit is reached
+ }
+ }
+ break;
case SR_GATEOFHELL:
case SR_TIGERCANNON:
if (sc && sc->data[SC_COMBOATTACK] &&