修复商店棋子错误的bug

This commit is contained in:
hahwu 2026-03-04 14:52:38 +08:00
parent dff655484e
commit 3afcbdf2eb
2 changed files with 3 additions and 1 deletions

View File

@ -313,7 +313,6 @@ func (c *ChargeMod) InitChessShop(Emit []int) {
if len(ChessList) == 1 {
ChessList = append(ChessList, ChessList[0]-1)
}
//ColorType := mergeDataCfg.GetColorType(p)
for _, c := range ChessList {
if c == 0 {
continue

View File

@ -669,6 +669,9 @@ func GetChessByDiff(EmitId, EnergyMul, Diff int, Color string) []int {
MaxLev := mergeDataCfg.GetMaxLvByColor(Color)
NewLev1 = min(NewLev1, MaxLev)
ChessId := mergeDataCfg.GetChessIdByLvAndColor(NewLev1, Color)
if ChessId == 0 {
continue
}
ChessIds = append(ChessIds, ChessId)
}
return GoUtil.UniqueInts(ChessIds)