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