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 }