宝箱雨优化

This commit is contained in:
hahwu 2025-01-21 14:36:32 +08:00
parent 9f6bbc56ad
commit 6657cc6efc
3 changed files with 7 additions and 4 deletions

View File

@ -249,7 +249,7 @@ func ReqRewardOrder(args []interface{}) error {
ChestRainItems = []*item.Item{{Id: ItemId, Num: 1}}
}
if ProductLv > 0 {
Color := order.RandChessColor(ChessMod.GetOrderEmit())
Color := order.RandChessColor(ChessMod.GetEmitList())
ChessId := mergeDataCfg.GetChessIdByLvAndColor(ProductLv, Color)
if ChessId == 0 {
log.Error("GetChessIdByLvAndColor error color:%d, lv:%d", Color, ProductLv)

View File

@ -67,9 +67,8 @@ func UnitOrder(p *Player) error {
func UnitChess(p *Player) error {
ChessMod := p.PlayMod.getChessMod()
Emit := ChessMod.GetEmitList()
ChargeMod := p.PlayMod.getChargeMod()
ChargeMod.InitChessShop(Emit)
Color := order.RandChessColor(ChessMod.GetEmitList())
fmt.Print(Color)
return nil
}

View File

@ -234,6 +234,10 @@ func (cb *ChessBorad) GetEmitList() []int {
result := make([]int, 0, len(cb.EmitList))
EM := make(map[string]int)
for k, v := range cb.EmitList {
if v <= 0 {
delete(cb.EmitList, k)
continue
}
EmitID := mergeDataCfg.GetEmitId(k)
if EmitID == "" {
continue