mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
Fix so player 2 receives zones properly in network game
This commit is contained in:
@@ -4,6 +4,7 @@ import java.io.Serializable;
|
||||
import java.util.EnumMap;
|
||||
import java.util.EnumSet;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import forge.game.IIdentifiable;
|
||||
@@ -66,6 +67,12 @@ public abstract class TrackableObject implements IIdentifiable, Serializable {
|
||||
}
|
||||
}
|
||||
|
||||
public final void updateObjLookup() {
|
||||
for (final Entry<TrackableProperty, Object> prop : props.entrySet()) {
|
||||
prop.getKey().updateObjLookup(prop.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Copy all change properties of another Trackable object to this object.
|
||||
*/
|
||||
|
||||
@@ -48,6 +48,7 @@ public class TrackableTypes {
|
||||
protected void updateObjLookup(T newObj) {
|
||||
if (!objLookup.containsKey(newObj.getId())) {
|
||||
objLookup.put(newObj.getId(), newObj);
|
||||
newObj.updateObjLookup();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user