refactor(assets): 重构资产同步流程并添加宠物相关功能
- 移除了资产同步到私有 B 仓库的工作流 - 在玩家结构中添加了 IsFighting 字段 - 新增了宠物信息相关功能和数据结构 - 优化了地图进入和怪物刷新逻辑 - 调整了玩家登录和地图数据发送流程 - 重构了部分代码以提高可维护性和性能
This commit is contained in:
@@ -1 +1,41 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"blazing/common/data/entity"
|
||||
"blazing/common/socket/errorcode"
|
||||
"blazing/logic/service/pet"
|
||||
"blazing/modules/blazing/model"
|
||||
"time"
|
||||
)
|
||||
|
||||
func (h *Controller) GetPetInfo(data *pet.InInfo, c *entity.Player) (result *pet.OutInfo, err errorcode.ErrorCode) { //这个时候player应该是空的
|
||||
|
||||
t := model.PetInfo{
|
||||
ID: 300,
|
||||
Name: [16]byte{'1'},
|
||||
Dv: 1,
|
||||
Attack: 1000,
|
||||
Defence: 1000,
|
||||
SpecialAttack: 1000,
|
||||
CatchTime: uint32(time.Now().Unix()),
|
||||
Speed: 1000,
|
||||
Hp: 1000,
|
||||
MaxHp: 1000,
|
||||
Level: 1,
|
||||
LvExp: 1000,
|
||||
NextLvExp: 1000,
|
||||
Exp: 1000,
|
||||
//SkillList: [4]model.SkillInfo{{ID: 1, Pp: 1}},
|
||||
Nature: 1,
|
||||
Shiny: 1,
|
||||
}
|
||||
t.SkillListLen = 1
|
||||
for i := 0; i < 4; i++ {
|
||||
t.SkillList[i] = model.SkillInfo{ID: 10001, Pp: 10001}
|
||||
}
|
||||
t.EffectInfo = make([]model.PetEffectInfo, 0)
|
||||
t.EffectInfo = append(t.EffectInfo, model.PetEffectInfo{EffectID: 1, ItemID: 1, LeftCount: 1})
|
||||
return &pet.OutInfo{
|
||||
PetInfo: t,
|
||||
}, 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user