Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 07-05-2009, 12:51 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Here's the function from common/rulesys.cpp:

Code:
void RuleManager::_SaveRule(Database *db, RuleType type, uint16 index) {
	char vstr[100];

	switch(type) {
	case IntRule:
		sprintf(vstr, "%d", m_RuleIntValues[index]);
		break;
	case RealRule:
		sprintf(vstr, "%.13f", m_RuleRealValues[index]);
		break;
	case BoolRule:
		sprintf(vstr, "%s", m_RuleBoolValues[index]?"true":"false");
		break;
	}
	
	char errbuf[MYSQL_ERRMSG_SIZE];
    char* query = 0;
	if (!db->RunQuery(query, MakeAnyLenString(&query, 
		"REPLACE INTO rule_values (ruleset_id, rule_name, rule_value) "
		" VALUES(%d, '%s', '%s')",
		m_activeRuleset, _GetRuleName(type, index), vstr),errbuf))
	{
		_log(RULES__ERROR, "Fauled to set rule in the database: %s: %s", query,errbuf);
	}
	safe_delete_array(query);
}
I'd commit the change real quick, but I don't really have enough time to test it out. If someone else ends up committing this, please change that typo
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote
  #2  
Old 07-05-2009, 04:39 PM
Kobaz
Hill Giant
 
Join Date: Nov 2008
Location: Gold Coast, Oz
Posts: 119
Default

That change works.
Reply With Quote
  #3  
Old 07-06-2009, 05:43 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

You can also do "#rules reload" but it only reloads them for the current zone you are in.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 10:16 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3