优化
This commit is contained in:
parent
d4104881c0
commit
6f26efa8a5
@ -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 {
|
||||
|
||||
@ -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,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user