|
|
|
@ -362,7 +362,9 @@ namespace MWGui
|
|
|
|
|
|
|
|
|
|
void DialogueWindow::onSelectListItem(const std::string& topic, int id)
|
|
|
|
|
{
|
|
|
|
|
if (mGoodbye || MWBase::Environment::get().getDialogueManager()->isInChoice())
|
|
|
|
|
MWBase::DialogueManager* dialogueManager = MWBase::Environment::get().getDialogueManager();
|
|
|
|
|
|
|
|
|
|
if (mGoodbye || dialogueManager->isInChoice())
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
const MWWorld::Store<ESM::GameSetting> &gmst = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>();
|
|
|
|
@ -389,21 +391,21 @@ namespace MWGui
|
|
|
|
|
mPersuasionDialog.setVisible(true);
|
|
|
|
|
else if (topic == sCompanionShare)
|
|
|
|
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Companion, mPtr);
|
|
|
|
|
else if (!MWBase::Environment::get().getDialogueManager()->checkServiceRefused(mCallback.get()))
|
|
|
|
|
else if (!dialogueManager->checkServiceRefused(mCallback.get()))
|
|
|
|
|
{
|
|
|
|
|
if (topic == sBarter)
|
|
|
|
|
if (topic == sBarter && !dialogueManager->checkServiceRefused(mCallback.get(), MWBase::DialogueManager::Barter))
|
|
|
|
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Barter, mPtr);
|
|
|
|
|
else if (topic == sSpells)
|
|
|
|
|
else if (topic == sSpells && !dialogueManager->checkServiceRefused(mCallback.get(), MWBase::DialogueManager::Spells))
|
|
|
|
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_SpellBuying, mPtr);
|
|
|
|
|
else if (topic == sTravel)
|
|
|
|
|
else if (topic == sTravel && !dialogueManager->checkServiceRefused(mCallback.get(), MWBase::DialogueManager::Travel))
|
|
|
|
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Travel, mPtr);
|
|
|
|
|
else if (topic == sSpellMakingMenuTitle)
|
|
|
|
|
else if (topic == sSpellMakingMenuTitle && !dialogueManager->checkServiceRefused(mCallback.get(), MWBase::DialogueManager::Spellmaking))
|
|
|
|
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_SpellCreation, mPtr);
|
|
|
|
|
else if (topic == sEnchanting)
|
|
|
|
|
else if (topic == sEnchanting && !dialogueManager->checkServiceRefused(mCallback.get(), MWBase::DialogueManager::Enchanting))
|
|
|
|
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Enchanting, mPtr);
|
|
|
|
|
else if (topic == sServiceTrainingTitle)
|
|
|
|
|
else if (topic == sServiceTrainingTitle && !dialogueManager->checkServiceRefused(mCallback.get(), MWBase::DialogueManager::Training))
|
|
|
|
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Training, mPtr);
|
|
|
|
|
else if (topic == sRepair)
|
|
|
|
|
else if (topic == sRepair && !dialogueManager->checkServiceRefused(mCallback.get(), MWBase::DialogueManager::Repair))
|
|
|
|
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_MerchantRepair, mPtr);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|