fix(handlers): honor DisableLoginBoost and DisableBoostTime fully (#187)

GetBoostTimeLimit and GetBoostRight now respect DisableBoostTime, and
UseKeepLoginBoost now respects DisableLoginBoost. Also fix a latent
zero-time.Time wraparound in GetBoostTimeLimit that caused the
"Boost Time" overlay to appear on fresh characters regardless of
config, since time.Time{}.Unix() cast to uint32 yields a large value
the client interprets as an active timestamp.
This commit is contained in:
Houmgaor
2026-04-06 16:16:05 +02:00
parent 9e41d59bd1
commit 84e72f7d35
3 changed files with 12 additions and 1 deletions

View File

@@ -195,6 +195,10 @@ func handleMsgMhfGetKeepLoginBoostStatus(s *Session, p mhfpacket.MHFPacket) {
func handleMsgMhfUseKeepLoginBoost(s *Session, p mhfpacket.MHFPacket) {
pkt := p.(*mhfpacket.MsgMhfUseKeepLoginBoost)
if s.server.erupeConfig.GameplayOptions.DisableLoginBoost {
doAckBufSucceed(s, pkt.AckHandle, make([]byte, 5))
return
}
var expiration time.Time
bf := byteframe.NewByteFrame()
bf.WriteUint8(0)