Reformat and clean up "net" package

This commit is contained in:
P0nk
2021-09-09 23:26:02 +02:00
parent 69f4580637
commit 6be6ea9927
235 changed files with 3556 additions and 3398 deletions

View File

@@ -33,15 +33,14 @@ import java.util.Map;
import java.util.concurrent.locks.Lock;
/**
*
* @author Danny//changed to map :3
* @author Ronan//debuffs to storage as well
*/
public class PlayerBuffStorage {
private int id = (int) (Math.random() * 100);
private final Lock lock = MonitoredReentrantLockFactory.createLock(MonitoredLockType.BUFF_STORAGE, true);
private Map<Integer, List<PlayerBuffValueHolder>> buffs = new HashMap<>();
private Map<Integer, Map<Disease, Pair<Long, MobSkill>>> diseases = new HashMap<>();
private final int id = (int) (Math.random() * 100);
private final Lock lock = MonitoredReentrantLockFactory.createLock(MonitoredLockType.BUFF_STORAGE, true);
private final Map<Integer, List<PlayerBuffValueHolder>> buffs = new HashMap<>();
private final Map<Integer, Map<Disease, Pair<Long, MobSkill>>> diseases = new HashMap<>();
public void addBuffsToStorage(int chrid, List<PlayerBuffValueHolder> toStore) {
lock.lock();
@@ -60,7 +59,7 @@ public class PlayerBuffStorage {
lock.unlock();
}
}
public void addDiseasesToStorage(int chrid, Map<Disease, Pair<Long, MobSkill>> toStore) {
lock.lock();
try {
@@ -99,9 +98,6 @@ public class PlayerBuffStorage {
return false;
}
final PlayerBuffStorage other = (PlayerBuffStorage) obj;
if (id != other.id) {
return false;
}
return true;
return id == other.id;
}
}