耐力模块技能耐力消耗初步

This commit is contained in:
UnKownOwO
2022-12-02 23:01:41 +08:00
parent 1019d1d6bd
commit b55f52932d
8 changed files with 162 additions and 53 deletions

View File

@@ -76,7 +76,11 @@ func (p *Player) InitAvatar(avatar *Avatar) {
}
func (p *Player) AddAvatar(avatarId uint32) {
avatarDataConfig := gdc.CONF.AvatarDataMap[int32(avatarId)]
avatarDataConfig, ok := gdc.CONF.AvatarDataMap[int32(avatarId)]
if !ok {
logger.LOG.Error("avatarDataConfig error, avatarId: %v", avatarId)
return
}
skillDepotId := int32(0)
// 主角要单独设置
if avatarId == 10000005 {

View File

@@ -1,11 +1,13 @@
package model
import "hk4e/protocol/proto"
import (
"hk4e/protocol/proto"
)
type StaminaInfo struct {
State proto.MotionState // 动作状态
Cost int32 // 消耗或恢复的耐力
RestoreDelay uint8 // 恢复延迟
LastCasterId uint32 // 最后技能释放者
LastSkillId uint32 // 最后释放技能
State proto.MotionState // 动作状态
CostStamina int32 // 消耗或恢复的耐力
RestoreDelay uint8 // 恢复延迟
LastSkillId uint32 // 最后释放的技能Id
LastSkillTime int64 // 最后释放技能的时间
}