| 512 | }; |
| 513 | |
| 514 | void CustomFunctionInjector::ThrowEvent(FunctionHandle handle, OsiArgumentDesc * args) const |
| 515 | { |
| 516 | auto it = divToOsiMappings_.find(handle); |
| 517 | if (it != divToOsiMappings_.end()) { |
| 518 | CustomEventGuard guard; |
| 519 | if (guard.CanThrowEvent()) { |
| 520 | auto osiris = gExtender->GetServer().Osiris().GetDynamicGlobals().OsirisObject; |
| 521 | gExtender->GetServer().Osiris().GetWrappers().Event.CallOriginal(osiris, it->second, args); |
| 522 | } else { |
| 523 | OsiError("Maximum Osiris event depth (" << gCustomEventDepth << ") exceeded"); |
| 524 | } |
| 525 | } else { |
| 526 | OsiError("Event handle not mapped: " << std::hex << (unsigned)handle); |
| 527 | } |
| 528 | } |
| 529 | |
| 530 | void OsiFunctionToSymbolInfo(OsiFunctionDef& func, OsiSymbolInfo & symbol) |
| 531 | { |
nothing calls this directly
no test coverage detected