forked from mirror/openmw-tes3mp
Merge remote-tracking branch 'potatoesmaster/dialogue'
This commit is contained in:
commit
7b568cbb15
3 changed files with 14 additions and 3 deletions
apps/openmw
|
@ -381,6 +381,10 @@ namespace MWDialogue
|
|||
|
||||
void DialogueManager::goodbyeSelected()
|
||||
{
|
||||
// Do not close the dialogue window if the player has to answer a question
|
||||
if (mIsInChoice)
|
||||
return;
|
||||
|
||||
MWBase::Environment::get().getWindowManager()->removeGuiMode(MWGui::GM_Dialogue);
|
||||
|
||||
// Apply disposition change to NPC's base disposition
|
||||
|
|
|
@ -19,12 +19,19 @@
|
|||
|
||||
bool MWDialogue::Filter::testActor (const ESM::DialInfo& info) const
|
||||
{
|
||||
bool isCreature = (mActor.getTypeName() != typeid (ESM::NPC).name());
|
||||
|
||||
// actor id
|
||||
if (!info.mActor.empty())
|
||||
{
|
||||
if ( Misc::StringUtils::lowerCase (info.mActor)!=MWWorld::Class::get (mActor).getId (mActor))
|
||||
return false;
|
||||
|
||||
bool isCreature = (mActor.getTypeName() != typeid (ESM::NPC).name());
|
||||
}
|
||||
else if (isCreature)
|
||||
{
|
||||
// Creatures must not have topics aside of those specific to their id
|
||||
return false;
|
||||
}
|
||||
|
||||
// NPC race
|
||||
if (!info.mRace.empty())
|
||||
|
|
|
@ -490,7 +490,7 @@ void DialogueWindow::onReferenceUnavailable()
|
|||
|
||||
void DialogueWindow::onFrame()
|
||||
{
|
||||
if(mEnabled && mPtr.getTypeName() == typeid(ESM::NPC).name())
|
||||
if(mMainWidget->getVisible() && mEnabled && mPtr.getTypeName() == typeid(ESM::NPC).name())
|
||||
{
|
||||
int disp = std::max(0, std::min(100,
|
||||
MWBase::Environment::get().getMechanicsManager()->getDerivedDisposition(mPtr)
|
||||
|
|
Loading…
Reference in a new issue