This commit is contained in:
hahwu 2025-09-05 10:04:47 +08:00
parent d4104881c0
commit 6f26efa8a5
2 changed files with 16 additions and 13 deletions

View File

@ -4,7 +4,6 @@ import (
"fmt"
"math"
mergeDataCfg "server/conf/mergeData"
"server/game/mod/decorate"
"server/game/mod/order"
"server/game/mod/quest"
"server/msg"
@ -236,17 +235,19 @@ func UnitPetOrder(p *Player) error {
}
func UnitDecoratePartCost(p *Player) error {
DecorateMod := p.PlayMod.getDecorateMod()
DecorateMod.PartCost = make(map[int]*decorate.PartCostInfo)
DecorateMod.PartClassPool = []int{}
DecorateMod.PartPool = make(map[int]int)
DecorateMod.InitData()
Items, _ := DecorateMod.GetDecorateCostItem(1, 41)
err := p.HandleLoseItem(Items, "")
if err != nil {
fmt.Print(err)
}
return nil
// DecorateMod := p.PlayMod.getDecorateMod()
// DecorateMod.PartCost = make(map[int]*decorate.PartCostInfo)
// DecorateMod.PartClassPool = []int{}
// DecorateMod.PartPool = make(map[int]int)
// DecorateMod.InitData()
// Items, _ := DecorateMod.GetDecorateCostItem(1, 41)
// err := p.HandleLoseItem(Items, "")
// if err != nil {
// fmt.Print(err)
// }
// return nil
ChessMod := p.PlayMod.getChessMod()
return ChessMod.PutPartInBag(1515)
}
func UnitOrderTrigger(p *Player) error {

View File

@ -486,7 +486,9 @@ func (cb *ChessBorad) PutPartInBag(ChessId int) error {
if ok {
Num = v.Num
}
if cb.PartBag.List == nil {
cb.PartBag.List = make(map[int]PartBagGrid)
}
cb.PartBag.List[ChessId] = PartBagGrid{
PartId: ChessId,
Num: Num + 1,