OpenMW
|
00001 #ifndef GAME_MWDIALOGUE_FILTER_H 00002 #define GAME_MWDIALOGUE_FILTER_H 00003 00004 #include <vector> 00005 00006 #include "../mwworld/ptr.hpp" 00007 00008 namespace ESM 00009 { 00010 struct DialInfo; 00011 struct Dialogue; 00012 } 00013 00014 namespace MWDialogue 00015 { 00016 class SelectWrapper; 00017 00018 class Filter 00019 { 00020 MWWorld::Ptr mActor; 00021 int mChoice; 00022 bool mTalkedToPlayer; 00023 00024 bool testActor (const ESM::DialInfo& info) const; 00026 00027 bool testPlayer (const ESM::DialInfo& info) const; 00029 00030 bool testSelectStructs (const ESM::DialInfo& info) const; 00032 00033 bool testDisposition (const ESM::DialInfo& info, bool invert=false) const; 00035 00036 bool testSelectStruct (const SelectWrapper& select) const; 00037 00038 bool testSelectStructNumeric (const SelectWrapper& select) const; 00039 00040 int getSelectStructInteger (const SelectWrapper& select) const; 00041 00042 bool getSelectStructBoolean (const SelectWrapper& select) const; 00043 00044 int getFactionRank (const MWWorld::Ptr& actor, const std::string& factionId) const; 00045 00046 bool hasFactionRankSkillRequirements (const MWWorld::Ptr& actor, const std::string& factionId, 00047 int rank) const; 00048 00049 bool hasFactionRankReputationRequirements (const MWWorld::Ptr& actor, const std::string& factionId, 00050 int rank) const; 00051 00052 public: 00053 00054 Filter (const MWWorld::Ptr& actor, int choice, bool talkedToPlayer); 00055 00056 std::vector<const ESM::DialInfo *> list (const ESM::Dialogue& dialogue, 00057 bool fallbackToInfoRefusal, bool searchAll, bool invertDisposition=false) const; 00058 00059 const ESM::DialInfo* search (const ESM::Dialogue& dialogue, const bool fallbackToInfoRefusal) const; 00062 00063 bool responseAvailable (const ESM::Dialogue& dialogue) const; 00065 }; 00066 } 00067 00068 #endif