Update GaCy-GO
This commit is contained in:
1 parent
da8a32f60d
commit
0cbe460e49
345 files changed
+98202
-77559
No files matched your search
@@ -0,0 +1,28 @@
|
||||
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) {
|
||||
row, e := c.TrialAvatar(role.Config.SpecialAvatarID, role.Config.AvatarID, playerWorldLevel)
|
||||
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.SpecialAvatarID
|
||||
result.AvatarType = pb.AvatarType_AvatarType_AvatarTrialType
|
||||
result.WorldLevel = playerWorldLevel
|
||||
result.EnhancedId = row.EnhancedID
|
||||
result.IGDEHGIKFJA = append([]uint32(nil), row.ExRankIDList...)
|
||||
return result, nil
|
||||
}
|
||||
Reference in new issue
Block a user