PGRData/Script/matrix/xhome/xdorm/xhomechar/xhomecharnode/XHomeCharCheckClick.lua

19 lines
555 B
Lua
Raw Permalink Normal View History

local XHomeCharCheckClick = XLuaBehaviorManager.RegisterNode(XLuaBehaviorNode, "HomeCharCheckClick", CsBehaviorNodeType.Condition, true, false)
function XHomeCharCheckClick:OnGetEvents()
return { XEventId.EVENT_DORM_CHARACTER_CLICK_SUCCESS }
end
function XHomeCharCheckClick:OnEnter()
self.Id = self.AgentProxy:GetId()
end
function XHomeCharCheckClick:OnNotify(evt, ...)
local args = { ... }
if evt == XEventId.EVENT_DORM_CHARACTER_CLICK_SUCCESS and args[1] == self.Id then
self.Node.Status = CsNodeStatus.SUCCESS
end
end