Follow up to 4871dab
* Expanded the array for Comet's SP cost to MAX_PARTY to avoid overflow. * Refined the count check for skill_check_condition_char_sub: -- Included Adoramus in the check. -- Added a fail safe check. Thanks to @theultramage.
This commit is contained in:
parent
f424a2a71d
commit
9db667c6ac
@ -5848,7 +5848,7 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
|
||||
|
||||
if (sd && sd->status.party_id) {
|
||||
struct map_session_data* psd;
|
||||
int p_sd[5] = {0, 0, 0, 0, 0}, c; // just limit it to 5
|
||||
int p_sd[MAX_PARTY], c;
|
||||
|
||||
c = 0;
|
||||
memset(p_sd, 0, sizeof(p_sd));
|
||||
|
@ -14133,14 +14133,16 @@ int skill_check_condition_char_sub (struct block_list *bl, va_list ap)
|
||||
skill_id = va_arg(ap,int);
|
||||
inf2 = skill_get_inf2(skill_id);
|
||||
|
||||
if (skill_id == PR_BENEDICTIO && *c >= 2)
|
||||
return 0; // Two companions found for Benedictio. [Skotlex]
|
||||
|
||||
if (inf2&INF2_ENSEMBLE_SKILL && *c >= 1)
|
||||
return 0; // Partner found for ensembles.
|
||||
|
||||
if ((inf2&INF2_CHORUS_SKILL || skill_id == WL_COMET) && *c == MAX_PARTY)
|
||||
return 0; // Entire party accounted for.
|
||||
if (skill_id == PR_BENEDICTIO && *c >= 2) // Check for two companions for Benedictio. [Skotlex]
|
||||
return 0;
|
||||
else if (skill_id == AB_ADORAMUS && *c >= 1) // Check for a partner for Adoramus.
|
||||
return 0;
|
||||
else if (inf2&INF2_ENSEMBLE_SKILL && *c >= 1) // Check for a partner for ensembles.
|
||||
return 0;
|
||||
else if ((inf2&INF2_CHORUS_SKILL || skill_id == WL_COMET) && *c == MAX_PARTY) // Check for partners for Chorus or Comet; Cap if the entire party is accounted for.
|
||||
return 0;
|
||||
else if (*c >= 1) // Check for all other cases.
|
||||
return 0;
|
||||
|
||||
if (bl == src)
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user