Page 1 of 1

Reload Rules

Posted: Tue May 03, 2016 8:21 pm
by Gangrenous
Is there a way to reload rules? I am thinking that will be very important to reload those on the fly. If there is not, I probably need to get that working.

Re: Reload Rules

Posted: Tue May 03, 2016 10:08 pm
by Jabantiz
I could have sworn there was a way to do this but I am not noticing it in the commands table or any where in the code so I guess as of right now there isn't a way to do it...

Re: Reload Rules

Posted: Wed May 04, 2016 4:33 am
by Gangrenous
It will be almost essential to have it also. You can imagine if you did a weekend "bonus xp" or were tuning mitigation, you would want to be able to change a variable on the fly. I will get into this either morning or tonight. I do not know your source very well, so it will take me longer.

Re: Reload Rules

Posted: Wed May 04, 2016 9:01 am
by Gangrenous
I noticed when working on this, the XP rate seems to be global. I have a reload rules command now, works great but since the XP rate is global it will have to be pulled again. Could it not just be pulled from the rule when XP is calculated? I have never gotten into performance like many of you do, so I am not sure. Would it be better to just reset it when the rules are reloaded with the World::GetXPRate function or would pulling it from the rule be acceptable?

Re: Reload Rules

Posted: Wed May 04, 2016 10:12 am
by Gangrenous
Okay now I see why the XP rate is global, it has to be from what I am seeing. There again the new XP rate is not pulled because it is above -1. I can always set the rates back to the initialized rates but that seems kludgy.