测试服的第一个bug fix

- 修复了Fk.currentResponsePattern的无懈可击寿命过长的的bug
This commit is contained in:
YoumuKon 2023-06-17 10:45:53 +08:00 committed by GitHub
parent e0abde669a
commit a7fa1d9ec0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -88,8 +88,8 @@ Flickable {
id: warning id: warning
anchors.rightMargin: 8 anchors.rightMargin: 8
visible: { visible: {
const avail = JSON.parse(Backend.callLuaFunction("GetAvailableGeneralsNum", []));
config.disabledPack; // visible config.disabledPack; // visible
const avail = JSON.parse(Backend.callLuaFunction("GetAvailableGeneralsNum", []));
const ret = avail < config.preferredGeneralNum * config.preferedPlayerNum; const ret = avail < config.preferredGeneralNum * config.preferedPlayerNum;
return ret; return ret;
} }

View File

@ -1586,11 +1586,11 @@ function Room:askForUseCard(player, card_name, pattern, prompt, cancelable, extr
Fk.currentResponsePattern = pattern Fk.currentResponsePattern = pattern
local result = self:doRequest(player, command, json.encode(data)) local result = self:doRequest(player, command, json.encode(data))
Fk.currentResponsePattern = nil
if result ~= "" then if result ~= "" then
return self:handleUseCardReply(player, result) return self:handleUseCardReply(player, result)
end end
Fk.currentResponsePattern = nil
end end
return nil return nil
end end
@ -1631,6 +1631,7 @@ function Room:askForResponse(player, card_name, pattern, prompt, cancelable, ext
Fk.currentResponsePattern = pattern Fk.currentResponsePattern = pattern
local result = self:doRequest(player, command, json.encode(data)) local result = self:doRequest(player, command, json.encode(data))
Fk.currentResponsePattern = nil
if result ~= "" then if result ~= "" then
local use = self:handleUseCardReply(player, result) local use = self:handleUseCardReply(player, result)
@ -1638,7 +1639,6 @@ function Room:askForResponse(player, card_name, pattern, prompt, cancelable, ext
return use.card return use.card
end end
end end
Fk.currentResponsePattern = nil
end end
return nil return nil
end end
@ -2291,6 +2291,7 @@ function Room:handleCardEffect(event, cardEffectEvent)
self:useCard(use) self:useCard(use)
end end
end end
Fk.currentResponsePattern = nil
elseif event == fk.CardEffecting then elseif event == fk.CardEffecting then
if cardEffectEvent.card.skill then if cardEffectEvent.card.skill then
execGameEvent(GameEvent.SkillEffect, function () execGameEvent(GameEvent.SkillEffect, function ()