forked from mirror/openmw-tes3mp
Merge remote-tracking branch 'zini/master' into animation2
This commit is contained in:
commit
613529f1d6
5 changed files with 22 additions and 10 deletions
|
@ -122,15 +122,9 @@ namespace MWDialogue
|
|||
|
||||
MWMechanics::CreatureStats& creatureStats = MWWorld::Class::get (actor).getCreatureStats (actor);
|
||||
mTalkedTo = creatureStats.hasTalkedToPlayer();
|
||||
creatureStats.talkedToPlayer();
|
||||
|
||||
mActorKnownTopics.clear();
|
||||
|
||||
//initialise the GUI
|
||||
MWBase::Environment::get().getWindowManager()->pushGuiMode(MWGui::GM_Dialogue);
|
||||
MWGui::DialogueWindow* win = MWBase::Environment::get().getWindowManager()->getDialogueWindow();
|
||||
win->startDialogue(actor, MWWorld::Class::get (actor).getName (actor));
|
||||
|
||||
//setup the list of topics known by the actor. Topics who are also on the knownTopics list will be added to the GUI
|
||||
updateTopics();
|
||||
|
||||
|
@ -146,6 +140,13 @@ namespace MWDialogue
|
|||
{
|
||||
if (const ESM::DialInfo *info = filter.search (*it))
|
||||
{
|
||||
//initialise the GUI
|
||||
MWBase::Environment::get().getWindowManager()->pushGuiMode(MWGui::GM_Dialogue);
|
||||
MWGui::DialogueWindow* win = MWBase::Environment::get().getWindowManager()->getDialogueWindow();
|
||||
win->startDialogue(actor, MWWorld::Class::get (actor).getName (actor));
|
||||
|
||||
creatureStats.talkedToPlayer();
|
||||
|
||||
if (!info->mSound.empty())
|
||||
{
|
||||
// TODO play sound
|
||||
|
@ -381,6 +382,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)
|
||||
|
|
|
@ -119,4 +119,4 @@ Thanks to Dongle,
|
|||
for his Daedric fontface, see Daedric Font License.txt for his license terms.
|
||||
|
||||
Thanks to DejaVu team,
|
||||
for their DejaVuLGCSansMono fontface, see Dejavu_lgc_font_license.txt for their license terms.
|
||||
for their DejaVuLGCSansMono fontface, see DejaVu Font License.txt for their license terms.
|
||||
|
|
Loading…
Reference in a new issue