| 54 | } |
| 55 | |
| 56 | esv::EoCServerObject * FindGameObjectByHandle(ObjectHandle const & handle, bool logError) |
| 57 | { |
| 58 | if (handle.Handle == 0) { |
| 59 | return nullptr; |
| 60 | } |
| 61 | |
| 62 | auto character = FindCharacterByHandle(handle, false); |
| 63 | if (character != nullptr) { |
| 64 | return character; |
| 65 | } |
| 66 | |
| 67 | auto item = FindItemByHandle(handle, false); |
| 68 | if (item != nullptr) { |
| 69 | return item; |
| 70 | } |
| 71 | |
| 72 | if (logError) { |
| 73 | OsiError("No EoC server object found with this handle (0x" << std::hex << handle.Handle << ")"); |
| 74 | } |
| 75 | |
| 76 | return nullptr; |
| 77 | } |
| 78 | |
| 79 | EntityWorld * GetEntityWorld() |
| 80 | { |
no test coverage detected