mirror of
https://github.com/Melledy/Nebula.git
synced 2025-12-16 14:24:57 +01:00
Fix potential count when giving up a Monolith run
This commit is contained in:
@@ -215,6 +215,10 @@ public class StarTowerGame {
|
|||||||
return this.getRarePotentialCount().get(charId);
|
return this.getRarePotentialCount().get(charId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getTotalPotentialCount() {
|
||||||
|
return this.getItems().values().intStream().reduce(0, Integer::sum);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the team element, if the team has 2+ or more elements, then returns null
|
* Gets the team element, if the team has 2+ or more elements, then returns null
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ public class HandlerStarTowerGiveUpReq extends NetHandler {
|
|||||||
// Build response
|
// Build response
|
||||||
var rsp = StarTowerGiveUpResp.newInstance()
|
var rsp = StarTowerGiveUpResp.newInstance()
|
||||||
.setBuild(game.getBuild().toProto())
|
.setBuild(game.getBuild().toProto())
|
||||||
|
.setPotentialCnt(game.getTotalPotentialCount())
|
||||||
.setFloor(game.getFloorCount());
|
.setFloor(game.getFloorCount());
|
||||||
|
|
||||||
rsp.getMutableChange();
|
rsp.getMutableChange();
|
||||||
|
|||||||
Reference in New Issue
Block a user