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

Absorption effect doesn't get clear client side #712

Closed
ItsZodiaX opened this issue Dec 18, 2022 · 2 comments
Closed

Absorption effect doesn't get clear client side #712

ItsZodiaX opened this issue Dec 18, 2022 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@ItsZodiaX
Copy link
Contributor

So if someone eats a golden apple which applies the absorption effect.
Whenever this code gets fired it only removed the absorption effect from effects map.
When trying to clear effects with RemoveEffect that also update the client side, apparently absorption effect doesn't stay in map anymore. So the absorption effect doesn't get clear client side.

for _, eff := range *Player.Effects() {
	*Player.RemoveEffect(eff.Type())
}
@JustTalDevelops JustTalDevelops added the bug Something isn't working label Dec 19, 2022
@JustTalDevelops
Copy link
Member

I don't think that's the issue - from what I understand, you're trying to remove absorption through RemoveEffect, however the absorption hearts are controlled by an attribute which can be modified by p.SetAbsorption and p.Absorption. We should probably SetAbsorption to zero after removing an absorption effect from a player.

@JustTalDevelops
Copy link
Member

Fixed with latest commits.

@JustTalDevelops JustTalDevelops added this to the v0.9.0 milestone Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants