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

Function GetStatusHelper

OsiInterface/Functions/StatusFunctions.cpp:54–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52 }
53
54 esv::Status * GetStatusHelper(OsiArgumentDesc const & args)
55 {
56 auto gameObjectGuid = args[0].String;
57 ObjectHandle statusHandle{ args[1].Int64 };
58
59 esv::Status * status{ nullptr };
60 auto character = FindCharacterByNameGuid(gameObjectGuid);
61 if (character != nullptr) {
62 status = character->GetStatusByHandle(statusHandle, true);
63 } else {
64 auto item = FindItemByNameGuid(gameObjectGuid);
65 if (item != nullptr) {
66 status = item->GetStatusByHandle(statusHandle, true);
67 } else {
68 OsiError("Character or item " << gameObjectGuid << " does not exist!");
69 return nullptr;
70 }
71 }
72
73 if (status == nullptr) {
74 OsiError("No status found with handle " << (int64_t)statusHandle);
75 return nullptr;
76 }
77
78 return status;
79 }
80
81 bool StatusGetHandle(OsiArgumentDesc & args)
82 {

Callers 3

StatusGetAttributeFunction · 0.85
StatusSetAttributeFunction · 0.85
HitStatusGetFunction · 0.85

Calls 3

FindCharacterByNameGuidFunction · 0.85
FindItemByNameGuidFunction · 0.85
GetStatusByHandleMethod · 0.80

Tested by

no test coverage detected