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
|
@ -381,6 +381,10 @@ namespace MWDialogue
|
||||||
|
|
||||||
void DialogueManager::goodbyeSelected()
|
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);
|
MWBase::Environment::get().getWindowManager()->removeGuiMode(MWGui::GM_Dialogue);
|
||||||
|
|
||||||
// Apply disposition change to NPC's base disposition
|
// Apply disposition change to NPC's base disposition
|
||||||
|
|
|
@ -19,12 +19,19 @@
|
||||||
|
|
||||||
bool MWDialogue::Filter::testActor (const ESM::DialInfo& info) const
|
bool MWDialogue::Filter::testActor (const ESM::DialInfo& info) const
|
||||||
{
|
{
|
||||||
|
bool isCreature = (mActor.getTypeName() != typeid (ESM::NPC).name());
|
||||||
|
|
||||||
// actor id
|
// actor id
|
||||||
if (!info.mActor.empty())
|
if (!info.mActor.empty())
|
||||||
|
{
|
||||||
if ( Misc::StringUtils::lowerCase (info.mActor)!=MWWorld::Class::get (mActor).getId (mActor))
|
if ( Misc::StringUtils::lowerCase (info.mActor)!=MWWorld::Class::get (mActor).getId (mActor))
|
||||||
return false;
|
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
|
// NPC race
|
||||||
if (!info.mRace.empty())
|
if (!info.mRace.empty())
|
||||||
|
|
|
@ -490,7 +490,7 @@ void DialogueWindow::onReferenceUnavailable()
|
||||||
|
|
||||||
void DialogueWindow::onFrame()
|
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,
|
int disp = std::max(0, std::min(100,
|
||||||
MWBase::Environment::get().getMechanicsManager()->getDerivedDisposition(mPtr)
|
MWBase::Environment::get().getMechanicsManager()->getDerivedDisposition(mPtr)
|
||||||
|
|
Loading…
Reference in a new issue