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
|
|
|
|
{
|
2024-04-11 22:29:33 +02:00
|
|
|
const ESM::DialogueCondition& mSelect;
|
2022-09-22 21:26:05 +03:00
|
|
|
|
2012-11-08 16:49:38 +01:00
|
|
|
public:
|
|
|
|
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-08 16:49:38 +01:00
|
|
|
public:
|
2024-04-11 22:29:33 +02:00
|
|
|
SelectWrapper(const ESM::DialogueCondition& select);
|
2022-09-22 21:26:05 +03:00
|
|
|
|
2024-04-11 22:29:33 +02:00
|
|
|
ESM::DialogueCondition::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.
|
2024-04-04 19:45:29 +02:00
|
|
|
|
|
|
|
std::string_view getCellName() const;
|
|
|
|
|
|
|
|
ESM::RefId getId() const;
|
2012-11-08 16:49:38 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|