Cleaning leftover of personal if-else

This commit is contained in:
Ewerton B. S
2023-08-20 08:38:23 +09:00
committed by GitHub
parent f5b40b55b9
commit f643960b62

View File

@@ -51,16 +51,6 @@ func handleMsgSysGetFile(s *Session, p mhfpacket.MHFPacket) {
pkt.Filename = seasonConversion(s, pkt.Filename)
}
if _config.ErupeConfig.RealClientMode <= _config.F5 {
data, err := os.ReadFile(filepath.Join(s.server.erupeConfig.BinPath, fmt.Sprintf("old_quests/%s.bin", pkt.Filename)))
if err != nil {
s.logger.Error(fmt.Sprintf("Failed to open file: %s/old_quests/%s.bin", s.server.erupeConfig.BinPath, pkt.Filename))
// This will crash the game.
doAckBufSucceed(s, pkt.AckHandle, data)
return
}
doAckBufSucceed(s, pkt.AckHandle, data)
} else {
data, err := os.ReadFile(filepath.Join(s.server.erupeConfig.BinPath, fmt.Sprintf("quests/%s.bin", pkt.Filename)))
if err != nil {
s.logger.Error(fmt.Sprintf("Failed to open file: %s/quests/%s.bin", s.server.erupeConfig.BinPath, pkt.Filename))
@@ -71,7 +61,6 @@ func handleMsgSysGetFile(s *Session, p mhfpacket.MHFPacket) {
doAckBufSucceed(s, pkt.AckHandle, data)
}
}
}
func questSuffix(s *Session) string {
// Determine the letter to append for day / night