``feat(item): 新增物品出售价格属性(SellPrice)并实现物品出售功能,优化宠物面板计算和时区判断逻辑``

This commit is contained in:
1
2025-12-12 19:10:09 +00:00
parent 3242207f95
commit cedb02faf7
35 changed files with 172 additions and 152 deletions

View File

@@ -0,0 +1,17 @@
package controller
import (
"blazing/common/socket/errorcode"
"blazing/logic/service/egg"
"blazing/logic/service/player"
"blazing/modules/blazing/model"
)
func (h Controller) EGG(data *egg.C2S_EGG_GAME_PLAY, c *player.Player) (result *egg.S2C_EGG_GAME_PLAY, err errorcode.ErrorCode) {
r := model.GenPetInfo(1, -1, -1, -1, 0, 1)
c.Service.Pet.PetAdd(r)
result = &egg.S2C_EGG_GAME_PLAY{HadTime: r.CatchTime, ListInfo: []model.ItemInfo{}, PetID: r.ID}
return
}