feat(pet): 宠物系统重构和功能增强 - 修复战斗boss中effect ID索引错误问题 - 实现宠物仓库和背包管理功能 - 添加宠物列表排序保存功能 - 重构宠物备份列表同步逻辑 - 优化宠物释放和获取逻辑 - 添加宠物背包仓库切换功能 - 修复地图模型广播信息结构问题 - 调整宠物特效数据库查询逻辑 ```
This commit is contained in:
@@ -205,8 +205,8 @@ type PlayerInfo struct {
|
||||
Badge uint32 `struc:"uint32" default:"0" json:"badge"` // 默认0
|
||||
Reserved1 [27]byte `struc:"[27]byte" default:"3" json:"reserved1"` // 27字节默认3
|
||||
TaskList [1000]byte `struc:"[1000]byte" default:"0" json:"task_list"` // 任务状态数组500字节,默认3
|
||||
PetListCount uint32 `struc:"sizeof=PetList" json:"pet_list_count"` // 精灵列表长度
|
||||
PetList []PetInfo ` json:"pet_list"` // 精灵背包内信息
|
||||
PetListCount uint32 `struc:"skip" json:"pet_list_count"` // 旧登录协议精灵列表长度(已跳过)
|
||||
PetList []PetInfo `struc:"skip" json:"pet_list"` // 精灵背包内信息(不再走旧登录包体)
|
||||
BackupPetList []PetInfo `struc:"skip" json:"backup_pet_list"` // 精灵并列备用列表
|
||||
ClothesCount uint32 `struc:"sizeof=Clothes" json:"clothes_count"` // 穿戴装备数量
|
||||
Clothes []PeopleItemInfo ` json:"clothes"` // 穿戴装备
|
||||
|
||||
@@ -65,12 +65,8 @@ func (s *InfoService) GetLogin() *model.PlayerInfo {
|
||||
return nil
|
||||
}
|
||||
tt.Data.AllPetNumber = uint32(NewPetService(s.userid).PetCount(0))
|
||||
if len(tt.Data.BackupPetList) == 0 {
|
||||
storagePets := NewPetService(s.userid).PetInfo(1)
|
||||
tt.Data.BackupPetList = make([]model.PetInfo, len(storagePets))
|
||||
for i := range storagePets {
|
||||
tt.Data.BackupPetList[i] = storagePets[i].Data
|
||||
}
|
||||
if tt.Data.BackupPetList == nil {
|
||||
tt.Data.BackupPetList = make([]model.PetInfo, 0)
|
||||
}
|
||||
|
||||
if tt.Data.MapID > 300 || tt.Data.MapID == 0 { //如果位于基地,就重置到传送仓
|
||||
|
||||
Reference in New Issue
Block a user