Skip to content

Commit

Permalink
exclude 0 values on EnumerateQuest
Browse files Browse the repository at this point in the history
  • Loading branch information
sekaiwish committed Feb 19, 2024
1 parent 7549fe6 commit 864586a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions server/channelserver/handlers_quest.go
Original file line number Diff line number Diff line change
Expand Up @@ -569,8 +569,13 @@ func handleMsgMhfEnumerateQuest(s *Session, p mhfpacket.MHFPacket) {
tuneValues = append(tuneValues, getTuneValueRange(3299, 200)...)
tuneValues = append(tuneValues, getTuneValueRange(3325, 300)...)

offset := uint16(time.Now().Unix())
bf.WriteUint16(offset)
var temp []tuneValue
for i := range tuneValues {
if tuneValues[i].Value > 0 {
temp = append(temp, tuneValues[i])
}
}
tuneValues = temp

tuneLimit := 770
if _config.ErupeConfig.RealClientMode <= _config.F5 {
Expand All @@ -596,6 +601,9 @@ func handleMsgMhfEnumerateQuest(s *Session, p mhfpacket.MHFPacket) {
tuneValues = tuneValues[:tuneLimit]
}

offset := uint16(time.Now().Unix())
bf.WriteUint16(offset)

bf.WriteUint16(uint16(len(tuneValues)))
for i := range tuneValues {
bf.WriteUint16(tuneValues[i].ID ^ offset)
Expand Down

0 comments on commit 864586a

Please sign in to comment.