LocationsObjects bugfix
This commit is contained in:
parent
f5e313dda3
commit
ab080773c8
@ -146,28 +146,28 @@ public class GameServer {
|
||||
message.getTransactionId(),
|
||||
xmlMapper.writeValueAsString(
|
||||
locationService.getDefaultLocation()
|
||||
)
|
||||
).replace("<", "<")
|
||||
);
|
||||
return;
|
||||
}
|
||||
long requestedLocation = message.getArguments().get(1).getLong();
|
||||
if( requestedLocation == -1L ) {
|
||||
int homePlayerId = message.getArguments().get(0).getInt();
|
||||
this.sendResult(playerId, message.getTransactionId(), xmlMapper.writeValueAsString(locationService.getHomeByUserId(homePlayerId)));
|
||||
this.sendResult(playerId, message.getTransactionId(), xmlMapper.writeValueAsString(locationService.getHomeByUserId(homePlayerId)).replace("<", "<"));
|
||||
return;
|
||||
}
|
||||
if( requestedLocation == -2L ) {
|
||||
|
||||
return;
|
||||
}
|
||||
this.sendResult(playerId, message.getTransactionId(), xmlMapper.writeValueAsString(locationService.getLocationById(requestedLocation)));
|
||||
this.sendResult(playerId, message.getTransactionId(), xmlMapper.writeValueAsString(locationService.getLocationById(requestedLocation)).replace("<", "<"));
|
||||
}
|
||||
case GetUserLocationById -> {
|
||||
long nextLocation = message.getArguments().get(1).getLong();
|
||||
if (nextLocation == -1) {
|
||||
nextLocation = 0;
|
||||
}
|
||||
this.sendResult(playerId, message.getTransactionId(), xmlMapper.writeValueAsString(locationService.getLocationById(nextLocation)));
|
||||
this.sendResult(playerId, message.getTransactionId(), xmlMapper.writeValueAsString(locationService.getLocationById(nextLocation)).replace("<", "<"));
|
||||
}
|
||||
case ChatMessage -> {
|
||||
String text = message.getArguments().get(1).toString();
|
||||
|
@ -4,6 +4,7 @@ import com.alterdekim.game.controller.result.api.ApiResult;
|
||||
import com.alterdekim.game.controller.result.api.LocationObjectInstanceResult;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlText;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
@ -41,7 +42,7 @@ public class LocationObjectInstance implements ApiResult {
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "y")
|
||||
private Double y;
|
||||
|
||||
@JsonIgnore
|
||||
@JacksonXmlText
|
||||
private String options;
|
||||
|
||||
@JsonIgnore
|
||||
|
Loading…
x
Reference in New Issue
Block a user