PGRData/Script/matrix/xrestaurant/xnode/XRestaurantIsWorkWithBuffNode.lua

14 lines
510 B
Lua
Raw Normal View History

2024-09-01 22:49:41 +02:00
---@class XRestaurantIsWorkWithBuffNode : XLuaBehaviorNode
---@field AgentProxy XRestaurantCharAgent
local XRestaurantIsWorkWithBuffNode = XLuaBehaviorManager.RegisterNode(XLuaBehaviorNode,
"RestaurantIsWorkWithBuff", CsBehaviorNodeType.Condition, true, false)
function XRestaurantIsWorkWithBuffNode:OnEnter()
local isEqual = self.AgentProxy:DoIsWorkWithBuff()
if isEqual then
self.Node.Status = CsNodeStatus.SUCCESS
else
self.Node.Status = CsNodeStatus.FAILED
end
end