mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-16 08:55:31 +01:00
RealClientMode replaced for ClientID
This commit is contained in:
@@ -62,16 +62,16 @@ func BackportQuest(data []byte) []byte {
|
||||
}
|
||||
|
||||
fillLength := uint32(108)
|
||||
if _config.ErupeConfig.RealClientMode <= _config.S6 {
|
||||
if _config.ErupeConfig.ClientID <= _config.S6 {
|
||||
fillLength = 44
|
||||
} else if _config.ErupeConfig.RealClientMode <= _config.F5 {
|
||||
} else if _config.ErupeConfig.ClientID <= _config.F5 {
|
||||
fillLength = 52
|
||||
} else if _config.ErupeConfig.RealClientMode <= _config.G101 {
|
||||
} else if _config.ErupeConfig.ClientID <= _config.G101 {
|
||||
fillLength = 76
|
||||
}
|
||||
|
||||
copy(data[wp:wp+fillLength], data[rp:rp+fillLength])
|
||||
if _config.ErupeConfig.RealClientMode <= _config.G91 {
|
||||
if _config.ErupeConfig.ClientID <= _config.G91 {
|
||||
patterns := [][]byte{
|
||||
{0x0A, 0x00, 0x01, 0x33, 0xD7, 0x00}, // 10% Armor Sphere -> Stone
|
||||
{0x06, 0x00, 0x02, 0x33, 0xD8, 0x00}, // 6% Armor Sphere+ -> Iron Ore
|
||||
@@ -132,7 +132,7 @@ func handleMsgSysGetFile(s *Session, p mhfpacket.MHFPacket) {
|
||||
doAckBufSucceed(s, pkt.AckHandle, data)
|
||||
return
|
||||
}
|
||||
if _config.ErupeConfig.RealClientMode <= _config.Z1 && s.server.erupeConfig.DebugOptions.AutoQuestBackport {
|
||||
if _config.ErupeConfig.ClientID <= _config.Z1 && s.server.erupeConfig.DebugOptions.AutoQuestBackport {
|
||||
data = BackportQuest(decryption.UnpackSimple(data))
|
||||
}
|
||||
doAckBufSucceed(s, pkt.AckHandle, data)
|
||||
@@ -196,7 +196,7 @@ func loadQuestFile(s *Session, questId int) []byte {
|
||||
}
|
||||
|
||||
decrypted := decryption.UnpackSimple(file)
|
||||
if _config.ErupeConfig.RealClientMode <= _config.Z1 && s.server.erupeConfig.DebugOptions.AutoQuestBackport {
|
||||
if _config.ErupeConfig.ClientID <= _config.Z1 && s.server.erupeConfig.DebugOptions.AutoQuestBackport {
|
||||
decrypted = BackportQuest(decrypted)
|
||||
}
|
||||
fileBytes := byteframe.NewByteFrameFromBytes(decrypted)
|
||||
@@ -204,13 +204,13 @@ func loadQuestFile(s *Session, questId int) []byte {
|
||||
fileBytes.Seek(int64(fileBytes.ReadUint32()), 0)
|
||||
|
||||
bodyLength := 320
|
||||
if _config.ErupeConfig.RealClientMode <= _config.S6 {
|
||||
if _config.ErupeConfig.ClientID <= _config.S6 {
|
||||
bodyLength = 160
|
||||
} else if _config.ErupeConfig.RealClientMode <= _config.F5 {
|
||||
} else if _config.ErupeConfig.ClientID <= _config.F5 {
|
||||
bodyLength = 168
|
||||
} else if _config.ErupeConfig.RealClientMode <= _config.G101 {
|
||||
} else if _config.ErupeConfig.ClientID <= _config.G101 {
|
||||
bodyLength = 192
|
||||
} else if _config.ErupeConfig.RealClientMode <= _config.Z1 {
|
||||
} else if _config.ErupeConfig.ClientID <= _config.Z1 {
|
||||
bodyLength = 224
|
||||
}
|
||||
|
||||
@@ -282,7 +282,7 @@ func makeEventQuest(s *Session, rows *sql.Rows) ([]byte, error) {
|
||||
bf.WriteBool(true)
|
||||
}
|
||||
bf.WriteUint16(0) // Unk
|
||||
if _config.ErupeConfig.RealClientMode >= _config.G2 {
|
||||
if _config.ErupeConfig.ClientID >= _config.G2 {
|
||||
bf.WriteUint32(mark)
|
||||
}
|
||||
bf.WriteUint16(0) // Unk
|
||||
@@ -580,23 +580,23 @@ func handleMsgMhfEnumerateQuest(s *Session, p mhfpacket.MHFPacket) {
|
||||
tuneValues = temp
|
||||
|
||||
tuneLimit := 770
|
||||
if _config.ErupeConfig.RealClientMode <= _config.G1 {
|
||||
if _config.ErupeConfig.ClientID <= _config.G1 {
|
||||
tuneLimit = 256
|
||||
} else if _config.ErupeConfig.RealClientMode <= _config.G3 {
|
||||
} else if _config.ErupeConfig.ClientID <= _config.G3 {
|
||||
tuneLimit = 283
|
||||
} else if _config.ErupeConfig.RealClientMode <= _config.GG {
|
||||
} else if _config.ErupeConfig.ClientID <= _config.GG {
|
||||
tuneLimit = 315
|
||||
} else if _config.ErupeConfig.RealClientMode <= _config.G61 {
|
||||
} else if _config.ErupeConfig.ClientID <= _config.G61 {
|
||||
tuneLimit = 332
|
||||
} else if _config.ErupeConfig.RealClientMode <= _config.G7 {
|
||||
} else if _config.ErupeConfig.ClientID <= _config.G7 {
|
||||
tuneLimit = 339
|
||||
} else if _config.ErupeConfig.RealClientMode <= _config.G81 {
|
||||
} else if _config.ErupeConfig.ClientID <= _config.G81 {
|
||||
tuneLimit = 396
|
||||
} else if _config.ErupeConfig.RealClientMode <= _config.G91 {
|
||||
} else if _config.ErupeConfig.ClientID <= _config.G91 {
|
||||
tuneLimit = 694
|
||||
} else if _config.ErupeConfig.RealClientMode <= _config.G101 {
|
||||
} else if _config.ErupeConfig.ClientID <= _config.G101 {
|
||||
tuneLimit = 704
|
||||
} else if _config.ErupeConfig.RealClientMode <= _config.Z2 {
|
||||
} else if _config.ErupeConfig.ClientID <= _config.Z2 {
|
||||
tuneLimit = 750
|
||||
}
|
||||
if len(tuneValues) > tuneLimit {
|
||||
|
||||
Reference in New Issue
Block a user