TTnpcScript *CPetConversations::getNPCScript(const CString &name) const { if (name.empty() || !_petControl) return nullptr; CGameManager *gameManager = _petControl->getGameManager(); if (!gameManager) return nullptr; CTrueTalkManager *trueTalk = gameManager->getTalkManager(); if (!trueTalk) return nullptr; return trueTalk->getTalker(name); }
void CTrueTalkNPC::startTalker(CViewItem *view) { CGameManager *gameManager = getGameManager(); if (gameManager) gameManager->getTalkManager()->start4(this, view); }