Reformat and clean up "net" package
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user