MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / registerFactory

Method registerFactory

source/spells/SpellManager.cpp:45–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45void SpellManager::registerFactory(const SpellFactory* factory)
46{
47 std::vector<const SpellFactory*>& factories = getFactories();
48 uint32_t index = static_cast<uint32_t>(factory->getSpellType());
49 if(index >= factories.size())
50 {
51 OD_LOG_ERR("type=" + Helper::toString(index) + ", factories.size=" + Helper::toString(factories.size()));
52 return;
53 }
54
55 factories[index] = factory;
56}
57
58void SpellManager::unregisterFactory(const SpellFactory* factory)
59{

Callers

nothing calls this directly

Calls 2

toStringFunction · 0.50
getSpellTypeMethod · 0.45

Tested by

no test coverage detected