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

Bush damage fix #2191

Closed

Conversation

BartPortugalec
Copy link

@BartPortugalec BartPortugalec commented Oct 23, 2024

closes #1813

Important

Adjusts damage calculation in TES5DamageFormulaImpl to account for bash attacks and updates submodule in vcpkg.

  • Behavior:
    • Modify DetermineDamageFromSource in TES5DamageFormulaImpl to accept isBashAttack parameter.
    • Adjust damage calculation in CalculateDamage to apply a 0.3x multiplier for bash attacks.
    • Update IsUnarmedAttack to return false for bash attacks.
  • Misc:
    • Update submodule commit in vcpkg.

This description was created by Ellipsis for 37bb1bc. It will automatically update as commits are pushed.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Changes requested. Reviewed everything up to 37bb1bc in 40 seconds

More details
  • Looked at 68 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. skymp5-server/cpp/server_guest_lib/formulas/TES5DamageFormula.cpp:213
  • Draft comment:
    The function IsUnarmedAttack is defined twice, once in the global namespace and once within the internal namespace. Consider removing the redundant definition.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    The comment is incorrect because the function was not defined twice in the current state of the file. The diff shows that the function was moved from the internal namespace to the global namespace with a modification. The comment does not reflect the current state of the code after the changes.
    I might be missing the fact that the comment could be referring to a different part of the code not visible in the diff, but based on the provided context, it seems unlikely.
    The context provided includes the entire file, so it's reasonable to conclude that the comment is outdated or incorrect based on the current state of the file.
    The comment is incorrect because the function 'IsUnarmedAttack' is not defined twice in the current state of the file. The comment should be deleted.

Workflow ID: wflow_UwiewKsOrdY2KBGS


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.


bool IsUnarmedAttack(const uint32_t sourceFormId, bool isBashAttack)
{
return isBashAttack ? false : sourceFormId == 0x1f4
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon at the end of the return statement.

Suggested change
return isBashAttack ? false : sourceFormId == 0x1f4
return isBashAttack ? false : sourceFormId == 0x1f4;

@@ -118,9 +112,9 @@
return espm::GetData<espm::RACE>(raceId, espmProvider).unarmedDamage;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update the function declaration to match the definition by adding the bool isBashAttack parameter.

@Pospelove
Copy link
Contributor

Pospelove commented Oct 23, 2024

@BartPortugalec Could you please revert vcpkg change? Please let me know if you need help with this

@BartPortugalec BartPortugalec deleted the BushDamageFix branch November 13, 2024 18:28
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.

Bash attack deliver unarmed damage. But they should deliver BASH damage instead
2 participants