MCPcopy Create free account
hub / github.com/Norbyte/bg3se / ThrowEvent

Method ThrowEvent

BG3Extender/Osiris/Shared/CustomFunctions.cpp:514–528  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

512};
513
514void 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
530void OsiFunctionToSymbolInfo(OsiFunctionDef& func, OsiSymbolInfo & symbol)
531{

Callers

nothing calls this directly

Calls 5

CanThrowEventMethod · 0.80
GetServerMethod · 0.80
CallOriginalMethod · 0.80
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected