Spammy Rules calls

This is a design and development forum for EQ2Emulator's extensive Rules System.

Moderator: Team Members

Post Reply
User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Spammy Rules calls

Post by John Adams » Tue Aug 27, 2013 8:20 pm

Jab/Scat/Any,

Should we really be calling the rule_manager inside of Process functions?

Code: Select all

				sscanf (rule_manager.GetGlobalRule(R_World, DuskTime)->GetString(), "%d:%d", &dusk_hour, &dusk_minute);
				sscanf (rule_manager.GetGlobalRule(R_World, DawnTime)->GetString(), "%d:%d", &dawn_hour, &dawn_minute);
I was watching some logging debug level 9, and this one just blew my screen apart with these newer timers. I do not even know what a sscanf is lol... but the logger is inside the GetGlobalRule I believe.

I just ran into this doing the new R_Zone:SpawnUpdateTimer rule, where it was being pounded every tick, and decided to make it an int16 defined once in zone init.

However, since I do not know how well C++ "thinks", I do not know if it's any different slamming GetGlobalRule() repeatedly, or setting it once and using the int.

Thoughts?

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests