玩家数据bug优化

This commit is contained in:
hahwu 2024-12-26 11:49:01 +08:00
parent 84de8d99f1
commit b0630b1164
2 changed files with 5 additions and 1 deletions

View File

@ -184,7 +184,7 @@ func LimitedTimeEnergyAdd(p *Player) {
curtime := time.Now().Unix()
PlayerBaseMod := p.GetPlayerBaseMod()
BaseMod := p.PlayMod.getBaseMod()
delta := curtime - BaseMod.GetLoginTime()
delta := curtime - BaseMod.GetRecoverTime()
Recover := userCfg.GetRecover(BaseMod.GetLevel())
Addsta := int(delta) / Recover
if Addsta <= 0 {

View File

@ -117,6 +117,10 @@ func (b *Base) GetLoginTime() int64 {
return b.LoginTime
}
func (b *Base) GetRecoverTime() int64 {
return b.RecoverTime
}
func (b *Base) SetAccount(Account string) {
b.Account = Account
}