fix house password checking

This commit is contained in:
wish
2022-09-04 17:45:05 +10:00
parent 9259476316
commit 377bb39be6

View File

@@ -142,7 +142,10 @@ func handleMsgMhfLoadHouse(s *Session, p mhfpacket.MHFPacket) {
bf := byteframe.NewByteFrame() bf := byteframe.NewByteFrame()
if pkt.Destination != 9 && len(pkt.Password) > 0 && pkt.CheckPass { if pkt.Destination != 9 && len(pkt.Password) > 0 && pkt.CheckPass {
var password string var password string
s.server.db.Select(&password, `SELECT house_password FROM user_binary WHERE id=$1`, pkt.CharID) err := s.server.db.Get(&password, `SELECT house_password FROM user_binary WHERE id=$1`, pkt.CharID)
if err != nil {
panic(err)
}
if pkt.Password != password { if pkt.Password != password {
doAckSimpleFail(s, pkt.AckHandle, make([]byte, 4)) doAckSimpleFail(s, pkt.AckHandle, make([]byte, 4))
return return