mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-16 17:05:03 +01:00
Merge branch 'main' into tower-experiments
This commit is contained in:
@@ -40,8 +40,8 @@ func (m *MsgSysTerminalLog) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Client
|
|||||||
entryCount := int(bf.ReadUint16())
|
entryCount := int(bf.ReadUint16())
|
||||||
bf.ReadUint16() // Zeroed
|
bf.ReadUint16() // Zeroed
|
||||||
|
|
||||||
var e TerminalLogEntry
|
|
||||||
for i := 0; i < entryCount; i++ {
|
for i := 0; i < entryCount; i++ {
|
||||||
|
var e TerminalLogEntry
|
||||||
e.Index = bf.ReadUint32()
|
e.Index = bf.ReadUint32()
|
||||||
e.Type1 = bf.ReadUint8()
|
e.Type1 = bf.ReadUint8()
|
||||||
e.Type2 = bf.ReadUint8()
|
e.Type2 = bf.ReadUint8()
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import (
|
|||||||
"erupe-ce/common/byteframe"
|
"erupe-ce/common/byteframe"
|
||||||
"erupe-ce/common/mhfcourse"
|
"erupe-ce/common/mhfcourse"
|
||||||
ps "erupe-ce/common/pascalstring"
|
ps "erupe-ce/common/pascalstring"
|
||||||
|
_config "erupe-ce/config"
|
||||||
"erupe-ce/network/mhfpacket"
|
"erupe-ce/network/mhfpacket"
|
||||||
"fmt"
|
"fmt"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
@@ -92,10 +93,11 @@ func handleMsgMhfGetCafeDuration(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
if mhfcourse.CourseExists(30, s.courses) {
|
if mhfcourse.CourseExists(30, s.courses) {
|
||||||
cafeTime = uint32(TimeAdjusted().Unix()) - uint32(s.sessionStart) + cafeTime
|
cafeTime = uint32(TimeAdjusted().Unix()) - uint32(s.sessionStart) + cafeTime
|
||||||
}
|
}
|
||||||
bf.WriteUint32(cafeTime) // Total cafe time
|
bf.WriteUint32(cafeTime)
|
||||||
bf.WriteUint16(0)
|
if _config.ErupeConfig.RealClientMode >= _config.ZZ {
|
||||||
ps.Uint16(bf, fmt.Sprintf(s.server.i18n.cafe.reset, int(cafeReset.Month()), cafeReset.Day()), true)
|
bf.WriteUint16(0)
|
||||||
|
ps.Uint16(bf, fmt.Sprintf(s.server.i18n.cafe.reset, int(cafeReset.Month()), cafeReset.Day()), true)
|
||||||
|
}
|
||||||
doAckBufSucceed(s, pkt.AckHandle, bf.Data())
|
doAckBufSucceed(s, pkt.AckHandle, bf.Data())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user