Npc* Npc::createNpc(const std::string& name) { Npc* npc = new Npc(name); if (!npc->load()) { delete npc; return nullptr; } return npc; }