```
refactor(controller): 重构控制器函数命名和代码注释 - 重命名 EGG 函数为 EggGamePlay,更新宠物生成逻辑 - 重命名 Leiyi 函数为 GetLeiyiTrainStatus - 重命名 Cacthpet 函数为 CatchPet,添加详细函数注释 - 为 ArenaSetOwner、ArenaFightOwner、ArenaGetInfo、ArenaUpfight、ArenaOwnerAcce 等擂台相关函数添加注释前缀 - 重命名 PETKing 函数为 PetKing - 重命名 FRESH_CHOICE_FIGHT_LEVEL 函数为 FreshChoiceFightLevel,添加详细参数说明 - 重命名 BuyMItem 函数为 BuyMultipleItems - 重命名 ITEM_S
This commit is contained in:
@@ -7,10 +7,10 @@ import (
|
||||
"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, nil)
|
||||
c.Service.Pet.PetAdd(r)
|
||||
result = &egg.S2C_EGG_GAME_PLAY{HadTime: r.CatchTime, ListInfo: []model.ItemInfo{}, PetID: r.ID}
|
||||
func (h Controller) EggGamePlay(data *egg.C2S_EGG_GAME_PLAY, c *player.Player) (result *egg.S2C_EGG_GAME_PLAY, err errorcode.ErrorCode) {
|
||||
newPet := model.GenPetInfo(1, -1, -1, -1, 1, nil)
|
||||
c.Service.Pet.PetAdd(newPet)
|
||||
result = &egg.S2C_EGG_GAME_PLAY{HadTime: newPet.CatchTime, ListInfo: []model.ItemInfo{}, PetID: newPet.ID}
|
||||
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user