mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-14 16:04:38 +01:00
fix invalid length tuneValues
This commit is contained in:
@@ -633,24 +633,28 @@ func handleMsgMhfEnumerateQuest(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
offset := uint16(time.Now().Unix())
|
offset := uint16(time.Now().Unix())
|
||||||
bf.WriteUint16(offset)
|
bf.WriteUint16(offset)
|
||||||
|
|
||||||
|
tuneLimit := 770
|
||||||
if _config.ErupeConfig.RealClientMode <= _config.F5 {
|
if _config.ErupeConfig.RealClientMode <= _config.F5 {
|
||||||
tuneValues = tuneValues[:256]
|
tuneLimit = 256
|
||||||
} else if _config.ErupeConfig.RealClientMode <= _config.G3 {
|
} else if _config.ErupeConfig.RealClientMode <= _config.G3 {
|
||||||
tuneValues = tuneValues[:283]
|
tuneLimit = 283
|
||||||
} else if _config.ErupeConfig.RealClientMode <= _config.GG {
|
} else if _config.ErupeConfig.RealClientMode <= _config.GG {
|
||||||
tuneValues = tuneValues[:315]
|
tuneLimit = 315
|
||||||
} else if _config.ErupeConfig.RealClientMode <= _config.G61 {
|
} else if _config.ErupeConfig.RealClientMode <= _config.G61 {
|
||||||
tuneValues = tuneValues[:332]
|
tuneLimit = 332
|
||||||
} else if _config.ErupeConfig.RealClientMode <= _config.G7 {
|
} else if _config.ErupeConfig.RealClientMode <= _config.G7 {
|
||||||
tuneValues = tuneValues[:339]
|
tuneLimit = 339
|
||||||
} else if _config.ErupeConfig.RealClientMode <= _config.G81 {
|
} else if _config.ErupeConfig.RealClientMode <= _config.G81 {
|
||||||
tuneValues = tuneValues[:396]
|
tuneLimit = 396
|
||||||
} else if _config.ErupeConfig.RealClientMode <= _config.G91 {
|
} else if _config.ErupeConfig.RealClientMode <= _config.G91 {
|
||||||
tuneValues = tuneValues[:694]
|
tuneLimit = 694
|
||||||
} else if _config.ErupeConfig.RealClientMode <= _config.G101 {
|
} else if _config.ErupeConfig.RealClientMode <= _config.G101 {
|
||||||
tuneValues = tuneValues[:704]
|
tuneLimit = 704
|
||||||
} else if _config.ErupeConfig.RealClientMode <= _config.Z2 {
|
} else if _config.ErupeConfig.RealClientMode <= _config.Z2 {
|
||||||
tuneValues = tuneValues[:750]
|
tuneLimit = 750
|
||||||
|
}
|
||||||
|
if len(tuneValues) > tuneLimit {
|
||||||
|
tuneValues = tuneValues[:tuneLimit]
|
||||||
}
|
}
|
||||||
|
|
||||||
bf.WriteUint16(uint16(len(tuneValues)))
|
bf.WriteUint16(uint16(len(tuneValues)))
|
||||||
|
|||||||
Reference in New Issue
Block a user