diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-06-23 15:41:17 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-06-23 15:41:17 +0000 |
commit | 43fe20d3fa5793b185d5f399c5c48075d4d6f842 (patch) | |
tree | 84b3d0261b92f6a14beae125ae57d8e9266a35de /src/map/mob.c | |
parent | 921d73f1f2aedfd13f760153b1b11695d7ab85f8 (diff) | |
download | hercules-43fe20d3fa5793b185d5f399c5c48075d4d6f842.tar.gz hercules-43fe20d3fa5793b185d5f399c5c48075d4d6f842.tar.bz2 hercules-43fe20d3fa5793b185d5f399c5c48075d4d6f842.tar.xz hercules-43fe20d3fa5793b185d5f399c5c48075d4d6f842.zip |
- Updated BD_INTOABYSS's unit flag to not affect mobs.
- Changed setting for skill_nocast flag 16. It is no longer a "pk-mode map" setting, it's now a clone-forbidden skill. That is, skills with the flag 16 will never be copied by clones. If you use a PK-mode server, use flag 2 now to forbid skills from common maps.
- Default skills from not being cloned are Magnus Exorcism and Turn Undead.
- The map search free cell will now use the size of the map # of tries before giving up when the spawn area is the whole map. Added a check to inmediately give up when the number of spawn retries has reached the max specified (no_spawn_onplayer = 100).
- Cleaned up a bit the clone code to account for the unit flags UF_NOPC/UF_NOMOB when the skill is not ground-based (accounts for self skill that causes a ground-tile to be placed, like Dances).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7315 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r-- | src/map/mob.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index e4f94679d..abf92a691 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2842,8 +2842,19 @@ int mob_clone_spawn(struct map_session_data *sd, int m, int x, int y, const char //Go Backwards to give better priority to advanced skills. for (i=0,j = MAX_SKILL_TREE-1;j>=0 && i< MAX_MOBSKILL ;j--) { skill_id = skill_tree[sd->status.class_][j].id; - if (!skill_id || sd->status.skill[skill_id].lv < 1 || (skill_get_inf2(skill_id)&(INF2_WEDDING_SKILL|INF2_GUILD_SKILL))) + if (!skill_id || sd->status.skill[skill_id].lv < 1 || + (skill_get_inf2(skill_id)&(INF2_WEDDING_SKILL|INF2_GUILD_SKILL)) || + skill_get_nocast(skill_id)&16 + ) + continue; + //Normal aggressive mob, disable skills that cannot help them fight + //against players (those with flags UF_NOMOB and UF_NOPC are specific + //to always aid players!) [Skotlex] + if (!(flag&1) && + skill_get_unit_id(skill_id, 0) && + skill_get_unit_flag(skill_id)&(UF_NOMOB|UF_NOPC)) continue; + memset (&ms[i], 0, sizeof(struct mob_skill)); ms[i].skill_id = skill_id; ms[i].skill_lv = sd->status.skill[skill_id].lv; @@ -2863,11 +2874,6 @@ int mob_clone_spawn(struct map_session_data *sd, int m, int x, int y, const char else ms[i].state = MSS_BERSERK; } else if(inf&INF_GROUND_SKILL) { - //Normal aggressive mob, disable skills that cannot help them fight - //against players (those with flags UF_NOMOB and UF_NOPC are specific - //to always aid players!) [Skotlex] - if (!(flag&1) && skill_get_unit_flag(skill_id)&(UF_NOMOB|UF_NOPC)) - continue; if (skill_get_inf2(skill_id)&INF2_TRAP) { //Traps! ms[i].state = MSS_IDLE; ms[i].target = MST_AROUND2; |