package gameserver import ( "gac-hkrpg-go/internal/common" pb "gac-hkrpg-go/protocol/proto" ) // Fake avatars belong to CW's trial configuration, not the adventure roster. // Source reference resolves SpecialAvatarID and serializes the special ID with // AVATAR_TRIAL_TYPE. Current native rows supply all levels/equipment identities. func cwTrialBattleAvatar(c *common.CurrencyWarsCatalog, role common.CurrencyWarsRoleVariant, index uint32) (*pb.BattleAvatar, error) { wl := playerWorldLevel if wl == 0 { wl = 6 } row, e := c.TrialAvatar(role.Config.SpecialAvatarID, role.Config.AvatarID, wl) if e != nil { return nil, e } avatar := &common.AvatarJson{AvatarID: row.AvatarID, Level: row.Level, Promotion: row.Promotion, Data: common.AvatarData{Rank: row.Rank}} var equipment *common.Lightcone if row.EquipmentID != 0 { equipment = &common.Lightcone{ItemID: row.EquipmentID, Level: row.EquipmentLevel, Promotion: row.EquipmentPromotion, Rank: row.EquipmentRank} } result, _ := avatar.ToBattleAvatarProto(index, equipment, nil) result.Id = row.AvatarID result.AvatarType = pb.AvatarType_AvatarType_AvatarGridFightType result.WorldLevel = wl result.EnhancedId = row.EnhancedID result.IGDEHGIKFJA = append([]uint32(nil), row.ExRankIDList...) return result, nil }