You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.9 KiB
Go

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package model
import "time"
// TownPausePersisted mirrors HeroMovement fields needed to resume resting, an in-town NPC tour,
// or a mid-adventure excursion after reconnect or during offline catch-up.
// Stored in heroes.town_pause (JSONB).
type TownPausePersisted struct {
RestUntil *time.Time `json:"restUntil,omitempty"`
RestKind RestKind `json:"restKind,omitempty"`
TownRestHealRemainder float64 `json:"townRestHealRemainder,omitempty"`
RestHealRemainder float64 `json:"restHealRemainder,omitempty"`
NPCQueue []int64 `json:"npcQueue,omitempty"`
NextTownNPCRollAt *time.Time `json:"nextTownNPCRollAt,omitempty"`
TownLeaveAt *time.Time `json:"townLeaveAt,omitempty"`
TownVisitNPCName string `json:"townVisitNPCName,omitempty"`
TownVisitNPCType string `json:"townVisitNPCType,omitempty"`
TownVisitStartedAt *time.Time `json:"townVisitStartedAt,omitempty"`
TownVisitLogsEmitted int `json:"townVisitLogsEmitted,omitempty"`
// Walk-to-NPC: hero moves toward stand point (npcWalkTargetId + to); position is hero x/y + speed×dt.
NPCWalkTargetID int64 `json:"npcWalkTargetId,omitempty"`
NPCWalkToX float64 `json:"npcWalkToX,omitempty"`
NPCWalkToY float64 `json:"npcWalkToY,omitempty"`
// Plaza: walk to town center after NPC tour, then wait/rest before leaving.
TownPlazaHealActive bool `json:"townPlazaHealActive,omitempty"`
CenterWalkActive bool `json:"centerWalkActive,omitempty"`
CenterWalkToX float64 `json:"centerWalkToX,omitempty"`
CenterWalkToY float64 `json:"centerWalkToY,omitempty"`
// CenterWalkStart: legacy rows only (time-based walk). New saves use centerWalkActive + to.
CenterWalkStart *time.Time `json:"centerWalkStart,omitempty"`
// Excursion (mini-adventure) session persisted for reconnect / offline resume.
Excursion *ExcursionPersisted `json:"excursion,omitempty"`
}