openmw-tes3coop/apps/openmw/mwbase/dialoguemanager.hpp
scrawl 5104a5a023 Add missing setFactionReaction instruction, use absolute storage instead of difference
Seems to be closer to how MW is storing it (it has the complete FACT record in the savegame, actually).

This (somewhat) breaks OMW savegame compatibility in that old changes are discarded, but I don't think the faction reactions are quest relevant anywhere.
2015-01-20 00:53:31 +01:00

87 lines
2.5 KiB
C++

#ifndef GAME_MWBASE_DIALOGUEMANAGER_H
#define GAME_MWBASE_DIALOGUEMANAGER_H
#include <string>
#include <stdint.h>
namespace Loading
{
class Listener;
}
namespace ESM
{
class ESMReader;
class ESMWriter;
}
namespace MWWorld
{
class Ptr;
}
namespace MWBase
{
/// \brief Interface for dialogue manager (implemented in MWDialogue)
class DialogueManager
{
DialogueManager (const DialogueManager&);
///< not implemented
DialogueManager& operator= (const DialogueManager&);
///< not implemented
public:
DialogueManager() {}
virtual void clear() = 0;
virtual ~DialogueManager() {}
virtual bool isInChoice() const = 0;
virtual void startDialogue (const MWWorld::Ptr& actor) = 0;
virtual void addTopic (const std::string& topic) = 0;
virtual void askQuestion (const std::string& question,int choice) = 0;
virtual void goodbye() = 0;
virtual void say(const MWWorld::Ptr &actor, const std::string &topic) const = 0;
//calbacks for the GUI
virtual void keywordSelected (const std::string& keyword) = 0;
virtual void goodbyeSelected() = 0;
virtual void questionAnswered (int answer) = 0;
virtual bool checkServiceRefused () = 0;
virtual void persuade (int type) = 0;
virtual int getTemporaryDispositionChange () const = 0;
/// @note This change is temporary and gets discarded when dialogue ends.
virtual void applyDispositionChange (int delta) = 0;
virtual int countSavedGameRecords() const = 0;
virtual void write (ESM::ESMWriter& writer, Loading::Listener& progress) const = 0;
virtual void readRecord (ESM::ESMReader& reader, int32_t type) = 0;
/// Changes faction1's opinion of faction2 by \a diff.
virtual void modFactionReaction (const std::string& faction1, const std::string& faction2, int diff) = 0;
virtual void setFactionReaction (const std::string& faction1, const std::string& faction2, int absolute) = 0;
/// @return faction1's opinion of faction2
virtual int getFactionReaction (const std::string& faction1, const std::string& faction2) const = 0;
/// Removes the last added topic response for the given actor from the journal
virtual void clearInfoActor (const MWWorld::Ptr& actor) const = 0;
};
}
#endif