修复小三技能的判断逻辑的缺陷 (#230)

This commit is contained in:
方柳煜 2022-05-16 22:51:54 +08:00 committed by GitHub
parent bb6b2e4b29
commit f8bea241a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -396,8 +396,12 @@ func checkcp(ctx *zero.Ctx) bool {
ctx.SendChain(message.Text("额,你的对象好像不存在?")) ctx.SendChain(message.Text("额,你的对象好像不存在?"))
return false return false
} }
// 检查用户是否登记过
uid := ctx.Event.UserID uid := ctx.Event.UserID
if fiancee == uid {
ctx.SendChain(message.Text("自我攻略?"))
return false
}
// 检查用户是否登记过
userinfo, uidstatus, ok := 民政局.查户口(gid, uid) userinfo, uidstatus, ok := 民政局.查户口(gid, uid)
if ok { if ok {
if userinfo.target == fiancee { // 如果本就是一块 if userinfo.target == fiancee { // 如果本就是一块