package player import ( "blazing/logic/service/common" "blazing/logic/service/pet" "blazing/modules/config/service" ) func (p *Player) SendPackCmd(cmd uint32, b any) { p.SendPack(common.NewTomeeHeader(cmd, p.Info.UserID).Pack(b)) } func (p *Player) MessWin(win bool) { var getcony uint32 _, ok := p.Service.Talk.Cheak(p.Info.MapID, 5000) if ok { //更新次数 config := service.NewTalkConfigService().GetCache(5000) //service.NewItemService().GetItemCount(config.ItemID) for _, itemID := range config.ItemIDS { iteminfo := service.NewItemService().GetItem(itemID) if win { getcony = uint32(iteminfo.ItemMaxCount) } else { getcony = uint32(iteminfo.ItemMinCount) } p.ItemAdd(iteminfo.ItemID, int64(getcony)) } p.Service.Talk.Update(5000) p.SendPackCmd(50006, &pet.S2C_50006{ ItemID: 3, Count: getcony, }) } }