Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
ziqian zhang
Grasscutter
Commits
65915b76
Commit
65915b76
authored
Nov 05, 2022
by
AnimeGitB
Browse files
Make PlayerBuffManager::removeBuff actually remove buff
parent
1ceda2a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/game/player/PlayerBuffManager.java
View file @
65915b76
...
...
@@ -130,9 +130,7 @@ public class PlayerBuffManager extends BasePlayerManager {
}
// Clear previous buff if it exists
if
(
this
.
hasBuff
(
buffData
.
getGroupId
()))
{
this
.
removeBuff
(
buffData
.
getGroupId
());
}
this
.
removeBuff
(
buffData
.
getGroupId
());
// Create and store buff
PlayerBuff
buff
=
new
PlayerBuff
(
getNextBuffUid
(),
buffData
,
duration
);
...
...
@@ -150,7 +148,7 @@ public class PlayerBuffManager extends BasePlayerManager {
* @return True if a buff was remove
*/
public
synchronized
boolean
removeBuff
(
int
buffGroupId
)
{
PlayerBuff
buff
=
this
.
buffs
.
get
(
buffGroupId
);
PlayerBuff
buff
=
this
.
buffs
.
remove
(
buffGroupId
);
if
(
buff
!=
null
)
{
getPlayer
().
sendPacket
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment