| 79 | } |
| 80 | |
| 81 | bool StatusGetHandle(OsiArgumentDesc & args) |
| 82 | { |
| 83 | auto gameObjectGuid = args[0].String; |
| 84 | auto statusId = args[1].String; |
| 85 | |
| 86 | auto statusMachine = GetStatusMachine(gameObjectGuid); |
| 87 | if (statusMachine == nullptr) return false; |
| 88 | |
| 89 | auto statusIdFS = ToFixedString(args[1].String); |
| 90 | if (!statusIdFS) { |
| 91 | // No fixed string with this ID --> invalid status name |
| 92 | OsiWarn("Status " << args[1].String << " not in string table, possibly invalid status name?"); |
| 93 | return false; |
| 94 | } |
| 95 | |
| 96 | auto & statuses = statusMachine->Statuses.Set; |
| 97 | for (uint32_t index = 0; index < statuses.Size; index++) { |
| 98 | auto status = statuses.Buf[index]; |
| 99 | if (status->StatusId == statusIdFS) { |
| 100 | args[2].Int64 = (int64_t)status->StatusHandle; |
| 101 | return true; |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | return false; |
| 106 | } |
| 107 | |
| 108 | template <OsiPropertyMapType Type> |
| 109 | bool StatusGetAttribute(OsiArgumentDesc & args) |
nothing calls this directly
no test coverage detected