summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-28 15:49:36 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-28 15:49:36 +0000
commit2b4787d78f47142d979cb568e179387fb4befc7b (patch)
tree5d9bb07a9d54bb882849c363d096f70a402e52a4 /src/map/unit.c
parent16d0bed247603d86d33b6b6b2cf6e3e2251abab4 (diff)
downloadhercules-2b4787d78f47142d979cb568e179387fb4befc7b.tar.gz
hercules-2b4787d78f47142d979cb568e179387fb4befc7b.tar.bz2
hercules-2b4787d78f47142d979cb568e179387fb4befc7b.tar.xz
hercules-2b4787d78f47142d979cb568e179387fb4befc7b.zip
- Fixed summon mobs being able to cast "summon" skills.
- Summoned mobs will inherit the size and ai properties of the master. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5790 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index fe62c5da4..605a8bc24 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -773,6 +773,15 @@ int unit_skilluse_id2(struct block_list *src, int target_id, int skill_num, int
if (!skill_check_condition(sd, skill_num, skill_lv, 0))
return 0;
}
+ //TODO: Add type-independant skill_check_condition function.
+ if (src->type == BL_MOB) {
+ switch (skill_num) {
+ case NPC_SUMMONSLAVE:
+ case NPC_SUMMONMONSTER:
+ if (((TBL_MOB*)src)->master_id)
+ return 0;
+ }
+ }
if(src->id != target_id &&
!battle_check_range(src,target,skill_get_range2(src, skill_num,skill_lv)