mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-08-01 02:16:15 -04:00
GCWZones work fully, completely in their entirety
- Correct deltas are sent - Math is now correct - Zone History is recorded
This commit is contained in:
@@ -41,21 +41,24 @@ import org.python.google.common.collect.TreeMultimap;
|
||||
import resources.common.StringUtilities;
|
||||
|
||||
import com.sleepycat.persist.model.NotPersistent;
|
||||
import com.sleepycat.persist.model.Persistent;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
|
||||
@Persistent
|
||||
public class SWGMultiMap<K, V> implements Multimap<K, V> {
|
||||
|
||||
private Multimap<K, V> map = ArrayListMultimap.create();
|
||||
@NotPersistent
|
||||
private int updateCounter;
|
||||
|
||||
private int updateCounter = 0;
|
||||
private ObjectMessageBuilder messageBuilder;
|
||||
private byte viewType;
|
||||
private short updateType;
|
||||
|
||||
@NotPersistent
|
||||
protected final Object objectMutex = new Object();
|
||||
|
||||
public SWGMultiMap() { }
|
||||
|
||||
public SWGMultiMap(ObjectMessageBuilder messageBuilder, int viewType, int updateType) {
|
||||
this.messageBuilder = messageBuilder;
|
||||
this.viewType = (byte) viewType;
|
||||
@@ -71,10 +74,6 @@ public class SWGMultiMap<K, V> implements Multimap<K, V> {
|
||||
}
|
||||
}
|
||||
|
||||
public SWGMultiMap() {
|
||||
|
||||
}
|
||||
|
||||
public Map<K, Collection<V>> asMap() {
|
||||
synchronized(objectMutex) {
|
||||
return map.asMap();
|
||||
@@ -284,6 +283,10 @@ public class SWGMultiMap<K, V> implements Multimap<K, V> {
|
||||
}
|
||||
}
|
||||
|
||||
public Object getMutex() {
|
||||
return objectMutex;
|
||||
}
|
||||
|
||||
private byte[] item(int type, Object index, byte[] data, boolean useIndex, boolean useData) {
|
||||
if (useIndex && !(index instanceof Byte) && !(index instanceof Short)
|
||||
&& !(index instanceof Integer) && !(index instanceof Float)
|
||||
|
||||
Reference in New Issue
Block a user