MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / GetPhraseText

Method GetPhraseText

ogsr_engine/xrGame/PhraseDialog.cpp:139–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137}
138
139LPCSTR CPhraseDialog::GetPhraseText(const shared_str& phrase_id, bool current_speaking)
140{
141 CPhrase* ph = GetPhrase(phrase_id);
142
143 CGameObject* pSpeakerGO1 = (current_speaking) ? smart_cast<CGameObject*>(FirstSpeaker()) : 0;
144 CGameObject* pSpeakerGO2 = (current_speaking) ? smart_cast<CGameObject*>(SecondSpeaker()) : 0;
145
146 return ph->m_PhraseScript.GetScriptText(ph->GetText(), pSpeakerGO1, pSpeakerGO2, m_DialogId.c_str(), phrase_id.c_str());
147}
148
149LPCSTR CPhraseDialog::DialogCaption() { return data()->m_sCaption.size() ? *data()->m_sCaption : GetPhraseText("0"); }
150

Callers 3

AnswerPhraseMethod · 0.80
InitOthersStartDialogMethod · 0.80
SayPhraseMethod · 0.80

Calls 3

GetScriptTextMethod · 0.80
GetTextMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected