2025-09-26 18:39:59 +00:00
|
|
|
package player
|
|
|
|
|
|
2025-11-20 15:19:13 +08:00
|
|
|
import (
|
|
|
|
|
"blazing/logic/service/common"
|
2026-02-14 04:27:57 +08:00
|
|
|
"blazing/logic/service/pet"
|
|
|
|
|
"blazing/modules/config/service"
|
2025-11-20 15:19:13 +08:00
|
|
|
)
|
2025-11-08 16:38:41 +08:00
|
|
|
|
2025-11-18 20:52:04 +00:00
|
|
|
func (p *Player) SendPackCmd(cmd uint32, b any) {
|
2025-09-26 18:39:59 +00:00
|
|
|
|
2025-11-19 16:11:02 +08:00
|
|
|
p.SendPack(common.NewTomeeHeader(cmd, p.Info.UserID).Pack(b))
|
2025-09-26 18:39:59 +00:00
|
|
|
}
|
2026-02-14 04:27:57 +08:00
|
|
|
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))
|
|
|
|
|
}
|
2026-03-27 12:56:29 +08:00
|
|
|
p.Service.Talk.Update(5000, 1)
|
2026-02-14 12:49:03 +08:00
|
|
|
p.SendPackCmd(50006, &pet.S2C_50006{
|
|
|
|
|
ItemID: 3,
|
|
|
|
|
Count: getcony,
|
|
|
|
|
})
|
2026-02-14 04:27:57 +08:00
|
|
|
}
|
2026-02-14 12:49:03 +08:00
|
|
|
|
2026-02-14 04:27:57 +08:00
|
|
|
}
|