| 30 | namespace func |
| 31 | { |
| 32 | void IterateStatuses(OsiArgumentDesc const & args) |
| 33 | { |
| 34 | auto gameObjectGuid = args[0].String; |
| 35 | auto eventName = args[1].String; |
| 36 | |
| 37 | auto statusMachine = GetStatusMachine(gameObjectGuid); |
| 38 | if (statusMachine == nullptr) return; |
| 39 | |
| 40 | auto & statuses = statusMachine->Statuses.Set; |
| 41 | for (uint32_t index = 0; index < statuses.Size; index++) { |
| 42 | auto status = statuses.Buf[index]; |
| 43 | auto eventArgs = OsiArgumentDesc::Create(OsiArgumentValue{ ValueType::String, eventName }); |
| 44 | eventArgs->Add(OsiArgumentValue{ ValueType::GuidString, gameObjectGuid }); |
| 45 | eventArgs->Add(OsiArgumentValue{ ValueType::String, status->StatusId.Str }); |
| 46 | eventArgs->Add(OsiArgumentValue{ (int64_t)status->StatusHandle }); |
| 47 | |
| 48 | gOsirisProxy->GetCustomFunctionInjector().ThrowEvent(StatusIteratorEventHandle, eventArgs); |
| 49 | |
| 50 | delete eventArgs; |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | esv::Status * GetStatusHelper(OsiArgumentDesc const & args) |
| 55 | { |
nothing calls this directly
no test coverage detected