diff --git a/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/serialize/EventSerializer.java b/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/serialize/EventSerializer.java index 3654102..ae74246 100644 --- a/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/serialize/EventSerializer.java +++ b/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/serialize/EventSerializer.java @@ -97,10 +97,15 @@ public class EventSerializer extends StdSerializer { SerializerProvider provider) throws IOException { gen.writeObjectField("originEntity", value.originEntity); - gen.writeObjectField("targetEntity", value.targetEntity); + + if (value.type != EventType.MoveEvent) { + gen.writeObjectField("targetEntity", value.targetEntity); + } + gen.writeObjectField("originField", value.originField); gen.writeObjectField("targetField", value.targetField); + if (value.type == EventType.UseInfinityStoneEvent || value.type == EventType.ExchangeInfinityStoneEvent) { gen.writeObjectField("stoneType", new EntityID(EntityType.InfinityStones, value.stoneType.getID())); }