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

Method SyncWithPrototypeManager

BG3Extender/GameDefinitions/Stats/Stats.cpp:324–348  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

322}
323
324void RPGStats::SyncWithPrototypeManager(Object* object)
325{
326 auto modifier = ModifierLists.GetByHandle(object->ModifierListIndex);
327 if (modifier->Name == GFS.strSpellData) {
328 auto spellProtoMgr = GetStaticSymbols().eoc__SpellPrototypeManager;
329 if (spellProtoMgr && *spellProtoMgr) {
330 (*spellProtoMgr)->SyncStat(object);
331 }
332 } else if (modifier->Name == GFS.strStatusData) {
333 auto statusProtoMgr = GetStaticSymbols().eoc__StatusPrototypeManager;
334 if (statusProtoMgr && *statusProtoMgr) {
335 (*statusProtoMgr)->SyncStat(object);
336 }
337 } else if (modifier->Name == GFS.strPassiveData) {
338 auto passiveMgr = GetStaticSymbols().eoc__PassivePrototypeManager;
339 if (passiveMgr && *passiveMgr) {
340 (*passiveMgr)->SyncStat(object);
341 }
342 } else if (modifier->Name == GFS.strInterruptData) {
343 auto interruptMgr = GetStaticSymbols().eoc__InterruptPrototypeManager;
344 if (interruptMgr && *interruptMgr) {
345 (*interruptMgr)->SyncStat(object);
346 }
347 }
348}
349
350std::optional<int> RPGStats::EnumLabelToIndex(FixedString const& enumName, char const* enumLabel)
351{

Callers

nothing calls this directly

Calls 2

GetByHandleMethod · 0.80
SyncStatMethod · 0.80

Tested by

no test coverage detected