mirror of
https://github.com/Qsgs-Fans/FreeKill.git
synced 2024-11-16 03:32:34 +08:00
bug fix? (#199)
测试服的第一个bug fix - 修复了Fk.currentResponsePattern的无懈可击寿命过长的的bug
This commit is contained in:
parent
e0abde669a
commit
a7fa1d9ec0
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 ()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user