| 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 | { |
no test coverage detected