All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
feat(service): 宠物添加功能增加销售计数参数并优化价格更新逻辑 - 修改PetAdd方法签名,增加salecount参数用于追踪宠物销售次数 - 在多个控制器中统一调用PetAdd方法时传入0作为初始销售次数 - 临时禁用寒流枪活动中的宠物发放功能 - 优化UPdatePrice方法,添加错误处理和价格范围验证逻辑 - 调整宠物购买逻辑,使用免费金币系统并计算递增购买
41 lines
931 B
Go
41 lines
931 B
Go
package controller
|
||
|
||
import (
|
||
"blazing/common/socket/errorcode"
|
||
"blazing/cool"
|
||
"blazing/logic/service/common"
|
||
"blazing/logic/service/fight"
|
||
"blazing/logic/service/player"
|
||
)
|
||
|
||
// 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 {
|
||
return
|
||
}
|
||
c.ItemAdd(500655, 1)
|
||
|
||
// pet := model.GenPetInfo(426, 31, -1, -1, 100, nil, 0)
|
||
|
||
// c.Service.Pet.PetAdd(pet, 0)
|
||
// pet = model.GenPetInfo(1567, 31, -1, -1, 100, nil, 0)
|
||
|
||
// c.Service.Pet.PetAdd(pet)
|
||
// pet = model.GenPetInfo(1905, 31, -1, -1, 100, nil, 0)
|
||
|
||
// c.Service.Pet.PetAdd(pet)
|
||
return result, -1
|
||
}
|
||
|
||
type C2S_2608 struct {
|
||
Head common.TomeeHeader `cmd:"2608" struc:"skip"`
|
||
}
|