diff options
author | Michieru <Michieru@users.noreply.github.com> | 2014-09-08 09:17:28 +0200 |
---|---|---|
committer | Michieru <Michieru@users.noreply.github.com> | 2014-09-08 09:17:28 +0200 |
commit | 3a79f91a7792425855b3cf0bd1fe66cbba506848 (patch) | |
tree | 21693d4eee2d1034864e6bb6acc7fb6b1f0bdc8a /src/map/unit.c | |
parent | 1c71c00b96bfc6674a544e9f88e0ccc0dbe2aae4 (diff) | |
parent | 41f28c0b9c6f1a285c0dba458e582209a1710fdb (diff) | |
download | hercules-3a79f91a7792425855b3cf0bd1fe66cbba506848.tar.gz hercules-3a79f91a7792425855b3cf0bd1fe66cbba506848.tar.bz2 hercules-3a79f91a7792425855b3cf0bd1fe66cbba506848.tar.xz hercules-3a79f91a7792425855b3cf0bd1fe66cbba506848.zip |
Merge pull request #339 from csnv/skillchecks
Fixes CR_DEVOTION and MG_STONECURSE behaviour, hiding behaviour.
Diffstat (limited to 'src/map/unit.c')
-rw-r--r-- | src/map/unit.c | 11 |
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] && |