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

Method SyncStat

BG3Extender/GameDefinitions/Stats/Stats.cpp:13–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11BEGIN_NS(stats)
12
13bool SpellPrototypeManager::SyncStat(Object* object, SpellPrototype* proto)
14{
15 auto sync = GetStaticSymbols().eoc__SpellPrototype__Init;
16 if (!sync) {
17 OsiError("eoc::SpellPrototype::Init not mapped!");
18 return false;
19 }
20
21 proto->SpellTypeId = EnumInfo<SpellType>::Find(object->GetFixedString(GFS.strSpellType).value_or(GFS.strEmpty)).value_or((SpellType)0);
22 proto->UseCosts.clear();
23 proto->RitualCosts.clear();
24 proto->DualWieldingUseCosts.clear();
25 proto->HitCostGroups.clear();
26 proto->VariableUseCosts.clear();
27 proto->VariableDualWieldingUseCosts.clear();
28 proto->VariableRitualCosts.clear();
29 proto->SpellAnimation = SpellPrototypeAnimationData{};
30 proto->DualWieldingSpellAnimation = SpellPrototypeAnimationData{};
31 proto->AlternativeCastTextEvents.clear();
32 proto->ContainerSpells.clear();
33 proto->Trajectories.clear();
34
35 proto->SpellFlags = (SpellFlags)0;
36 proto->LineOfSightFlags = 0;
37 proto->CinematicArenaFlags = 0;
38 proto->WeaponTypes = 0;
39 proto->AiFlags = 0;
40 proto->RequirementEvents = 0;
41
42 sync(proto, object->Name);
43 return true;
44}
45
46
47void SpellPrototypeManager::SyncStat(Object* object)

Callers 1

Calls 11

GetFixedStringMethod · 0.80
get_or_insertMethod · 0.80
add_keyMethod · 0.80
clearMethod · 0.45
GetStatsMethod · 0.45
try_getMethod · 0.45
setMethod · 0.45
push_backMethod · 0.45
findMethod · 0.45
endMethod · 0.45
ValueMethod · 0.45

Tested by

no test coverage detected