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