local checkInterval = 1000
comparePF = true
function CheckData()
local wukong = UEHelpers:GetPlayerController().Pawn
local obj = StaticFindObject("/Script/b1-Managed.Default__BGUFunctionLibraryCS")
if not IsNilOrInvalid(wukong) and not IsNilOrInvalid(obj) then
if wukong:GetFullName():find("Unit_Player_Wukong_C") then
……
if FocusChargeValue > 0 then
local currentFocus = obj:GetAttrValue(wukong, 191)
local MaxFocus = obj:GetAttrValue(wukong, 39)
if currentFocus < MaxFocus and currentFocus >= 0 then
local DifferentFocus = MaxFocus - currentFocus
if DifferentFocus <= FocusChargeValue then
obj:BGUSetAttrValue(wukong, 191, MaxFocus)
comparePF = true
else
if comparePF == true then
-- 從另外一個MOD作者的說明得知,3豆棍勢的值是330,所以以此為參考值
if currentFocus <330 then
obj:BGUSetAttrValue(wukong, 191, 280)
comparePF = false
end
else
local SetFocus = currentFocus + FocusChargeValue
obj:BGUSetAttrValue(wukong, 191, SetFocus)
end
end
end
end
……
end
end
ExecuteWithDelay(checkInterval, function()
CheckData()
end)
end