【特权】修复获取特权次数会小于0的问题,解决急速探索会出现剩余次数为负数的问题

dev_chengFeng
gaoxin 2020-11-03 14:20:10 +08:00 committed by JieLing
parent 5d6db87650
commit 23717d6fc9
1 changed files with 4 additions and 0 deletions

View File

@ -167,6 +167,10 @@ function PrivilegeManager.GetPrivilegeRemainValue(privilegeType)
local usedTimes = this.GetPrivilegeUsedTimes(privilegeType)
-- LogBlue(string.format("originalValue:%s, usedTimes:%s",tostring(originalValue),tostring(usedTimes)))
local remainNum = originalValue - usedTimes
-- 剩余次数不会小于0修正
if remainNum < 0 then
remainNum = 0
end
return remainNum
end