mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-13 23:44:52 +01:00
simplify UseKeepLoginBoost
This commit is contained in:
@@ -199,15 +199,11 @@ func handleMsgMhfUseKeepLoginBoost(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
bf := byteframe.NewByteFrame()
|
bf := byteframe.NewByteFrame()
|
||||||
bf.WriteUint8(0)
|
bf.WriteUint8(0)
|
||||||
switch pkt.BoostWeekUsed {
|
switch pkt.BoostWeekUsed {
|
||||||
case 1:
|
case 1, 3:
|
||||||
fallthrough
|
|
||||||
case 3:
|
|
||||||
expiration = TimeAdjusted().Add(120 * time.Minute)
|
expiration = TimeAdjusted().Add(120 * time.Minute)
|
||||||
case 4:
|
case 4:
|
||||||
expiration = TimeAdjusted().Add(180 * time.Minute)
|
expiration = TimeAdjusted().Add(180 * time.Minute)
|
||||||
case 2:
|
case 2, 5:
|
||||||
fallthrough
|
|
||||||
case 5:
|
|
||||||
expiration = TimeAdjusted().Add(240 * time.Minute)
|
expiration = TimeAdjusted().Add(240 * time.Minute)
|
||||||
}
|
}
|
||||||
bf.WriteUint32(uint32(expiration.Unix()))
|
bf.WriteUint32(uint32(expiration.Unix()))
|
||||||
|
|||||||
Reference in New Issue
Block a user