Fixes AutoSpell target checks (#6352)
* Fixes #6346. * Resolves an issue with bonus3 bAutoSpell, bonus3 bAutoSpellWhenHit, and bonus4 bAutoSpellOnSkill having their self and target flags flipped. Thanks to @Anjuts and @mazvi!
This commit is contained in:
parent
22c7f3988d
commit
238af67994
@ -4464,7 +4464,7 @@ void pc_bonus3(struct map_session_data *sd,int type,int type2,int type3,int val)
|
||||
{
|
||||
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_NOTARGETSELF));
|
||||
pc_bonus_autospell(sd->autospell, type2, type3, val, 0, current_equip_card_id, target ? AUTOSPELL_FORCE_TARGET : AUTOSPELL_FORCE_SELF);
|
||||
pc_bonus_autospell(sd->autospell, type2, type3, val, 0, current_equip_card_id, target ? AUTOSPELL_FORCE_SELF : AUTOSPELL_FORCE_TARGET);
|
||||
}
|
||||
break;
|
||||
case SP_AUTOSPELL_WHENHIT: // bonus3 bAutoSpellWhenHit,sk,y,n;
|
||||
@ -4472,7 +4472,7 @@ void pc_bonus3(struct map_session_data *sd,int type,int type2,int type3,int val)
|
||||
{
|
||||
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_NOTARGETSELF));
|
||||
pc_bonus_autospell(sd->autospell2, type2, type3, val, BF_NORMAL|BF_SKILL, current_equip_card_id, target ? AUTOSPELL_FORCE_TARGET : AUTOSPELL_FORCE_SELF);
|
||||
pc_bonus_autospell(sd->autospell2, type2, type3, val, BF_NORMAL|BF_SKILL, current_equip_card_id, target ? AUTOSPELL_FORCE_SELF : AUTOSPELL_FORCE_TARGET);
|
||||
}
|
||||
break;
|
||||
case SP_ADD_MONSTER_DROP_ITEMGROUP: // bonus3 bAddMonsterDropItemGroup,ig,r,n;
|
||||
@ -4604,7 +4604,7 @@ void pc_bonus4(struct map_session_data *sd,int type,int type2,int type3,int type
|
||||
int target = skill_get_inf(type3); //Support or Self (non-auto-target) skills should pick self.
|
||||
target = target&INF_SUPPORT_SKILL || (target&INF_SELF_SKILL && !skill_get_inf2(type3, INF2_NOTARGETSELF));
|
||||
|
||||
pc_bonus_autospell_onskill(sd->autospell3, type2, type3, type4, val, current_equip_card_id, target ? AUTOSPELL_FORCE_TARGET : AUTOSPELL_FORCE_SELF);
|
||||
pc_bonus_autospell_onskill(sd->autospell3, type2, type3, type4, val, current_equip_card_id, target ? AUTOSPELL_FORCE_SELF : AUTOSPELL_FORCE_TARGET);
|
||||
}
|
||||
break;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user