36 lines
1.3 KiB
Go
36 lines
1.3 KiB
Go
package gameserver
|
|||
|
|
|
||
|
|
import (
|
||
|
|
"fmt"
|
||
|
|
"gac-hkrpg-go/internal/common"
|
||
|
|
goproto "gac-hkrpg-go/protocol/proto"
|
||
|
|
)
|
||
|
|
|
||
|
|
// The mapped subset of a CW route node's display parameters. Remaining fields
|
||
|
|
// belong to their own selection/event rules and are preserved on the protobuf.
|
||
|
|
// StageID is the native CW field; it is not a NodeTemplateID or automatically
|
||
|
|
// a SceneBattleInfo stage ID.
|
||
|
|
type currencyWarsNodeScalars struct {
|
||
|
|
StageID, RawType, BasicReward, AugmentKind uint32
|
||
|
|
HasExpert, HasSpotLight bool
|
||
|
|
}
|
||
|
|
|
||
|
|
// Native GridFightStageNode._RefreshCachedFields at RVA 0xdc09fa0, corroborated
|
||
|
|
// by explicit runtime getter handles and isolated protobuf scalar encoding:
|
||
|
|
// OHM offsets 0x30/0x3c/0x50 -> StageID/RawNodeType/BasicReward;
|
||
|
|
// 0x40 is compared with 1 for IsAugmentNode; 0x4c/0x4d are base flags.
|
||
|
|
func (n currencyWarsNodeScalars) applyProto(dst *goproto.OHMDHKGAEMM, catalog *common.CurrencyWarsCatalog) error {
|
||
|
|
if dst == nil || catalog == nil {
|
||
|
|
return fmt.Errorf("CW node destination/catalog is missing")
|
||
|
|
}
|
||
|
|
if _, err := catalog.NodeTypeName(n.RawType); err != nil {
|
||
|
|
return err
|
||
|
|
}
|
||
|
|
dst.StageId = n.StageID
|
||
|
|
dst.CJCCMAACJDB = n.RawType
|
||
|
|
dst.PICMDONCKCO = n.BasicReward
|
||
|
|
dst.PFEMDGNFHNH = n.AugmentKind
|
||
|
|
dst.FCNNBODJNIK = n.HasExpert
|
||
|
|
dst.HPNNLMBHOPF = n.HasSpotLight
|
||
|
|
return nil
|
||
|
|
}
|