| 228 | } |
| 229 | |
| 230 | void AddActionInfo(RuleActionList * actions, std::function<MsgActionInfo * ()> addAction) |
| 231 | { |
| 232 | auto head = actions->Actions.Head; |
| 233 | auto current = head->Next; |
| 234 | uint32_t actionIndex = 0; |
| 235 | while (current != head) { |
| 236 | auto actionInfo = addAction(); |
| 237 | if (current->Item->FunctionName != nullptr) { |
| 238 | actionInfo->set_function(current->Item->FunctionName); |
| 239 | if (current->Item->Arguments != nullptr) { |
| 240 | actionInfo->set_arity((uint32_t)current->Item->Arguments->Args().Size); |
| 241 | } else { |
| 242 | actionInfo->set_arity(0); |
| 243 | } |
| 244 | } else { |
| 245 | actionInfo->set_goal_id(current->Item->GoalIdOrDebugHook); |
| 246 | } |
| 247 | current = current->Next; |
| 248 | actionIndex++; |
| 249 | } |
| 250 | } |
| 251 | |
| 252 | void DebugMessageHandler::SendSyncStory(Goal * goal) |
| 253 | { |