/// Call this function within any DialogueUpdate method. This is required for saying next steps in a dialogue void DialogueHelper::DialogueUpdate(uint32 uiDiff) { if (m_uiTimer) { if (m_uiTimer <= uiDiff) DoNextDialogueStep(); else m_uiTimer -= uiDiff; } }
void DialogueUpdate(uint32 diff) { if (_actionTimer) { if (_actionTimer <= diff) DoNextDialogueStep(); else _actionTimer -= diff; } }
/// Call this function within any DialogueUpdate method. This is required for saying next steps in a dialogue void DialogueHelper::DialogueUpdate(uint32 diff) { if (m_timer) { if (m_timer <= diff) DoNextDialogueStep(); else m_timer -= diff; } }
void StartNextDialogueText(int32 textEntry) { // Find textEntry bool found = false; for (DialogueEntry const* entry = _dialogueArray; entry->TextEntry; ++entry) { if (entry->TextEntry == textEntry) { _currentEntry = entry; found = true; break; } } if (!found) return; DoNextDialogueStep(); }
/** Function to start a (part of a) dialogue @param iTextEntry The TextEntry of the dialogue that will be started (must be always the entry of first side) */ void DialogueHelper::StartNextDialogueText(int32 iTextEntry) { // Find iTextEntry bool bFound = false; if (m_pDialogueArray) // One Side { for (DialogueEntry const* pEntry = m_pDialogueArray; pEntry->iTextEntry; ++pEntry) { if (pEntry->iTextEntry == iTextEntry) { m_pCurrentEntry = pEntry; bFound = true; break; } } } else // Two Sides { for (DialogueEntryTwoSide const* pEntry = m_pDialogueTwoSideArray; pEntry->iTextEntry; ++pEntry) { if (pEntry->iTextEntry == iTextEntry) { m_pCurrentEntryTwoSide = pEntry; bFound = true; break; } } } if (!bFound) { error_log("SD2: Script call DialogueHelper::StartNextDialogueText, but textEntry %i is not in provided dialogue (on map id %u)", iTextEntry, m_pInstance ? m_pInstance->instance->GetId() : 0); return; } DoNextDialogueStep(); }
/** Function to start a (part of a) dialogue @param iTextEntry The TextEntry of the dialogue that will be started (must be always the entry of first side) */ void DialogueHelper::StartNextDialogueText(int32 textEntry) { // Find iTextEntry bool found = false; if (m_dialogueArray) // One Side { for (DialogueEntry const* entry = m_dialogueArray; entry->textEntry; ++entry) { if (entry->textEntry == textEntry) { m_currentEntry = entry; found = true; break; } } } else // Two Sides { for (DialogueEntryTwoSide const* entry = m_dialogueTwoSideArray; entry->textEntry; ++entry) { if (entry->textEntry == textEntry) { m_currentEntryTwoSide = entry; found = true; break; } } } if (!found) { script_error_log("Script call DialogueHelper::StartNextDialogueText, but textEntry %i is not in provided dialogue (on map id %u)", textEntry, m_instance ? m_instance->instance->GetId() : 0); return; } DoNextDialogueStep(); }