mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 16:41:29 +00:00
Some rule code cleanup
This commit is contained in:
parent
80ef4c7f9f
commit
fa872c6030
@ -17,43 +17,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "rulesys.h"
|
#include "rulesys.h"
|
||||||
|
|
||||||
#include "database.h"
|
#include "database.h"
|
||||||
#include "string_util.h"
|
#include "string_util.h"
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Commands:
|
||||||
FatherNitwit: Added new rules subsystem to allow game rules to be changed
|
#rules:
|
||||||
at runtime. more about this will come as time goes on.
|
|
||||||
FatherNitwit: Added #rules command to manage rules data from in game.
|
|
||||||
FatherNitwit: Renamed old #rules to #serverrules
|
|
||||||
FatherNitwit: Moved max level into the rules system (Character:MaxLevel)
|
|
||||||
Requred SQL:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE rule_sets (
|
|
||||||
ruleset_id TINYINT UNSIGNED NOT NULL auto_increment,
|
|
||||||
name VARCHAR(255) NOT NULL,
|
|
||||||
PRIMARY KEY(ruleset_id)
|
|
||||||
);
|
|
||||||
INSERT INTO rule_sets VALUES(0, "default");
|
|
||||||
UPDATE rule_sets SET ruleset_id=0;
|
|
||||||
|
|
||||||
CREATE TABLE rule_values (
|
|
||||||
ruleset_id TINYINT UNSIGNED NOT NULL,
|
|
||||||
rule_name VARCHAR(64) NOT NULL,
|
|
||||||
rule_value VARCHAR(10) NOT NULL,
|
|
||||||
INDEX(ruleset_id),
|
|
||||||
PRIMARY KEY(ruleset_id,rule_name)
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Commands:
|
|
||||||
#rules:
|
|
||||||
current -> lists current set name
|
current -> lists current set name
|
||||||
switch (set name) -> change set in the DB, but dont reload
|
switch (set name) -> change set in the DB, but dont reload
|
||||||
load (set name) -> load set into this zone without changing the world
|
load (set name) -> load set into this zone without changing the world
|
||||||
@ -94,28 +65,28 @@ RuleManager::RuleManager()
|
|||||||
}
|
}
|
||||||
|
|
||||||
RuleManager::CategoryType RuleManager::FindCategory(const char *catname) {
|
RuleManager::CategoryType RuleManager::FindCategory(const char *catname) {
|
||||||
int r;
|
int i;
|
||||||
for(r = 0; r < _CatCount; r++) {
|
for (i = 0; i < _CatCount; i++) {
|
||||||
if(strcasecmp(catname, s_categoryNames[r]) == 0)
|
if (strcasecmp(catname, s_categoryNames[i]) == 0)
|
||||||
return((CategoryType) r);
|
return((CategoryType)i);
|
||||||
}
|
}
|
||||||
return(InvalidCategory);
|
return(InvalidCategory);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RuleManager::ListRules(const char *catname, std::vector<const char *> &into) {
|
bool RuleManager::ListRules(const char *catname, std::vector<const char *> &into) {
|
||||||
CategoryType cat = InvalidCategory;
|
CategoryType cat = InvalidCategory;
|
||||||
if(catname != nullptr) {
|
if (catname != nullptr) {
|
||||||
cat = FindCategory(catname);
|
cat = FindCategory(catname);
|
||||||
if(cat == InvalidCategory) {
|
if (cat == InvalidCategory) {
|
||||||
Log.Out(Logs::Detail, Logs::Rules, "Unable to find category '%s'", catname);
|
Log.Out(Logs::Detail, Logs::Rules, "Unable to find category '%s'", catname);
|
||||||
return(false);
|
return(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int r;
|
int i;
|
||||||
int rcount = CountRules();
|
int rule_count = CountRules();
|
||||||
for(r = 0; r < rcount; r++) {
|
for (i = 0; i < rule_count; i++) {
|
||||||
const RuleInfo &rule = s_RuleInfo[r];
|
const RuleInfo &rule = s_RuleInfo[i];
|
||||||
if(catname == nullptr || cat == rule.category) {
|
if (catname == nullptr || cat == rule.category) {
|
||||||
into.push_back(rule.name);
|
into.push_back(rule.name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -123,15 +94,14 @@ bool RuleManager::ListRules(const char *catname, std::vector<const char *> &into
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool RuleManager::ListCategories(std::vector<const char *> &into) {
|
bool RuleManager::ListCategories(std::vector<const char *> &into) {
|
||||||
int r;
|
int i;
|
||||||
for(r = 0; r < _CatCount; r++) {
|
for (i = 0; i < _CatCount; i++) {
|
||||||
into.push_back(s_categoryNames[r]);
|
into.push_back(s_categoryNames[i]);
|
||||||
}
|
}
|
||||||
return(true);
|
return(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool RuleManager::GetRule(const char *rule_name, std::string &return_value) {
|
||||||
bool RuleManager::GetRule(const char *rule_name, std::string &ret_val) {
|
|
||||||
RuleType type;
|
RuleType type;
|
||||||
uint16 index;
|
uint16 index;
|
||||||
if (!_FindRule(rule_name, type, index))
|
if (!_FindRule(rule_name, type, index))
|
||||||
@ -151,12 +121,12 @@ bool RuleManager::GetRule(const char *rule_name, std::string &ret_val) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret_val = tmp;
|
return_value = tmp;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RuleManager::SetRule(const char *rule_name, const char *rule_value, Database *db, bool db_save) {
|
bool RuleManager::SetRule(const char *rule_name, const char *rule_value, Database *database, bool db_save) {
|
||||||
if(rule_name == nullptr || rule_value == nullptr)
|
if(rule_name == nullptr || rule_value == nullptr)
|
||||||
return(false);
|
return(false);
|
||||||
|
|
||||||
@ -166,25 +136,26 @@ bool RuleManager::SetRule(const char *rule_name, const char *rule_value, Databas
|
|||||||
return(false);
|
return(false);
|
||||||
|
|
||||||
switch(type) {
|
switch(type) {
|
||||||
case IntRule:
|
case IntRule:
|
||||||
m_RuleIntValues [index] = atoi(rule_value);
|
m_RuleIntValues[index] = atoi(rule_value);
|
||||||
Log.Out(Logs::Detail, Logs::Rules, "Set rule %s to value %d", rule_name, m_RuleIntValues[index]);
|
Log.Out(Logs::Detail, Logs::Rules, "Set rule %s to value %d", rule_name, m_RuleIntValues[index]);
|
||||||
break;
|
break;
|
||||||
case RealRule:
|
case RealRule:
|
||||||
m_RuleRealValues[index] = atof(rule_value);
|
m_RuleRealValues[index] = atof(rule_value);
|
||||||
Log.Out(Logs::Detail, Logs::Rules, "Set rule %s to value %.13f", rule_name, m_RuleRealValues[index]);
|
Log.Out(Logs::Detail, Logs::Rules, "Set rule %s to value %.13f", rule_name, m_RuleRealValues[index]);
|
||||||
break;
|
break;
|
||||||
case BoolRule:
|
case BoolRule:
|
||||||
uint32 val = 0;
|
uint32 val = 0;
|
||||||
if(!strcasecmp(rule_value, "on") || !strcasecmp(rule_value, "true") || !strcasecmp(rule_value, "yes") || !strcasecmp(rule_value, "enabled") || !strcmp(rule_value, "1"))
|
if (!strcasecmp(rule_value, "on") || !strcasecmp(rule_value, "true") || !strcasecmp(rule_value, "yes") || !strcasecmp(rule_value, "enabled") || !strcmp(rule_value, "1"))
|
||||||
val = 1;
|
val = 1;
|
||||||
m_RuleBoolValues[index] = val;
|
|
||||||
Log.Out(Logs::Detail, Logs::Rules, "Set rule %s to value %s", rule_name, m_RuleBoolValues[index] == 1 ?"true":"false");
|
m_RuleBoolValues[index] = val;
|
||||||
break;
|
Log.Out(Logs::Detail, Logs::Rules, "Set rule %s to value %s", rule_name, m_RuleBoolValues[index] == 1 ? "true" : "false");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(db_save)
|
if(db_save)
|
||||||
_SaveRule(db, type, index);
|
_SaveRule(database, type, index);
|
||||||
|
|
||||||
return(true);
|
return(true);
|
||||||
}
|
}
|
||||||
@ -201,14 +172,14 @@ void RuleManager::ResetRules() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool RuleManager::_FindRule(const char *rule_name, RuleType &type_into, uint16 &index_into) {
|
bool RuleManager::_FindRule(const char *rule_name, RuleType &type_into, uint16 &index_into) {
|
||||||
if(rule_name == nullptr)
|
if (rule_name == nullptr)
|
||||||
return(false);
|
return(false);
|
||||||
|
|
||||||
int r;
|
int i;
|
||||||
int rcount = CountRules();
|
int rule_count = CountRules();
|
||||||
for(r = 0; r < rcount; r++) {
|
for (i = 0; i < rule_count; i++) {
|
||||||
const RuleInfo &rule = s_RuleInfo[r];
|
const RuleInfo &rule = s_RuleInfo[i];
|
||||||
if(strcmp(rule_name, rule.name) == 0) {
|
if (strcmp(rule_name, rule.name) == 0) {
|
||||||
type_into = rule.type;
|
type_into = rule.type;
|
||||||
index_into = rule.rule_index;
|
index_into = rule.rule_index;
|
||||||
return(true);
|
return(true);
|
||||||
@ -220,191 +191,177 @@ bool RuleManager::_FindRule(const char *rule_name, RuleType &type_into, uint16 &
|
|||||||
|
|
||||||
//assumes index is valid!
|
//assumes index is valid!
|
||||||
const char *RuleManager::_GetRuleName(RuleType type, uint16 index) {
|
const char *RuleManager::_GetRuleName(RuleType type, uint16 index) {
|
||||||
switch(type) {
|
switch (type) {
|
||||||
case IntRule:
|
case IntRule:
|
||||||
return(s_RuleInfo[index].name);
|
return(s_RuleInfo[index].name);
|
||||||
case RealRule:
|
case RealRule:
|
||||||
return(s_RuleInfo[index+_IntRuleCount].name);
|
return(s_RuleInfo[index + _IntRuleCount].name);
|
||||||
case BoolRule:
|
case BoolRule:
|
||||||
return(s_RuleInfo[index+_IntRuleCount+_RealRuleCount].name);
|
return(s_RuleInfo[index + _IntRuleCount + _RealRuleCount].name);
|
||||||
}
|
}
|
||||||
//should never happen
|
//should never happen
|
||||||
return("InvalidRule??");
|
return("InvalidRule??");
|
||||||
}
|
}
|
||||||
|
|
||||||
void RuleManager::SaveRules(Database *db, const char *ruleset) {
|
void RuleManager::SaveRules(Database *database, const char *ruleset_name) {
|
||||||
|
|
||||||
if(ruleset != nullptr) {
|
if (ruleset_name != nullptr) {
|
||||||
//saving to a specific name
|
//saving to a specific name
|
||||||
if(m_activeName != ruleset) {
|
if (m_activeName != ruleset_name) {
|
||||||
//a new name...
|
//a new name...
|
||||||
|
|
||||||
m_activeRuleset = _FindOrCreateRuleset(db, ruleset);
|
m_activeRuleset = _FindOrCreateRuleset(database, ruleset_name);
|
||||||
if(m_activeRuleset == -1) {
|
if (m_activeRuleset == -1) {
|
||||||
Log.Out(Logs::Detail, Logs::Rules, "Unable to find or create rule set %s", ruleset);
|
Log.Out(Logs::Detail, Logs::Rules, "Unable to find or create rule set %s", ruleset_name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_activeName = ruleset;
|
m_activeName = ruleset_name;
|
||||||
}
|
}
|
||||||
Log.Out(Logs::Detail, Logs::Rules, "Saving running rules into rule set %s (%d)", ruleset, m_activeRuleset);
|
Log.Out(Logs::Detail, Logs::Rules, "Saving running rules into rule set %s (%d)", ruleset_name, m_activeRuleset);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
Log.Out(Logs::Detail, Logs::Rules, "Saving running rules into running rule set %s", m_activeName.c_str(), m_activeRuleset);
|
Log.Out(Logs::Detail, Logs::Rules, "Saving running rules into running rule set %s", m_activeName.c_str(), m_activeRuleset);
|
||||||
}
|
}
|
||||||
|
|
||||||
int r;
|
int i;
|
||||||
for(r = 0; r < _IntRuleCount; r++) {
|
for (i = 0; i < _IntRuleCount; i++) {
|
||||||
_SaveRule(db, IntRule, r);
|
_SaveRule(database, IntRule, i);
|
||||||
}
|
}
|
||||||
for(r = 0; r < _RealRuleCount; r++) {
|
for (i = 0; i < _RealRuleCount; i++) {
|
||||||
_SaveRule(db, RealRule, r);
|
_SaveRule(database, RealRule, i);
|
||||||
}
|
}
|
||||||
for(r = 0; r < _BoolRuleCount; r++) {
|
for (i = 0; i < _BoolRuleCount; i++) {
|
||||||
_SaveRule(db, BoolRule, r);
|
_SaveRule(database, BoolRule, i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool RuleManager::LoadRules(Database *database, const char *ruleset_name) {
|
||||||
|
|
||||||
|
int ruleset_id = GetRulesetID(database, ruleset_name);
|
||||||
bool RuleManager::LoadRules(Database *db, const char *ruleset) {
|
if (ruleset_id < 0) {
|
||||||
|
Log.Out(Logs::Detail, Logs::Rules, "Failed to find ruleset '%s' for load operation. Canceling.", ruleset_name);
|
||||||
int rsid = GetRulesetID(db, ruleset);
|
|
||||||
if(rsid < 0) {
|
|
||||||
Log.Out(Logs::Detail, Logs::Rules, "Failed to find ruleset '%s' for load operation. Canceling.", ruleset);
|
|
||||||
return(false);
|
return(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.Out(Logs::Detail, Logs::Rules, "Loading rule set '%s' (%d)", ruleset, rsid);
|
Log.Out(Logs::Detail, Logs::Rules, "Loading rule set '%s' (%d)", ruleset_name, ruleset_id);
|
||||||
|
|
||||||
m_activeRuleset = rsid;
|
m_activeRuleset = ruleset_id;
|
||||||
m_activeName = ruleset;
|
m_activeName = ruleset_name;
|
||||||
|
|
||||||
std::string query = StringFormat("SELECT rule_name, rule_value FROM rule_values WHERE ruleset_id=%d", rsid);
|
std::string query = StringFormat("SELECT rule_name, rule_value FROM rule_values WHERE ruleset_id=%d", ruleset_id);
|
||||||
auto results = db->QueryDatabase(query);
|
auto results = database->QueryDatabase(query);
|
||||||
if (!results.Success())
|
if (!results.Success())
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
for(auto row = results.begin(); row != results.end(); ++row)
|
for (auto row = results.begin(); row != results.end(); ++row)
|
||||||
if(!SetRule(row[0], row[1], nullptr, false))
|
if (!SetRule(row[0], row[1], nullptr, false))
|
||||||
Log.Out(Logs::Detail, Logs::Rules, "Unable to interpret rule record for %s", row[0]);
|
Log.Out(Logs::Detail, Logs::Rules, "Unable to interpret rule record for %s", row[0]);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RuleManager::_SaveRule(Database *db, RuleType type, uint16 index) {
|
void RuleManager::_SaveRule(Database *database, RuleType type, uint16 index) {
|
||||||
char vstr[100];
|
char value_string[100];
|
||||||
|
|
||||||
switch(type) {
|
switch(type) {
|
||||||
case IntRule:
|
case IntRule:
|
||||||
sprintf(vstr, "%d", m_RuleIntValues[index]);
|
sprintf(value_string, "%d", m_RuleIntValues[index]);
|
||||||
break;
|
break;
|
||||||
case RealRule:
|
case RealRule:
|
||||||
sprintf(vstr, "%.13f", m_RuleRealValues[index]);
|
sprintf(value_string, "%.13f", m_RuleRealValues[index]);
|
||||||
break;
|
break;
|
||||||
case BoolRule:
|
case BoolRule:
|
||||||
sprintf(vstr, "%s", m_RuleBoolValues[index]?"true":"false");
|
sprintf(value_string, "%s", m_RuleBoolValues[index]?"true":"false");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string query = StringFormat("REPLACE INTO rule_values "
|
std::string query = StringFormat("REPLACE INTO rule_values "
|
||||||
"(ruleset_id, rule_name, rule_value) "
|
"(ruleset_id, rule_name, rule_value) "
|
||||||
" VALUES(%d, '%s', '%s')",
|
" VALUES(%d, '%s', '%s')",
|
||||||
m_activeRuleset, _GetRuleName(type, index), vstr);
|
m_activeRuleset, _GetRuleName(type, index), value_string);
|
||||||
auto results = db->QueryDatabase(query);
|
auto results = database->QueryDatabase(query);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int RuleManager::GetRulesetID(Database *db, const char *rulesetname) {
|
int RuleManager::GetRulesetID(Database *database, const char *ruleset_name) {
|
||||||
|
|
||||||
uint32 len = strlen(rulesetname);
|
uint32 len = strlen(ruleset_name);
|
||||||
char* rst = new char[2*len+1];
|
char* rst = new char[2 * len + 1];
|
||||||
db->DoEscapeString(rst, rulesetname, len);
|
database->DoEscapeString(rst, ruleset_name, len);
|
||||||
|
|
||||||
std::string query = StringFormat("SELECT ruleset_id FROM rule_sets WHERE name='%s'", rst);
|
std::string query = StringFormat("SELECT ruleset_id FROM rule_sets WHERE name='%s'", rst);
|
||||||
safe_delete_array(rst);
|
safe_delete_array(rst);
|
||||||
auto results = db->QueryDatabase(query);
|
auto results = database->QueryDatabase(query);
|
||||||
if (!results.Success()) {
|
if (!results.Success())
|
||||||
return -1;
|
return -1;
|
||||||
}
|
|
||||||
|
|
||||||
if (results.RowCount() == 0)
|
if (results.RowCount() == 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
auto row = results.begin();
|
auto row = results.begin();
|
||||||
|
|
||||||
return atoi(row[0]);
|
return atoi(row[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
int RuleManager::_FindOrCreateRuleset(Database *db, const char *ruleset) {
|
int RuleManager::_FindOrCreateRuleset(Database *database, const char *in_ruleset_name) {
|
||||||
|
|
||||||
int res = GetRulesetID(db, ruleset);
|
int ruleset_id = GetRulesetID(database, in_ruleset_name);
|
||||||
if(res >= 0)
|
if (ruleset_id >= 0)
|
||||||
return res; //found and existing one...
|
return ruleset_id; //found and existing one...
|
||||||
|
|
||||||
uint32 len = strlen(ruleset);
|
uint32 len = strlen(in_ruleset_name);
|
||||||
char* rst = new char[2*len+1];
|
char* ruleset_name = new char[2 * len + 1];
|
||||||
db->DoEscapeString(rst, ruleset, len);
|
database->DoEscapeString(ruleset_name, in_ruleset_name, len);
|
||||||
|
|
||||||
std::string query = StringFormat("INSERT INTO rule_sets (ruleset_id, name) VALUES(0, '%s')", rst);
|
std::string query = StringFormat("INSERT INTO rule_sets (ruleset_id, name) VALUES(0, '%s')", ruleset_name);
|
||||||
safe_delete_array(rst);
|
safe_delete_array(ruleset_name);
|
||||||
auto results = db->QueryDatabase(query);
|
auto results = database->QueryDatabase(query);
|
||||||
if (!results.Success())
|
if (!results.Success())
|
||||||
{
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
|
||||||
|
|
||||||
return results.LastInsertedID();
|
return results.LastInsertedID();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string RuleManager::GetRulesetName(Database *db, int id) {
|
std::string RuleManager::GetRulesetName(Database *database, int ruleset_id) {
|
||||||
|
std::string query = StringFormat("SELECT name FROM rule_sets WHERE ruleset_id=%d", ruleset_id);
|
||||||
std::string query = StringFormat("SELECT name FROM rule_sets WHERE ruleset_id=%d", id);
|
auto results = database->QueryDatabase(query);
|
||||||
auto results = db->QueryDatabase(query);
|
|
||||||
if (!results.Success())
|
if (!results.Success())
|
||||||
{
|
return "";
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (results.RowCount() == 0)
|
if (results.RowCount() == 0)
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
auto row = results.begin();
|
auto row = results.begin();
|
||||||
|
|
||||||
return row[0];
|
return row[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RuleManager::ListRulesets(Database *db, std::map<int, std::string> &into) {
|
bool RuleManager::ListRulesets(Database *database, std::map<int, std::string> &into) {
|
||||||
|
|
||||||
//start out with the default set which is always present.
|
//start out with the default set which is always present.
|
||||||
into[0] = "default";
|
into[0] = "default";
|
||||||
|
|
||||||
std::string query = "SELECT ruleset_id, name FROM rule_sets";
|
std::string query = "SELECT ruleset_id, name FROM rule_sets";
|
||||||
auto results = db->QueryDatabase(query);
|
auto results = database->QueryDatabase(query);
|
||||||
if (results.Success())
|
if (results.Success())
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
for (auto row = results.begin(); row != results.end(); ++row)
|
for (auto row = results.begin(); row != results.end(); ++row)
|
||||||
into[ atoi(row[0]) ] = row[1];
|
into[atoi(row[0])] = row[1];
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32 RuleManager::GetIntRule(RuleManager::IntType t) const
|
int32 RuleManager::GetIntRule(RuleManager::IntType t) const{
|
||||||
{
|
|
||||||
return(m_RuleIntValues[t]);
|
return(m_RuleIntValues[t]);
|
||||||
}
|
}
|
||||||
|
|
||||||
float RuleManager::GetRealRule(RuleManager::RealType t) const
|
float RuleManager::GetRealRule(RuleManager::RealType t) const{
|
||||||
{
|
|
||||||
return(m_RuleRealValues[t]);
|
return(m_RuleRealValues[t]);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RuleManager::GetBoolRule(RuleManager::BoolType t) const
|
bool RuleManager::GetBoolRule(RuleManager::BoolType t) const{
|
||||||
{
|
|
||||||
return (m_RuleBoolValues[t] == 1);
|
return (m_RuleBoolValues[t] == 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user