Fix so player 2 receives zones properly in network game

This commit is contained in:
drdev
2015-07-19 00:13:10 +00:00
parent fa1046d5be
commit c75a63305d
4 changed files with 16 additions and 6 deletions

View File

@@ -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.
*/

View File

@@ -48,6 +48,7 @@ public class TrackableTypes {
protected void updateObjLookup(T newObj) {
if (!objLookup.containsKey(newObj.getId())) {
objLookup.put(newObj.getId(), newObj);
newObj.updateObjLookup();
}
}