MCPcopy Create free account
hub / github.com/Norbyte/ositools / IterateStatuses

Function IterateStatuses

OsiInterface/Functions/StatusFunctions.cpp:32–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 3

GetStatusMachineFunction · 0.85
ThrowEventMethod · 0.80
AddMethod · 0.45

Tested by

no test coverage detected