How soon do rules apply
If i apply a rule - when will it apply? Instantly?
Cheers guys! |
I believe you have reboot the server.
|
I've been using #rules setdb in game and the change works instantly.
|
I didn't even know that command existed. -_-
Well learn something new everyday. |
thanks for the info
|
The downside to #rules setdb is that it appears to wipe out the Notes field.
|
I can see how to fix that algorithmically, but my C++ isn't up to it.
--- In memory, add a 1 byte field to the rule struct, called hasNote, default value false When loading rules from DB, set hasNote to true if note field is non empty In _SaveRule use an UPDATE instead of REPLACE if hasNote is true. --- If rule isn't in DB then hasNote is false and the current REPLACE query is run. Cost is slightly longer load time at server startup, and less than a kb of memory (assuming that there are less than a k of rules!). I'll learn C++ by breaking my server trying to implement this.... it'll take me a while. |
should be able to use INSERT ... ON DUPLICATE KEY UPDATE ... ; syntax and not need to track if the notes field exists.
|
Here's the function from common/rulesys.cpp:
Code:
void RuleManager::_SaveRule(Database *db, RuleType type, uint16 index) { |
That change works.
|
You can also do "#rules reload" but it only reloads them for the current zone you are in.
|
All times are GMT -4. The time now is 12:27 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.