From e6d726f486b00d443320269a96a0e6d9a12d8d38 Mon Sep 17 00:00:00 2001 From: skotlex Date: Mon, 10 Sep 2007 17:07:35 +0000 Subject: - 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 --- src/map/pc.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'src/map/pc.c') 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) { -- cgit v1.2.3-70-g09d2