Commit 65915b76 authored by AnimeGitB's avatar AnimeGitB
Browse files

Make PlayerBuffManager::removeBuff actually remove buff

parent 1ceda2a4
...@@ -130,9 +130,7 @@ public class PlayerBuffManager extends BasePlayerManager { ...@@ -130,9 +130,7 @@ public class PlayerBuffManager extends BasePlayerManager {
} }
// Clear previous buff if it exists // Clear previous buff if it exists
if (this.hasBuff(buffData.getGroupId())) {
this.removeBuff(buffData.getGroupId()); this.removeBuff(buffData.getGroupId());
}
// Create and store buff // Create and store buff
PlayerBuff buff = new PlayerBuff(getNextBuffUid(), buffData, duration); PlayerBuff buff = new PlayerBuff(getNextBuffUid(), buffData, duration);
...@@ -150,7 +148,7 @@ public class PlayerBuffManager extends BasePlayerManager { ...@@ -150,7 +148,7 @@ public class PlayerBuffManager extends BasePlayerManager {
* @return True if a buff was remove * @return True if a buff was remove
*/ */
public synchronized boolean removeBuff(int buffGroupId) { public synchronized boolean removeBuff(int buffGroupId) {
PlayerBuff buff = this.buffs.get(buffGroupId); PlayerBuff buff = this.buffs.remove(buffGroupId);
if (buff != null) { if (buff != null) {
getPlayer().sendPacket( getPlayer().sendPacket(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment