mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-02-09 21:22:26 +08:00
23 lines
646 B
Go
23 lines
646 B
Go
package model
|
|
|
|
import (
|
|
"hk4e/protocol/proto"
|
|
"time"
|
|
)
|
|
|
|
type StaminaInfo struct {
|
|
State proto.MotionState // 动作状态
|
|
CostStamina int32 // 消耗或恢复的耐力
|
|
RestoreDelay uint8 // 恢复延迟
|
|
LastCasterId uint32 // 最后释放技能者的Id
|
|
LastSkillId uint32 // 最后释放的技能Id
|
|
LastSkillTime int64 // 最后释放技能的时间
|
|
}
|
|
|
|
// SetLastSkill 记录技能以便后续使用
|
|
func (s *StaminaInfo) SetLastSkill(casterId uint32, skillId uint32) {
|
|
s.LastCasterId = casterId
|
|
s.LastSkillId = skillId
|
|
s.LastSkillTime = time.Now().UnixMilli()
|
|
}
|