Force invalid enum values to defaults

ryzomclassic-develop
kaetemi 5 years ago committed by Jan Boon
parent ea021e1d96
commit 3e7035c6dd

@ -527,7 +527,7 @@ namespace <xsl:value-of select="@name"/>
<xsl:text>const std::vector&lt;</xsl:text><xsl:value-of select="@type"/>&gt; &amp;<xsl:value-of select="@name"/><xsl:if test="position() != last()">, </xsl:if> <xsl:text>const std::vector&lt;</xsl:text><xsl:value-of select="@type"/>&gt; &amp;<xsl:value-of select="@name"/><xsl:if test="position() != last()">, </xsl:if>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:if test="@byref = 'true' or @enum='smart'">const </xsl:if><xsl:value-of select="@type"/><xsl:text> </xsl:text><xsl:if test="@byref = 'true' or @enum = 'smart'">&amp;</xsl:if><xsl:value-of select="@name"/><xsl:if test="position() != last()">, </xsl:if> <xsl:if test="@byref = 'true' or @enum='smart' or @enum='bitset'">const </xsl:if><xsl:value-of select="@type"/><xsl:text> </xsl:text><xsl:if test="@byref = 'true' or @enum = 'smart' or @enum = 'bitset'">&amp;</xsl:if><xsl:value-of select="@name"/><xsl:if test="position() != last()">, </xsl:if>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</xsl:for-each> </xsl:for-each>
@ -1001,6 +1001,12 @@ namespace <xsl:value-of select="@name"/>
<xsl:for-each select="property[@name != $uniqueId and @db_col]"> <xsl:for-each select="property[@name != $uniqueId and @db_col]">
<xsl:choose> <xsl:choose>
<xsl:when test="@enum='true' or @enum='smart'"> <xsl:when test="@enum='true' or @enum='smart'">
qs += _<xsl:value-of select="@name"/><xsl:text>.isValid()
? "'"+_</xsl:text><xsl:value-of select="@name"/><xsl:text>.toString()+"'"
: "DEFAULT(</xsl:text><xsl:value-of select="@db_col"/><xsl:text>)";
</xsl:text>
</xsl:when>
<xsl:when test="@enum='bitset'">
qs += "'"+_<xsl:value-of select="@name"/><xsl:text>.toString()+"'"; qs += "'"+_<xsl:value-of select="@name"/><xsl:text>.toString()+"'";
</xsl:text> </xsl:text>
</xsl:when> </xsl:when>
@ -1024,6 +1030,12 @@ namespace <xsl:value-of select="@name"/>
<xsl:for-each select="property[@db_col]"> <xsl:for-each select="property[@db_col]">
<xsl:choose> <xsl:choose>
<xsl:when test="@enum='true' or @enum='smart'"> <xsl:when test="@enum='true' or @enum='smart'">
qs += _<xsl:value-of select="@name"/><xsl:text>.isValid()
? "'"+_</xsl:text><xsl:value-of select="@name"/><xsl:text>.toString()+"'"
: "DEFAULT(</xsl:text><xsl:value-of select="@db_col"/><xsl:text>)";
</xsl:text>
</xsl:when>
<xsl:when test="@enum='bitset'">
qs += "'"+_<xsl:value-of select="@name"/><xsl:text>.toString()+"'"; qs += "'"+_<xsl:value-of select="@name"/><xsl:text>.toString()+"'";
</xsl:text> </xsl:text>
</xsl:when> </xsl:when>
@ -1050,7 +1062,14 @@ namespace <xsl:value-of select="@name"/>
<xsl:for-each select="property[@db_col]"> <xsl:for-each select="property[@db_col]">
<xsl:choose> <xsl:choose>
<xsl:when test="@enum='true' or @enum='smart'"> <xsl:when test="@enum='true' or @enum='smart'">
qs += "'"+_<xsl:value-of select="@name"/>.toString()+"'"; qs += _<xsl:value-of select="@name"/><xsl:text>.isValid()
? "'"+_</xsl:text><xsl:value-of select="@name"/><xsl:text>.toString()+"'"
: "DEFAULT(</xsl:text><xsl:value-of select="@db_col"/><xsl:text>)";
</xsl:text>
</xsl:when>
<xsl:when test="@enum='bitset'">
qs += "'"+_<xsl:value-of select="@name"/><xsl:text>.toString()+"'";
</xsl:text>
</xsl:when> </xsl:when>
<xsl:when test="@date='true'"> <xsl:when test="@date='true'">
qs += "'"+MSW::encodeDate(_<xsl:value-of select="@name"/>)<xsl:text>+"'"; qs += "'"+MSW::encodeDate(_<xsl:value-of select="@name"/>)<xsl:text>+"'";
@ -1075,6 +1094,12 @@ namespace <xsl:value-of select="@name"/>
<xsl:for-each select="property[@name != $uniqueId and @db_col]"> <xsl:for-each select="property[@name != $uniqueId and @db_col]">
<xsl:choose> <xsl:choose>
<xsl:when test="@enum='true' or @enum='smart'"> <xsl:when test="@enum='true' or @enum='smart'">
qs += "<xsl:value-of select="@db_col"/> = " + (_<xsl:value-of select="@name"/><xsl:text>.isValid()
? "'"+_</xsl:text><xsl:value-of select="@name"/><xsl:text>.toString()+"'"
: "DEFAULT(</xsl:text><xsl:value-of select="@db_col"/><xsl:text>)");
</xsl:text>
</xsl:when>
<xsl:when test="@enum='bitset'">
qs += "<xsl:value-of select="@db_col"/> = '"+_<xsl:value-of select="@name"/><xsl:text>.toString()+"'"; qs += "<xsl:value-of select="@db_col"/> = '"+_<xsl:value-of select="@name"/><xsl:text>.toString()+"'";
</xsl:text> </xsl:text>
</xsl:when> </xsl:when>
@ -1098,6 +1123,12 @@ namespace <xsl:value-of select="@name"/>
<xsl:for-each select="property[@db_col]"> <xsl:for-each select="property[@db_col]">
<xsl:choose> <xsl:choose>
<xsl:when test="@enum='true' or @enum='smart'"> <xsl:when test="@enum='true' or @enum='smart'">
qs += "<xsl:value-of select="@db_col"/> = " + (_<xsl:value-of select="@name"/><xsl:text>.isValid()
? "'"+_</xsl:text><xsl:value-of select="@name"/><xsl:text>.toString()+"'"
: "DEFAULT(</xsl:text><xsl:value-of select="@db_col"/><xsl:text>)");
</xsl:text>
</xsl:when>
<xsl:when test="@enum='bitset'">
qs += "<xsl:value-of select="@db_col"/> = '"+_<xsl:value-of select="@name"/><xsl:text>.toString()+"'"; qs += "<xsl:value-of select="@db_col"/> = '"+_<xsl:value-of select="@name"/><xsl:text>.toString()+"'";
</xsl:text> </xsl:text>
</xsl:when> </xsl:when>
@ -2086,7 +2117,7 @@ namespace <xsl:value-of select="@name"/>
</xsl:text> <xsl:for-each select="property[@db_col]"> </xsl:text> <xsl:for-each select="property[@db_col]">
<xsl:choose> <xsl:choose>
<xsl:when test="@enum='true' or @enum='smart'"> <xsl:when test="@enum='true' or @enum='smart' or @enum='bitset'">
<xsl:text> { <xsl:text> {
std::string s; std::string s;
result->getField(</xsl:text><xsl:value-of select="position()-1"/>, s); result->getField(</xsl:text><xsl:value-of select="position()-1"/>, s);
@ -2154,7 +2185,7 @@ ERROR : parent/child relation support only 'map' or 'vector' cont specification
result->fetchRow(); result->fetchRow();
<xsl:for-each select="../property[@db_col]"> <xsl:for-each select="../property[@db_col]">
<xsl:choose> <xsl:choose>
<xsl:when test="@enum='true' or @enum='smart'"> <xsl:when test="@enum='true' or @enum='smart' or @enum='bitset'">
{ {
std::string s; std::string s;
result->getField(<xsl:value-of select="position()-1"/>, s); result->getField(<xsl:value-of select="position()-1"/>, s);
@ -2235,7 +2266,7 @@ ERROR : parent/child relation support only 'map' or 'vector' cont specification
result->fetchRow(); result->fetchRow();
<xsl:for-each select="../property[@db_col]"> <xsl:for-each select="../property[@db_col]">
<xsl:choose> <xsl:choose>
<xsl:when test="@enum='true' or @enum='smart'"> <xsl:when test="@enum='true' or @enum='smart' or @enum='bitset'">
{ {
std::string s; std::string s;
result->getField(<xsl:value-of select="position()-1"/>, s); result->getField(<xsl:value-of select="position()-1"/>, s);
@ -2810,7 +2841,8 @@ ERROR : parent/child relation support only 'map' or 'vector' cont specification
<xsl:if test=".//param[@type != 'uint32' <xsl:if test=".//param[@type != 'uint32'
and @type != 'uint8' and @type != 'uint8'
and @type != 'std::string' and @type != 'std::string'
and @enum != 'smart']"> and @enum != 'smart'
and @enum != 'bitset']">
<xsl:message terminate="yes"> <xsl:message terminate="yes">
ERROR : PHP interface only support uint8, uint32, enum and std::string parameter in callback interface '<xsl:value-of select="@name"/>.<xsl:value-of select=".//param[@type != 'uint32' and @type != 'uint8' and @type != 'std::string']/../@name"/>' ERROR : PHP interface only support uint8, uint32, enum and std::string parameter in callback interface '<xsl:value-of select="@name"/>.<xsl:value-of select=".//param[@type != 'uint32' and @type != 'uint8' and @type != 'std::string']/../@name"/>'
</xsl:message> </xsl:message>

@ -160,7 +160,9 @@ namespace RSMGR
qs += ", "; qs += ", ";
qs += "'"+MSW::escapeString(NLMISC::toString(_TargetCharacter), connection)+"'"; qs += "'"+MSW::escapeString(NLMISC::toString(_TargetCharacter), connection)+"'";
qs += ", "; qs += ", ";
qs += "'"+_Relation.toString()+"'"; qs += _Relation.isValid()
? "'"+_Relation.toString()+"'"
: "DEFAULT(relation_type)";
qs += ", "; qs += ", ";
qs += "'"+MSW::escapeString(NLMISC::toString(_Comments), connection)+"'"; qs += "'"+MSW::escapeString(NLMISC::toString(_Comments), connection)+"'";
@ -225,7 +227,9 @@ namespace RSMGR
qs += ", "; qs += ", ";
qs += "targer_character = '"+MSW::escapeString(NLMISC::toString(_TargetCharacter), connection)+"'"; qs += "targer_character = '"+MSW::escapeString(NLMISC::toString(_TargetCharacter), connection)+"'";
qs += ", "; qs += ", ";
qs += "relation_type = '"+_Relation.toString()+"'"; qs += "relation_type = " + (_Relation.isValid()
? "'"+_Relation.toString()+"'"
: "DEFAULT(relation_type)");
qs += ", "; qs += ", ";
qs += "comments = '"+MSW::escapeString(NLMISC::toString(_Comments), connection)+"'"; qs += "comments = '"+MSW::escapeString(NLMISC::toString(_Comments), connection)+"'";
@ -815,7 +819,9 @@ namespace RSMGR
qs += ", "; qs += ", ";
qs += "'"+MSW::escapeString(NLMISC::toString(_CharId), connection)+"'"; qs += "'"+MSW::escapeString(NLMISC::toString(_CharId), connection)+"'";
qs += ", "; qs += ", ";
qs += "'"+_Status.toString()+"'"; qs += _Status.isValid()
? "'"+_Status.toString()+"'"
: "DEFAULT(status)";
qs += ", "; qs += ", ";
qs += "'"+MSW::escapeString(NLMISC::toString(_Kicked), connection)+"'"; qs += "'"+MSW::escapeString(NLMISC::toString(_Kicked), connection)+"'";
@ -878,7 +884,9 @@ namespace RSMGR
qs += ", "; qs += ", ";
qs += "char_id = '"+MSW::escapeString(NLMISC::toString(_CharId), connection)+"'"; qs += "char_id = '"+MSW::escapeString(NLMISC::toString(_CharId), connection)+"'";
qs += ", "; qs += ", ";
qs += "status = '"+_Status.toString()+"'"; qs += "status = " + (_Status.isValid()
? "'"+_Status.toString()+"'"
: "DEFAULT(status)");
qs += ", "; qs += ", ";
qs += "kicked = '"+MSW::escapeString(NLMISC::toString(_Kicked), connection)+"'"; qs += "kicked = '"+MSW::escapeString(NLMISC::toString(_Kicked), connection)+"'";
@ -1482,11 +1490,17 @@ namespace RSMGR
qs += ", "; qs += ", ";
qs += "'"+MSW::escapeString(NLMISC::toString(_RingAccess), connection)+"'"; qs += "'"+MSW::escapeString(NLMISC::toString(_RingAccess), connection)+"'";
qs += ", "; qs += ", ";
qs += "'"+_Race.toString()+"'"; qs += _Race.isValid()
? "'"+_Race.toString()+"'"
: "DEFAULT(race)";
qs += ", "; qs += ", ";
qs += "'"+_Civilisation.toString()+"'"; qs += _Civilisation.isValid()
? "'"+_Civilisation.toString()+"'"
: "DEFAULT(civilisation)";
qs += ", "; qs += ", ";
qs += "'"+_Cult.toString()+"'"; qs += _Cult.isValid()
? "'"+_Cult.toString()+"'"
: "DEFAULT(cult)";
qs += ", "; qs += ", ";
qs += "'"+MSW::escapeString(NLMISC::toString(_CurrentSession), connection)+"'"; qs += "'"+MSW::escapeString(NLMISC::toString(_CurrentSession), connection)+"'";
qs += ", "; qs += ", ";
@ -1568,11 +1582,17 @@ namespace RSMGR
qs += ", "; qs += ", ";
qs += "ring_access = '"+MSW::escapeString(NLMISC::toString(_RingAccess), connection)+"'"; qs += "ring_access = '"+MSW::escapeString(NLMISC::toString(_RingAccess), connection)+"'";
qs += ", "; qs += ", ";
qs += "race = '"+_Race.toString()+"'"; qs += "race = " + (_Race.isValid()
? "'"+_Race.toString()+"'"
: "DEFAULT(race)");
qs += ", "; qs += ", ";
qs += "civilisation = '"+_Civilisation.toString()+"'"; qs += "civilisation = " + (_Civilisation.isValid()
? "'"+_Civilisation.toString()+"'"
: "DEFAULT(civilisation)");
qs += ", "; qs += ", ";
qs += "cult = '"+_Cult.toString()+"'"; qs += "cult = " + (_Cult.isValid()
? "'"+_Cult.toString()+"'"
: "DEFAULT(cult)");
qs += ", "; qs += ", ";
qs += "current_session = '"+MSW::escapeString(NLMISC::toString(_CurrentSession), connection)+"'"; qs += "current_session = '"+MSW::escapeString(NLMISC::toString(_CurrentSession), connection)+"'";
qs += ", "; qs += ", ";
@ -2506,19 +2526,29 @@ namespace RSMGR
qs += ", "; qs += ", ";
qs += "'"+MSW::escapeString(NLMISC::toString(_CurrentSession), connection)+"'"; qs += "'"+MSW::escapeString(NLMISC::toString(_CurrentSession), connection)+"'";
qs += ", "; qs += ", ";
qs += "'"+_CurrentActivity.toString()+"'"; qs += _CurrentActivity.isValid()
? "'"+_CurrentActivity.toString()+"'"
: "DEFAULT(current_activity)";
qs += ", "; qs += ", ";
qs += "'"+_CurrentStatus.toString()+"'"; qs += _CurrentStatus.isValid()
? "'"+_CurrentStatus.toString()+"'"
: "DEFAULT(current_status)";
qs += ", "; qs += ", ";
qs += "'"+_PublicLevel.toString()+"'"; qs += _PublicLevel.isValid()
? "'"+_PublicLevel.toString()+"'"
: "DEFAULT(public_level)";
qs += ", "; qs += ", ";
qs += "'"+_AccountType.toString()+"'"; qs += _AccountType.isValid()
? "'"+_AccountType.toString()+"'"
: "DEFAULT(account_type)";
qs += ", "; qs += ", ";
qs += "'"+MSW::escapeString(NLMISC::toString(_ContentAccessLevel), connection)+"'"; qs += "'"+MSW::escapeString(NLMISC::toString(_ContentAccessLevel), connection)+"'";
qs += ", "; qs += ", ";
qs += "'"+MSW::escapeString(NLMISC::toString(_Description), connection)+"'"; qs += "'"+MSW::escapeString(NLMISC::toString(_Description), connection)+"'";
qs += ", "; qs += ", ";
qs += "'"+_Lang.toString()+"'"; qs += _Lang.isValid()
? "'"+_Lang.toString()+"'"
: "DEFAULT(lang)";
qs += ", "; qs += ", ";
qs += "'"+MSW::escapeString(NLMISC::toString(_Cookie), connection)+"'"; qs += "'"+MSW::escapeString(NLMISC::toString(_Cookie), connection)+"'";
qs += ", "; qs += ", ";
@ -2561,19 +2591,29 @@ namespace RSMGR
qs += ", "; qs += ", ";
qs += "current_session = '"+MSW::escapeString(NLMISC::toString(_CurrentSession), connection)+"'"; qs += "current_session = '"+MSW::escapeString(NLMISC::toString(_CurrentSession), connection)+"'";
qs += ", "; qs += ", ";
qs += "current_activity = '"+_CurrentActivity.toString()+"'"; qs += "current_activity = " + (_CurrentActivity.isValid()
? "'"+_CurrentActivity.toString()+"'"
: "DEFAULT(current_activity)");
qs += ", "; qs += ", ";
qs += "current_status = '"+_CurrentStatus.toString()+"'"; qs += "current_status = " + (_CurrentStatus.isValid()
? "'"+_CurrentStatus.toString()+"'"
: "DEFAULT(current_status)");
qs += ", "; qs += ", ";
qs += "public_level = '"+_PublicLevel.toString()+"'"; qs += "public_level = " + (_PublicLevel.isValid()
? "'"+_PublicLevel.toString()+"'"
: "DEFAULT(public_level)");
qs += ", "; qs += ", ";
qs += "account_type = '"+_AccountType.toString()+"'"; qs += "account_type = " + (_AccountType.isValid()
? "'"+_AccountType.toString()+"'"
: "DEFAULT(account_type)");
qs += ", "; qs += ", ";
qs += "content_access_level = '"+MSW::escapeString(NLMISC::toString(_ContentAccessLevel), connection)+"'"; qs += "content_access_level = '"+MSW::escapeString(NLMISC::toString(_ContentAccessLevel), connection)+"'";
qs += ", "; qs += ", ";
qs += "description = '"+MSW::escapeString(NLMISC::toString(_Description), connection)+"'"; qs += "description = '"+MSW::escapeString(NLMISC::toString(_Description), connection)+"'";
qs += ", "; qs += ", ";
qs += "lang = '"+_Lang.toString()+"'"; qs += "lang = " + (_Lang.isValid()
? "'"+_Lang.toString()+"'"
: "DEFAULT(lang)");
qs += ", "; qs += ", ";
qs += "cookie = '"+MSW::escapeString(NLMISC::toString(_Cookie), connection)+"'"; qs += "cookie = '"+MSW::escapeString(NLMISC::toString(_Cookie), connection)+"'";
qs += ", "; qs += ", ";
@ -3319,7 +3359,9 @@ namespace RSMGR
qs += "session_type, title, owner, plan_date, start_date, description, orientation, level, rule_type, access_type, state, host_shard_id, subscription_slots, reserved_slots, estimated_duration, final_duration, folder_id, lang, icone, anim_mode, race_filter, religion_filter, guild_filter, shard_filter, level_filter, subscription_closed, newcomer"; qs += "session_type, title, owner, plan_date, start_date, description, orientation, level, rule_type, access_type, state, host_shard_id, subscription_slots, reserved_slots, estimated_duration, final_duration, folder_id, lang, icone, anim_mode, race_filter, religion_filter, guild_filter, shard_filter, level_filter, subscription_closed, newcomer";
qs += ") VALUES ("; qs += ") VALUES (";
qs += "'"+_SessionType.toString()+"'"; qs += _SessionType.isValid()
? "'"+_SessionType.toString()+"'"
: "DEFAULT(session_type)";
qs += ", "; qs += ", ";
qs += "'"+MSW::escapeString(NLMISC::toString(_Title), connection)+"'"; qs += "'"+MSW::escapeString(NLMISC::toString(_Title), connection)+"'";
qs += ", "; qs += ", ";
@ -3331,15 +3373,25 @@ namespace RSMGR
qs += ", "; qs += ", ";
qs += "'"+MSW::escapeString(NLMISC::toString(_Description), connection)+"'"; qs += "'"+MSW::escapeString(NLMISC::toString(_Description), connection)+"'";
qs += ", "; qs += ", ";
qs += "'"+_Orientation.toString()+"'"; qs += _Orientation.isValid()
? "'"+_Orientation.toString()+"'"
: "DEFAULT(orientation)";
qs += ", "; qs += ", ";
qs += "'"+_Level.toString()+"'"; qs += _Level.isValid()
? "'"+_Level.toString()+"'"
: "DEFAULT(level)";
qs += ", "; qs += ", ";
qs += "'"+_RuleType.toString()+"'"; qs += _RuleType.isValid()
? "'"+_RuleType.toString()+"'"
: "DEFAULT(rule_type)";
qs += ", "; qs += ", ";
qs += "'"+_AccessType.toString()+"'"; qs += _AccessType.isValid()
? "'"+_AccessType.toString()+"'"
: "DEFAULT(access_type)";
qs += ", "; qs += ", ";
qs += "'"+_State.toString()+"'"; qs += _State.isValid()
? "'"+_State.toString()+"'"
: "DEFAULT(state)";
qs += ", "; qs += ", ";
qs += "'"+MSW::escapeString(NLMISC::toString(_HostShardId), connection)+"'"; qs += "'"+MSW::escapeString(NLMISC::toString(_HostShardId), connection)+"'";
qs += ", "; qs += ", ";
@ -3347,7 +3399,9 @@ namespace RSMGR
qs += ", "; qs += ", ";
qs += "'"+MSW::escapeString(NLMISC::toString(_ReservedSlots), connection)+"'"; qs += "'"+MSW::escapeString(NLMISC::toString(_ReservedSlots), connection)+"'";
qs += ", "; qs += ", ";
qs += "'"+_EstimatedDuration.toString()+"'"; qs += _EstimatedDuration.isValid()
? "'"+_EstimatedDuration.toString()+"'"
: "DEFAULT(estimated_duration)";
qs += ", "; qs += ", ";
qs += "'"+MSW::escapeString(NLMISC::toString(_FinalDuration), connection)+"'"; qs += "'"+MSW::escapeString(NLMISC::toString(_FinalDuration), connection)+"'";
qs += ", "; qs += ", ";
@ -3357,13 +3411,17 @@ namespace RSMGR
qs += ", "; qs += ", ";
qs += "'"+MSW::escapeString(NLMISC::toString(_Icone), connection)+"'"; qs += "'"+MSW::escapeString(NLMISC::toString(_Icone), connection)+"'";
qs += ", "; qs += ", ";
qs += "'"+_AnimMode.toString()+"'"; qs += _AnimMode.isValid()
? "'"+_AnimMode.toString()+"'"
: "DEFAULT(anim_mode)";
qs += ", "; qs += ", ";
qs += "'"+_RaceFilter.toString()+"'"; qs += "'"+_RaceFilter.toString()+"'";
qs += ", "; qs += ", ";
qs += "'"+_ReligionFilter.toString()+"'"; qs += "'"+_ReligionFilter.toString()+"'";
qs += ", "; qs += ", ";
qs += "'"+_GuildFilter.toString()+"'"; qs += _GuildFilter.isValid()
? "'"+_GuildFilter.toString()+"'"
: "DEFAULT(guild_filter)";
qs += ", "; qs += ", ";
qs += "'"+_ShardFilter.toString()+"'"; qs += "'"+_ShardFilter.toString()+"'";
qs += ", "; qs += ", ";
@ -3428,7 +3486,9 @@ namespace RSMGR
std::string qs; std::string qs;
qs = "UPDATE sessions SET "; qs = "UPDATE sessions SET ";
qs += "session_type = '"+_SessionType.toString()+"'"; qs += "session_type = " + (_SessionType.isValid()
? "'"+_SessionType.toString()+"'"
: "DEFAULT(session_type)");
qs += ", "; qs += ", ";
qs += "title = '"+MSW::escapeString(NLMISC::toString(_Title), connection)+"'"; qs += "title = '"+MSW::escapeString(NLMISC::toString(_Title), connection)+"'";
qs += ", "; qs += ", ";
@ -3440,15 +3500,25 @@ namespace RSMGR
qs += ", "; qs += ", ";
qs += "description = '"+MSW::escapeString(NLMISC::toString(_Description), connection)+"'"; qs += "description = '"+MSW::escapeString(NLMISC::toString(_Description), connection)+"'";
qs += ", "; qs += ", ";
qs += "orientation = '"+_Orientation.toString()+"'"; qs += "orientation = " + (_Orientation.isValid()
? "'"+_Orientation.toString()+"'"
: "DEFAULT(orientation)");
qs += ", "; qs += ", ";
qs += "level = '"+_Level.toString()+"'"; qs += "level = " + (_Level.isValid()
? "'"+_Level.toString()+"'"
: "DEFAULT(level)");
qs += ", "; qs += ", ";
qs += "rule_type = '"+_RuleType.toString()+"'"; qs += "rule_type = " + (_RuleType.isValid()
? "'"+_RuleType.toString()+"'"
: "DEFAULT(rule_type)");
qs += ", "; qs += ", ";
qs += "access_type = '"+_AccessType.toString()+"'"; qs += "access_type = " + (_AccessType.isValid()
? "'"+_AccessType.toString()+"'"
: "DEFAULT(access_type)");
qs += ", "; qs += ", ";
qs += "state = '"+_State.toString()+"'"; qs += "state = " + (_State.isValid()
? "'"+_State.toString()+"'"
: "DEFAULT(state)");
qs += ", "; qs += ", ";
qs += "host_shard_id = '"+MSW::escapeString(NLMISC::toString(_HostShardId), connection)+"'"; qs += "host_shard_id = '"+MSW::escapeString(NLMISC::toString(_HostShardId), connection)+"'";
qs += ", "; qs += ", ";
@ -3456,7 +3526,9 @@ namespace RSMGR
qs += ", "; qs += ", ";
qs += "reserved_slots = '"+MSW::escapeString(NLMISC::toString(_ReservedSlots), connection)+"'"; qs += "reserved_slots = '"+MSW::escapeString(NLMISC::toString(_ReservedSlots), connection)+"'";
qs += ", "; qs += ", ";
qs += "estimated_duration = '"+_EstimatedDuration.toString()+"'"; qs += "estimated_duration = " + (_EstimatedDuration.isValid()
? "'"+_EstimatedDuration.toString()+"'"
: "DEFAULT(estimated_duration)");
qs += ", "; qs += ", ";
qs += "final_duration = '"+MSW::escapeString(NLMISC::toString(_FinalDuration), connection)+"'"; qs += "final_duration = '"+MSW::escapeString(NLMISC::toString(_FinalDuration), connection)+"'";
qs += ", "; qs += ", ";
@ -3466,13 +3538,17 @@ namespace RSMGR
qs += ", "; qs += ", ";
qs += "icone = '"+MSW::escapeString(NLMISC::toString(_Icone), connection)+"'"; qs += "icone = '"+MSW::escapeString(NLMISC::toString(_Icone), connection)+"'";
qs += ", "; qs += ", ";
qs += "anim_mode = '"+_AnimMode.toString()+"'"; qs += "anim_mode = " + (_AnimMode.isValid()
? "'"+_AnimMode.toString()+"'"
: "DEFAULT(anim_mode)");
qs += ", "; qs += ", ";
qs += "race_filter = '"+_RaceFilter.toString()+"'"; qs += "race_filter = '"+_RaceFilter.toString()+"'";
qs += ", "; qs += ", ";
qs += "religion_filter = '"+_ReligionFilter.toString()+"'"; qs += "religion_filter = '"+_ReligionFilter.toString()+"'";
qs += ", "; qs += ", ";
qs += "guild_filter = '"+_GuildFilter.toString()+"'"; qs += "guild_filter = " + (_GuildFilter.isValid()
? "'"+_GuildFilter.toString()+"'"
: "DEFAULT(guild_filter)");
qs += ", "; qs += ", ";
qs += "shard_filter = '"+_ShardFilter.toString()+"'"; qs += "shard_filter = '"+_ShardFilter.toString()+"'";
qs += ", "; qs += ", ";
@ -4517,7 +4593,9 @@ namespace RSMGR
qs += ", "; qs += ", ";
qs += "'"+MSW::escapeString(NLMISC::toString(_WSOnline), connection)+"'"; qs += "'"+MSW::escapeString(NLMISC::toString(_WSOnline), connection)+"'";
qs += ", "; qs += ", ";
qs += "'"+_RequiredState.toString()+"'"; qs += _RequiredState.isValid()
? "'"+_RequiredState.toString()+"'"
: "DEFAULT(RequiredState)";
qs += ", "; qs += ", ";
qs += "'"+MSW::escapeString(NLMISC::toString(_MOTD), connection)+"'"; qs += "'"+MSW::escapeString(NLMISC::toString(_MOTD), connection)+"'";
@ -4552,7 +4630,9 @@ namespace RSMGR
qs += ", "; qs += ", ";
qs += "WSOnline = '"+MSW::escapeString(NLMISC::toString(_WSOnline), connection)+"'"; qs += "WSOnline = '"+MSW::escapeString(NLMISC::toString(_WSOnline), connection)+"'";
qs += ", "; qs += ", ";
qs += "RequiredState = '"+_RequiredState.toString()+"'"; qs += "RequiredState = " + (_RequiredState.isValid()
? "'"+_RequiredState.toString()+"'"
: "DEFAULT(RequiredState)");
qs += ", "; qs += ", ";
qs += "MOTD = '"+MSW::escapeString(NLMISC::toString(_MOTD), connection)+"'"; qs += "MOTD = '"+MSW::escapeString(NLMISC::toString(_MOTD), connection)+"'";
@ -6985,7 +7065,9 @@ namespace RSMGR
qs += ", "; qs += ", ";
qs += "'"+MSW::escapeString(NLMISC::toString(_Author), connection)+"'"; qs += "'"+MSW::escapeString(NLMISC::toString(_Author), connection)+"'";
qs += ", "; qs += ", ";
qs += "'"+_Type.toString()+"'"; qs += _Type.isValid()
? "'"+_Type.toString()+"'"
: "DEFAULT(type)";
qs += ", "; qs += ", ";
qs += "'"+MSW::escapeString(NLMISC::toString(_Text), connection)+"'"; qs += "'"+MSW::escapeString(NLMISC::toString(_Text), connection)+"'";
qs += ", "; qs += ", ";
@ -7037,7 +7119,9 @@ namespace RSMGR
qs += ", "; qs += ", ";
qs += "author = '"+MSW::escapeString(NLMISC::toString(_Author), connection)+"'"; qs += "author = '"+MSW::escapeString(NLMISC::toString(_Author), connection)+"'";
qs += ", "; qs += ", ";
qs += "type = '"+_Type.toString()+"'"; qs += "type = " + (_Type.isValid()
? "'"+_Type.toString()+"'"
: "DEFAULT(type)");
qs += ", "; qs += ", ";
qs += "text = '"+MSW::escapeString(NLMISC::toString(_Text), connection)+"'"; qs += "text = '"+MSW::escapeString(NLMISC::toString(_Text), connection)+"'";
qs += ", "; qs += ", ";
@ -8864,13 +8948,19 @@ namespace RSMGR
qs += ", "; qs += ", ";
qs += "'"+MSW::escapeString(NLMISC::toString(_RRPTotal), connection)+"'"; qs += "'"+MSW::escapeString(NLMISC::toString(_RRPTotal), connection)+"'";
qs += ", "; qs += ", ";
qs += "'"+_AnimMode.toString()+"'"; qs += _AnimMode.isValid()
? "'"+_AnimMode.toString()+"'"
: "DEFAULT(anim_mode)";
qs += ", "; qs += ", ";
qs += "'"+MSW::escapeString(NLMISC::toString(_Language), connection)+"'"; qs += "'"+MSW::escapeString(NLMISC::toString(_Language), connection)+"'";
qs += ", "; qs += ", ";
qs += "'"+_Orientation.toString()+"'"; qs += _Orientation.isValid()
? "'"+_Orientation.toString()+"'"
: "DEFAULT(orientation)";
qs += ", "; qs += ", ";
qs += "'"+_Level.toString()+"'"; qs += _Level.isValid()
? "'"+_Level.toString()+"'"
: "DEFAULT(level)";
qs += ", "; qs += ", ";
qs += "'"+MSW::escapeString(NLMISC::toString(_AllowFreeTrial), connection)+"'"; qs += "'"+MSW::escapeString(NLMISC::toString(_AllowFreeTrial), connection)+"'";
@ -8913,13 +9003,19 @@ namespace RSMGR
qs += ", "; qs += ", ";
qs += "rrp_total = '"+MSW::escapeString(NLMISC::toString(_RRPTotal), connection)+"'"; qs += "rrp_total = '"+MSW::escapeString(NLMISC::toString(_RRPTotal), connection)+"'";
qs += ", "; qs += ", ";
qs += "anim_mode = '"+_AnimMode.toString()+"'"; qs += "anim_mode = " + (_AnimMode.isValid()
? "'"+_AnimMode.toString()+"'"
: "DEFAULT(anim_mode)");
qs += ", "; qs += ", ";
qs += "language = '"+MSW::escapeString(NLMISC::toString(_Language), connection)+"'"; qs += "language = '"+MSW::escapeString(NLMISC::toString(_Language), connection)+"'";
qs += ", "; qs += ", ";
qs += "orientation = '"+_Orientation.toString()+"'"; qs += "orientation = " + (_Orientation.isValid()
? "'"+_Orientation.toString()+"'"
: "DEFAULT(orientation)");
qs += ", "; qs += ", ";
qs += "level = '"+_Level.toString()+"'"; qs += "level = " + (_Level.isValid()
? "'"+_Level.toString()+"'"
: "DEFAULT(level)");
qs += ", "; qs += ", ";
qs += "allow_free_trial = '"+MSW::escapeString(NLMISC::toString(_AllowFreeTrial), connection)+"'"; qs += "allow_free_trial = '"+MSW::escapeString(NLMISC::toString(_AllowFreeTrial), connection)+"'";

@ -193,11 +193,11 @@
<property type="std::string" name="Lang" db_col="lang" byref="true"/> <property type="std::string" name="Lang" db_col="lang" byref="true"/>
<property type="std::string" name="Icone" db_col="icone" byref="true"/> <property type="std::string" name="Icone" db_col="icone" byref="true"/>
<property type="TAnimMode" name="AnimMode" db_col="anim_mode" enum="smart" default="TAnimMode::am_dm"/> <property type="TAnimMode" name="AnimMode" db_col="anim_mode" enum="smart" default="TAnimMode::am_dm"/>
<property type="TRaceFilter" name="RaceFilter" db_col="race_filter" enum="smart"/> <!-- FIXME --> <property type="TRaceFilter" name="RaceFilter" db_col="race_filter" enum="bitset"/>
<property type="TReligionFilter" name="ReligionFilter" db_col="religion_filter" enum="smart"/> <!-- FIXME --> <property type="TReligionFilter" name="ReligionFilter" db_col="religion_filter" enum="bitset"/>
<property type="TGuildFilter" name="GuildFilter" db_col="guild_filter" enum="smart" default="TGuildFilter::gf_only_my_guild"/> <property type="TGuildFilter" name="GuildFilter" db_col="guild_filter" enum="smart" default="TGuildFilter::gf_only_my_guild"/>
<property type="TShardFilter" name="ShardFilter" db_col="shard_filter" enum="smart"/> <!-- FIXME --> <property type="TShardFilter" name="ShardFilter" db_col="shard_filter" enum="bitset"/>
<property type="TLevelFilter" name="LevelFilter" db_col="level_filter" enum="smart"/> <!-- FIXME --> <property type="TLevelFilter" name="LevelFilter" db_col="level_filter" enum="bitset"/>
<property type="bool" name="SubscriptionClosed" db_col="subscription_closed" default="0"/> <property type="bool" name="SubscriptionClosed" db_col="subscription_closed" default="0"/>
<property type="bool" name="Newcomer" db_col="newcomer" default="1"/> <property type="bool" name="Newcomer" db_col="newcomer" default="1"/>

Loading…
Cancel
Save