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

Null exception in combat, on an evade of incoming attack #1172

Closed
ghost opened this issue Dec 22, 2018 · 2 comments
Closed

Null exception in combat, on an evade of incoming attack #1172

ghost opened this issue Dec 22, 2018 · 2 comments

Comments

@ghost
Copy link

ghost commented Dec 22, 2018

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Repro steps.

Enter into combat with anything. If you evade a mobs attack, server will crash with a null exception.

The log given by the failure.

Null check missing at line 138 of Player_Combat.cs. Function Math.Round(), at line 149, cannot be performed on damage.Value, when damage is null

Desired functionality.

Line 138 of Player_Combat.cs should probably be changed to "if (damage != null && target.Health.Current > 0)", instead of "if (target.Health.Current > 0)", as that whole if branch isn't needed if the attack was evaded.

@gmriggs
Copy link
Collaborator

gmriggs commented Dec 22, 2018

This should be fixed in #1168

@ghost
Copy link
Author

ghost commented Dec 23, 2018

Confirmed fixed by commit 1168

@ghost ghost closed this as completed Dec 23, 2018
This issue was closed.
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

No branches or pull requests

1 participant