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:
2025-12-24 19:03:11 +08:00
parent 9baca27033
commit 502d497dce
32 changed files with 533 additions and 615 deletions

View File

@@ -10,8 +10,8 @@ import (
"blazing/modules/blazing/model"
)
// 射击
func (h Controller) Aimat(data *user.AimatInboundInfo, c *player.Player) (result *user.AimatOutboundInfo, err errorcode.ErrorCode) {
// PlayerAim 射击
func (h Controller) PlayerAim(data *user.AimatInboundInfo, c *player.Player) (result *user.AimatOutboundInfo, err errorcode.ErrorCode) {
result = &user.AimatOutboundInfo{
ItemId: data.ItemId,
@@ -23,7 +23,7 @@ func (h Controller) Aimat(data *user.AimatInboundInfo, c *player.Player) (result
return
}
func (h Controller) Chat(data *user.ChatInboundInfo, c *player.Player) (result *user.ChatOutboundInfo, err errorcode.ErrorCode) {
func (h Controller) PlayerChat(data *user.ChatInboundInfo, c *player.Player) (result *user.ChatOutboundInfo, err errorcode.ErrorCode) {
result = &user.ChatOutboundInfo{
@@ -92,7 +92,7 @@ func (h Controller) ChangeNONOColor(data *user.ChangeNONOColorInboundInfo, c *pl
c.GetSpace().Broadcast(c, data.Head.CMD, result)
return
}
func (h Controller) DANCE_ACTION(data *user.C2SDanceAction, c *player.Player) (result *user.S2CDanceAction, err errorcode.ErrorCode) {
func (h Controller) DanceAction(data *user.C2SDanceAction, c *player.Player) (result *user.S2CDanceAction, err errorcode.ErrorCode) {
result = &user.S2CDanceAction{
Type: data.Type,
@@ -101,7 +101,7 @@ func (h Controller) DANCE_ACTION(data *user.C2SDanceAction, c *player.Player) (r
c.GetSpace().Broadcast(c, data.Head.CMD, result)
return
}
func (h Controller) PEOPLE_TRANSFROM(data *user.C2SPEOPLE_TRANSFROM, c *player.Player) (result *user.S2CPEOPLE_TRANSFROM, err errorcode.ErrorCode) {
func (h Controller) PeopleTransform(data *user.C2SPEOPLE_TRANSFROM, c *player.Player) (result *user.S2CPEOPLE_TRANSFROM, err errorcode.ErrorCode) {
result = &user.S2CPEOPLE_TRANSFROM{
SuitID: data.SuitID,
@@ -117,8 +117,8 @@ func (h Controller) ChangePlayerCloth(data *item.ChangePlayerClothInboundInfo, c
ClothList: make([]model.PeopleItemInfo, 0),
}
for _, v := range data.ClothList {
result.ClothList = append(result.ClothList, model.PeopleItemInfo{ID: v, Level: 1})
for _, clothID := range data.ClothList {
result.ClothList = append(result.ClothList, model.PeopleItemInfo{ID: clothID, Level: 1})
}
c.Info.Clothes = result.ClothList