mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-01-19 02:36:14 +01:00
fix trade reject
This commit is contained in:
parent
f3ec17b0b1
commit
4af08ffffd
@ -256,9 +256,12 @@ public class ServerGameLogic implements ClientInterpreter {
|
||||
|
||||
TradeHandler tradeHandler = msg.getTradeHandler();
|
||||
|
||||
|
||||
|
||||
Player receiver = playerHandler.getPlayerById(tradeHandler.getReceiver().getId());
|
||||
Player sender = playerHandler.getPlayerById(tradeHandler.getSender().getId());
|
||||
|
||||
if(msg.isAccepted()) {
|
||||
Set<PropertyField> offered = new HashSet<>();
|
||||
|
||||
for (PropertyField propertyField : tradeHandler.getOfferedProperties()) {
|
||||
@ -287,7 +290,7 @@ public class ServerGameLogic implements ClientInterpreter {
|
||||
sender.addJailCard();
|
||||
receiver.removeJailCard();
|
||||
}
|
||||
|
||||
}
|
||||
updateAllPlayers();
|
||||
|
||||
if (receiver != null && sender != null) {
|
||||
|
Loading…
Reference in New Issue
Block a user