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

refactor(server): OnWeaponDamageEvent and WeaponDamageResponse #40

Merged
merged 3 commits into from
Dec 16, 2024

Conversation

Avepy
Copy link
Contributor

@Avepy Avepy commented Dec 14, 2024

Summary

This PR refactors the weapon damage event handling logic for improved readability, maintainability, and clarity.


Key Changes

  1. WeaponDamageResponse Updates:

    • Renamed notCancel to Cancel for clarity.
  2. OnWeaponDamageEvent Refactor:

    • Extracted event processing logic into a new helper method ProcessWeaponDamageEvents.
    • Simplified cancellation and damage aggregation logic.
    • Enhanced exception handling and logging.
  3. Improved Documentation:

    • Added clear XML comments for public methods and records.

@Avepy Avepy requested a review from Doxoh as a code owner December 14, 2024 15:26
@Doxoh
Copy link
Collaborator

Doxoh commented Dec 16, 2024

Thanks for this. Its a breaking change.

@Doxoh Doxoh merged commit b02a1d9 into altmp:dev Dec 16, 2024
@Avepy Avepy deleted the refactor/WeaponDamageEventHandler branch December 16, 2024 15:06
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.

2 participants