Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add spelleffect_data_t::average( special_effect_t ) #9334

Merged
merged 1 commit into from
Aug 25, 2024

Conversation

gastank
Copy link
Contributor

@gastank gastank commented Aug 25, 2024

when passed a special_effect_t argument, average() will determine the appropriate scaling based on the spell's attributes.

  1. if the spell does not have SX_SCALE_ILEVEL, it will use player level scaling.
  2. if the spell has SX_SCALE_ILEVEL and a valid item, it will use item level scaling with the item level capped by the maximum scaling level of the spell.
  3. if the spell has SX_SCALE_ILEVEL, no item, a valid a maximum scaling level, it will use item level scaling with the item level equal to the maximum scaling level of the spell.
  4. if the spell has SX_SCALE_ILEVEL, no vaild item, and no maximum scaling level, it will assert as this situation requires manual intervention.

when passed a special_effect_t argument, average() will determine the appropriate
scaling based on the spell's attributes.

1. if the spell does not have SX_SCALE_ILEVEL, it will use player level scaling.
2. if the spell has SX_SCALE_ILEVEL and a valid item, it will use item level scaling with the item level capped by the maximum scaling level of the spell.
3. if the spell has SX_SCALE_ILEVEL, no item, a valid a maximum scaling level, it will use item level scaling with the item level equal to the maximum scaling level of the spell.
4. if the spell has SX_SCALE_ILEVEL, no vaild item, and no maximum scaling level, it will assert as this situation requires manual intervention.
@gastank gastank merged commit 312b720 into thewarwithin Aug 25, 2024
125 checks passed
@gastank gastank deleted the auto-scaling-average branch August 25, 2024 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant