2012-11-08 15:49:38 +00:00
|
|
|
#ifndef GAME_MWDIALOGUE_SELECTWRAPPER_H
|
|
|
|
#define GAME_MWDIALOGUE_SELECTWRAPPER_H
|
|
|
|
|
|
|
|
#include <components/esm/loadinfo.hpp>
|
|
|
|
|
|
|
|
namespace MWDialogue
|
|
|
|
{
|
|
|
|
class SelectWrapper
|
|
|
|
{
|
|
|
|
const ESM::DialInfo::SelectStruct& mSelect;
|
2012-11-15 19:00:27 +00:00
|
|
|
|
2012-11-08 15:49:38 +00:00
|
|
|
public:
|
2012-11-15 19:00:27 +00:00
|
|
|
|
2012-11-08 15:49:38 +00:00
|
|
|
enum Function
|
|
|
|
{
|
2012-11-10 10:42:03 +00:00
|
|
|
Function_None, Function_False,
|
2012-11-08 20:16:49 +00:00
|
|
|
Function_Journal,
|
2012-11-08 20:48:17 +00:00
|
|
|
Function_Item,
|
|
|
|
Function_Dead,
|
|
|
|
Function_Id,
|
|
|
|
Function_Faction,
|
|
|
|
Function_Class,
|
|
|
|
Function_Race,
|
2012-11-08 21:11:50 +00:00
|
|
|
Function_Cell,
|
|
|
|
Function_Local,
|
2012-11-10 08:35:50 +00:00
|
|
|
Function_Global,
|
2012-11-12 12:56:51 +00:00
|
|
|
Function_SameGender, Function_SameRace, Function_SameFaction,
|
2012-11-10 10:08:36 +00:00
|
|
|
Function_Choice,
|
2012-11-10 10:38:37 +00:00
|
|
|
Function_PcCommonDisease, Function_PcBlightDisease, Function_PcCorprus,
|
2012-11-10 11:08:04 +00:00
|
|
|
Function_AiSetting,
|
2012-11-10 11:28:40 +00:00
|
|
|
Function_PcAttribute, Function_PcSkill,
|
2012-11-10 12:20:41 +00:00
|
|
|
Function_PcExpelled,
|
|
|
|
Function_PcVampire,
|
|
|
|
Function_FriendlyHit,
|
2012-11-10 13:02:52 +00:00
|
|
|
Function_TalkedToPc,
|
|
|
|
Function_PcLevel, Function_PcHealthPercent, Function_PcDynamicStat,
|
2012-11-12 12:23:25 +00:00
|
|
|
Function_PcGender, Function_PcClothingModifier, Function_PcCrimeLevel,
|
2012-11-12 12:56:51 +00:00
|
|
|
Function_RankRequirement,
|
2012-11-15 19:00:27 +00:00
|
|
|
Function_HealthPercent, Function_Level, Function_PCReputation,
|
|
|
|
Function_Weather,
|
|
|
|
Function_Reputation, Function_Alarmed, Function_FactionRankDiff, Function_Detected,
|
|
|
|
Function_Attacked, Function_ShouldAttack,
|
|
|
|
Function_CreatureTargetted,
|
|
|
|
Function_PCWerewolf, Function_WerewolfKills,
|
|
|
|
Function_RankLow, Function_RankHigh
|
2012-11-08 15:49:38 +00:00
|
|
|
};
|
2012-11-12 12:56:51 +00:00
|
|
|
|
2012-11-08 15:49:38 +00:00
|
|
|
enum Type
|
|
|
|
{
|
|
|
|
Type_None,
|
|
|
|
Type_Integer,
|
2012-11-08 16:04:44 +00:00
|
|
|
Type_Numeric,
|
|
|
|
Type_Boolean
|
2012-11-08 15:49:38 +00:00
|
|
|
};
|
2012-11-15 19:00:27 +00:00
|
|
|
|
2012-11-10 08:35:50 +00:00
|
|
|
private:
|
2012-11-15 19:00:27 +00:00
|
|
|
|
2012-11-10 08:35:50 +00:00
|
|
|
Function decodeFunction() const;
|
2012-11-15 19:00:27 +00:00
|
|
|
|
2012-11-08 15:49:38 +00:00
|
|
|
public:
|
2012-11-15 19:00:27 +00:00
|
|
|
|
2012-11-08 15:49:38 +00:00
|
|
|
SelectWrapper (const ESM::DialInfo::SelectStruct& select);
|
2012-11-15 19:00:27 +00:00
|
|
|
|
2012-11-08 15:49:38 +00:00
|
|
|
Function getFunction() const;
|
2012-11-15 19:00:27 +00:00
|
|
|
|
2012-11-10 10:38:37 +00:00
|
|
|
int getArgument() const;
|
2012-11-15 19:00:27 +00:00
|
|
|
|
2012-11-08 15:49:38 +00:00
|
|
|
Type getType() const;
|
2012-11-15 19:00:27 +00:00
|
|
|
|
2012-11-08 20:48:17 +00:00
|
|
|
bool isInverted() const;
|
2012-11-15 19:00:27 +00:00
|
|
|
|
2012-11-08 20:48:17 +00:00
|
|
|
bool isNpcOnly() const;
|
|
|
|
///< \attention Do not call any of the select functions for this select struct!
|
2012-11-15 19:00:27 +00:00
|
|
|
|
2012-11-08 15:49:38 +00:00
|
|
|
bool selectCompare (int value) const;
|
|
|
|
|
|
|
|
bool selectCompare (float value) const;
|
2012-11-15 19:00:27 +00:00
|
|
|
|
2012-11-08 16:04:44 +00:00
|
|
|
bool selectCompare (bool value) const;
|
2012-11-15 19:00:27 +00:00
|
|
|
|
2012-11-08 20:16:49 +00:00
|
|
|
std::string getName() const;
|
|
|
|
///< Return case-smashed name.
|
2012-11-08 15:49:38 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|