forked from mirror/openmw-tes3mp
Merged pull request #1845
This commit is contained in:
commit
b75b5d139a
2 changed files with 36 additions and 34 deletions
|
@ -78,6 +78,7 @@
|
||||||
Bug #4545: Creatures flee from werewolves
|
Bug #4545: Creatures flee from werewolves
|
||||||
Bug #4551: Replace 0 sound range with default range separately
|
Bug #4551: Replace 0 sound range with default range separately
|
||||||
Bug #4553: Forcegreeting on non-actor opens a dialogue window which cannot be closed
|
Bug #4553: Forcegreeting on non-actor opens a dialogue window which cannot be closed
|
||||||
|
Bug #4557: Topics with reserved names are handled differently from vanilla
|
||||||
Bug #4558: Mesh optimizer: check for reserved node name is case-sensitive
|
Bug #4558: Mesh optimizer: check for reserved node name is case-sensitive
|
||||||
Feature #2606: Editor: Implemented (optional) case sensitive global search
|
Feature #2606: Editor: Implemented (optional) case sensitive global search
|
||||||
Feature #3083: Play animation when NPC is casting spell via script
|
Feature #3083: Play animation when NPC is casting spell via script
|
||||||
|
|
|
@ -362,49 +362,50 @@ namespace MWGui
|
||||||
if (mGoodbye || MWBase::Environment::get().getDialogueManager()->isInChoice())
|
if (mGoodbye || MWBase::Environment::get().getDialogueManager()->isInChoice())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int separatorPos = 0;
|
const MWWorld::Store<ESM::GameSetting> &gmst = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>();
|
||||||
for (unsigned int i=0; i<mTopicsList->getItemCount(); ++i)
|
|
||||||
{
|
|
||||||
if (mTopicsList->getItemNameAt(i) == "")
|
|
||||||
separatorPos = i;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (id >= separatorPos)
|
const std::string sPersuasion = gmst.find("sPersuasion")->getString();
|
||||||
|
const std::string sCompanionShare = gmst.find("sCompanionShare")->getString();
|
||||||
|
const std::string sBarter = gmst.find("sBarter")->getString();
|
||||||
|
const std::string sSpells = gmst.find("sSpells")->getString();
|
||||||
|
const std::string sTravel = gmst.find("sTravel")->getString();
|
||||||
|
const std::string sSpellMakingMenuTitle = gmst.find("sSpellMakingMenuTitle")->getString();
|
||||||
|
const std::string sEnchanting = gmst.find("sEnchanting")->getString();
|
||||||
|
const std::string sServiceTrainingTitle = gmst.find("sServiceTrainingTitle")->getString();
|
||||||
|
const std::string sRepair = gmst.find("sRepair")->getString();
|
||||||
|
|
||||||
|
if (topic != sPersuasion && topic != sCompanionShare && topic != sBarter
|
||||||
|
&& topic != sSpells && topic != sTravel && topic != sSpellMakingMenuTitle
|
||||||
|
&& topic != sEnchanting && topic != sServiceTrainingTitle && topic != sRepair)
|
||||||
{
|
{
|
||||||
onTopicActivated(topic);
|
onTopicActivated(topic);
|
||||||
if (mGoodbyeButton->getEnabled())
|
if (mGoodbyeButton->getEnabled())
|
||||||
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mGoodbyeButton);
|
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mGoodbyeButton);
|
||||||
}
|
}
|
||||||
else
|
else if (topic == sPersuasion)
|
||||||
{
|
|
||||||
const MWWorld::Store<ESM::GameSetting> &gmst =
|
|
||||||
MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>();
|
|
||||||
|
|
||||||
if (topic == gmst.find("sPersuasion")->getString())
|
|
||||||
mPersuasionDialog.setVisible(true);
|
mPersuasionDialog.setVisible(true);
|
||||||
else if (topic == gmst.find("sCompanionShare")->getString())
|
else if (topic == sCompanionShare)
|
||||||
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Companion, mPtr);
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Companion, mPtr);
|
||||||
else if (!MWBase::Environment::get().getDialogueManager()->checkServiceRefused(mCallback.get()))
|
else if (!MWBase::Environment::get().getDialogueManager()->checkServiceRefused(mCallback.get()))
|
||||||
{
|
{
|
||||||
if (topic == gmst.find("sBarter")->getString())
|
if (topic == sBarter)
|
||||||
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Barter, mPtr);
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Barter, mPtr);
|
||||||
else if (topic == gmst.find("sSpells")->getString())
|
else if (topic == sSpells)
|
||||||
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_SpellBuying, mPtr);
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_SpellBuying, mPtr);
|
||||||
else if (topic == gmst.find("sTravel")->getString())
|
else if (topic == sTravel)
|
||||||
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Travel, mPtr);
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Travel, mPtr);
|
||||||
else if (topic == gmst.find("sSpellMakingMenuTitle")->getString())
|
else if (topic == sSpellMakingMenuTitle)
|
||||||
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_SpellCreation, mPtr);
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_SpellCreation, mPtr);
|
||||||
else if (topic == gmst.find("sEnchanting")->getString())
|
else if (topic == sEnchanting)
|
||||||
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Enchanting, mPtr);
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Enchanting, mPtr);
|
||||||
else if (topic == gmst.find("sServiceTrainingTitle")->getString())
|
else if (topic == sServiceTrainingTitle)
|
||||||
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Training, mPtr);
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Training, mPtr);
|
||||||
else if (topic == gmst.find("sRepair")->getString())
|
else if (topic == sRepair)
|
||||||
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_MerchantRepair, mPtr);
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_MerchantRepair, mPtr);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
updateTopics();
|
updateTopics();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void DialogueWindow::setPtr(const MWWorld::Ptr& actor)
|
void DialogueWindow::setPtr(const MWWorld::Ptr& actor)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue