Files
bl/logic/controller/active_寒流枪.go
昔念 10af34fdad
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
```
refactor(controller): 移除独立的服务模块并将结构体定义内联到控制器中

移除了 egg、leiyi、pet 和 systemtime 独立服务包中的结构体定义,
将所有 C2S 和 S2C 结构体直接定义在相应的控制器文件中,同时更新了
导入路径和服务调用方式,统一使用 common.TomeeHeader 并优化了代码组织结构。

BREAKING CHANGE: 结构体定义从独立的服务包移动到控制器文件内部
2026-03-04 02:24:25 +08:00

34 lines
785 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package controller
import (
"blazing/common/socket/errorcode"
"blazing/cool"
"blazing/logic/service/common"
"blazing/logic/service/fight"
"blazing/logic/service/player"
"blazing/modules/player/model"
)
// CatchPet 传送仓抓稀有宠物
// data: 空输入结构
// c: 当前玩家对象
// 返回: 捕捉结果消耗的EV值和错误码
func (h Controller) HanLiuQiang(data *C2S_2608, c *player.Player) (result *fight.NullOutboundInfo, err errorcode.ErrorCode) {
if c.ItemAdd(100245, 1) {
return
}
if cool.Config.ServerInfo.IsVip != 0 {
c.ItemAdd(500655, 1)
pet := model.GenPetInfo(315, 31, -1, -1, 100, nil, 0)
pet.FixShiny()
c.Service.Pet.PetAdd(pet)
}
return result, -1
}
type C2S_2608 struct {
Head common.TomeeHeader `cmd:"2608" struc:"skip"`
}