2026-10-21 20:40:13 +07:00
|
|
|
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
|
2026-10-28 18:54:43 +07:00
|
|
|
IsBonfire, HasSpotLight bool
|
2026-10-21 20:40:13 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 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
|
2026-10-28 18:54:43 +07:00
|
|
|
// Updated reference GridFightNodeTemplateInfo names tag 11
|
|
|
|
|
// is_bonfire_node; the current Client's IsBonfireNode capture agrees.
|
|
|
|
|
dst.FCNNBODJNIK = n.IsBonfire
|
2026-10-21 20:40:13 +07:00
|
|
|
dst.HPNNLMBHOPF = n.HasSpotLight
|
|
|
|
|
return nil
|
|
|
|
|
}
|