diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-09-10 17:07:35 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-09-10 17:07:35 +0000 |
commit | e6d726f486b00d443320269a96a0e6d9a12d8d38 (patch) | |
tree | b2fc96e5b687976248ecfce71ed049464b007354 /src/map/pc.c | |
parent | 9343f6e46de1221a00e136c69acc2762c681ba62 (diff) | |
download | hercules-e6d726f486b00d443320269a96a0e6d9a12d8d38.tar.gz hercules-e6d726f486b00d443320269a96a0e6d9a12d8d38.tar.bz2 hercules-e6d726f486b00d443320269a96a0e6d9a12d8d38.tar.xz hercules-e6d726f486b00d443320269a96a0e6d9a12d8d38.zip |
- Removed bonus bAddEffWhenHitShort as it is unneeded and unused.
- Corrected getpetinfo so it actually returns "null" when there's no pet and you request the name (the docs state it so).
- Also cleaned up a bit getpetinfo
- Added gethominfo (which behaves in the same way as getpetinfo).
- The 'maxcount' skill_db field now can store independant values per skill-level, required for Kamaitachi since it uses different range values per level.
- Corrected bonus3 bAutoSpell(WhenHit) to select target enemy (rather than self) for skills with inf self and inf2 'don't target self' (aka: auto-select target skills).
- Corrected map_foreachinpath to do a wall check for targets beyond the initially selected tile.
- Corrected Kamaitachi's range to be 9, and the path range to be 4+SkillLv
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11169 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index dc69041eb..2578903a0 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -2201,14 +2201,6 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val) if(sd->state.lr_flag != 2) pc_bonus_addeff(sd->addeff2, ARRAYLENGTH(sd->addeff2), type2, val, 0, 0); break; - case SP_ADDEFF_WHENHIT_SHORT: - if (type2 > SC_MAX) { - ShowWarning("pc_bonus2 (Add Effect when hit short): %d is not supported.\n", type2); - break; - } - if(sd->state.lr_flag != 2) - pc_bonus_addeff(sd->addeff2, ARRAYLENGTH(sd->addeff2), type2, val, 0, ATF_SHORT); - break; case SP_SKILL_ATK: if(sd->state.lr_flag == 2) break; @@ -2387,15 +2379,21 @@ int pc_bonus3(struct map_session_data *sd,int type,int type2,int type3,int val) break; case SP_AUTOSPELL: if(sd->state.lr_flag != 2) + { + int target = skill_get_inf(type2); //Support or Self (non-auto-target) skills should pick self. + target = target&INF_SUPPORT_SKILL || (target&INF_SELF_SKILL && !(skill_get_inf2(type2)&INF2_NO_TARGET_SELF)); pc_bonus_autospell(sd->autospell, ARRAYLENGTH(sd->autospell), - skill_get_inf(type2)&(INF_SELF_SKILL|INF_SUPPORT_SKILL)?-type2:type2, - type3, val, 0, current_equip_card_id); + target?-type2:type2, type3, val, 0, current_equip_card_id); + } break; case SP_AUTOSPELL_WHENHIT: if(sd->state.lr_flag != 2) + { + int target = skill_get_inf(type2); //Support or Self (non-auto-target) skills should pick self. + target = target&INF_SUPPORT_SKILL || (target&INF_SELF_SKILL && !(skill_get_inf2(type2)&INF2_NO_TARGET_SELF)); pc_bonus_autospell(sd->autospell2, ARRAYLENGTH(sd->autospell2), - skill_get_inf(type2)&(INF_SELF_SKILL|INF_SUPPORT_SKILL)?-type2:type2, - type3, val, 0, current_equip_card_id); + target?-type2:type2, type3, val, 0, current_equip_card_id); + } break; case SP_SP_DRAIN_RATE: if(!sd->state.lr_flag) { |