2025-11-25 02:35:36 +08:00
|
|
|
|
package controller
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
|
"blazing/common/socket/errorcode"
|
2026-02-09 01:29:33 +08:00
|
|
|
|
"blazing/cool"
|
2026-03-04 02:24:25 +08:00
|
|
|
|
"blazing/logic/service/common"
|
2026-01-30 22:18:44 +08:00
|
|
|
|
"blazing/logic/service/fight"
|
2025-11-25 02:35:36 +08:00
|
|
|
|
"blazing/logic/service/player"
|
|
|
|
|
|
)
|
|
|
|
|
|
|
2025-12-24 19:03:11 +08:00
|
|
|
|
// CatchPet 传送仓抓稀有宠物
|
|
|
|
|
|
// data: 空输入结构
|
|
|
|
|
|
// c: 当前玩家对象
|
|
|
|
|
|
// 返回: 捕捉结果(消耗的EV值)和错误码
|
2026-03-04 02:24:25 +08:00
|
|
|
|
func (h Controller) HanLiuQiang(data *C2S_2608, c *player.Player) (result *fight.NullOutboundInfo, err errorcode.ErrorCode) {
|
2026-01-30 22:18:44 +08:00
|
|
|
|
|
|
|
|
|
|
if c.ItemAdd(100245, 1) {
|
|
|
|
|
|
return
|
2025-11-25 02:35:36 +08:00
|
|
|
|
}
|
2026-02-09 01:29:33 +08:00
|
|
|
|
|
2026-03-09 22:36:30 +08:00
|
|
|
|
if cool.Config.ServerInfo.IsVip == 0 {
|
|
|
|
|
|
return
|
2026-02-09 01:29:33 +08:00
|
|
|
|
}
|
2026-03-09 22:36:30 +08:00
|
|
|
|
c.ItemAdd(500655, 1)
|
|
|
|
|
|
|
2026-03-11 12:19:13 +08:00
|
|
|
|
// pet := model.GenPetInfo(426, 31, -1, -1, 100, nil, 0)
|
2026-03-09 22:36:30 +08:00
|
|
|
|
|
2026-03-11 12:19:13 +08:00
|
|
|
|
// c.Service.Pet.PetAdd(pet, 0)
|
|
|
|
|
|
// pet = model.GenPetInfo(1567, 31, -1, -1, 100, nil, 0)
|
2026-03-09 22:36:30 +08:00
|
|
|
|
|
2026-03-11 12:19:13 +08:00
|
|
|
|
// c.Service.Pet.PetAdd(pet)
|
|
|
|
|
|
// pet = model.GenPetInfo(1905, 31, -1, -1, 100, nil, 0)
|
2026-03-09 22:36:30 +08:00
|
|
|
|
|
2026-03-11 12:19:13 +08:00
|
|
|
|
// c.Service.Pet.PetAdd(pet)
|
2026-01-30 22:18:44 +08:00
|
|
|
|
return result, -1
|
2025-11-25 02:35:36 +08:00
|
|
|
|
}
|
2026-03-04 02:24:25 +08:00
|
|
|
|
|
2026-04-05 23:13:06 +08:00
|
|
|
|
// C2S_2608 定义请求或响应数据结构。
|
2026-03-04 02:24:25 +08:00
|
|
|
|
type C2S_2608 struct {
|
|
|
|
|
|
Head common.TomeeHeader `cmd:"2608" struc:"skip"`
|
|
|
|
|
|
}
|