diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-07-25 00:42:38 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-07-25 00:42:38 +0000 |
commit | f2465bfa9245ae73e0320f36b766df352bd71d44 (patch) | |
tree | 4f282de5424835f1c357a5b83122f0fb73cd23d3 /src/map/skill.c | |
parent | b0d0e25720191d6971636760442d58d9f15aa875 (diff) | |
download | hercules-f2465bfa9245ae73e0320f36b766df352bd71d44.tar.gz hercules-f2465bfa9245ae73e0320f36b766df352bd71d44.tar.bz2 hercules-f2465bfa9245ae73e0320f36b766df352bd71d44.tar.xz hercules-f2465bfa9245ae73e0320f36b766df352bd71d44.zip |
- Cleaned up the skill_landprotector function to correctly block only magic skills from being placed on land protectors.
- Corrected itemdb_group so that it will not return the random item givers (should give priority to actual item groups, so that the item heal bonuses work correctly)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7867 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index e360680b6..364d87b1b 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -9320,21 +9320,24 @@ int skill_landprotector (struct block_list *bl, va_list ap) return 1; } - if (skill_get_type(unit->group->skill_id) != BF_MAGIC) - return 0; //Only blocks out magical skills. - - if (skillid == SA_LANDPROTECTOR || skillid == HW_GANBANTEIN ) { + if((skillid == SA_LANDPROTECTOR || skillid == HW_GANBANTEIN) && + skill_get_type(unit->group->skill_id) == BF_MAGIC) + { //Delete Magical effects skill_delunit(unit); - } else - if (unit->group->skill_id == SA_LANDPROTECTOR) { + return 1; + } + if (unit->group->skill_id == SA_LANDPROTECTOR && + skill_get_type(skillid) == BF_MAGIC) + { //Magic tile won't be activated (*alive) = 0; - } else - if (skillid == HP_BASILICA && unit->group->skill_id == HP_BASILICA) { - //Basilica can't be placed on top of itself to avoid map-cell stacking problems. [Skotlex] + return 1; + } + if (skillid == HP_BASILICA && unit->group->skill_id == HP_BASILICA) + { //Basilica can't be placed on top of itself to avoid map-cell stacking problems. [Skotlex] (*alive) = 0; - } else - return 0; - return 1; + return 1; + } + return 0; } /*========================================== |