[QUESTION] ONLINE BUFF BONUS STATS

04/26/2018 04:00 Rhea03#1
Hi Epvpers there is a release on online buff bonus stats here?
or any source release here have that features.

thanks
04/26/2018 06:13 Avalion#2
No, but you can handle applying buffs to every user online when a user logs on and the quota is met. Then remove the buff on every user if a user logs out?
04/26/2018 14:08 Barameu#3
Here is a tip

Code:
	int nCount = g_UserMng.GetCount();
	if (dwTick > m_dwTickBuffServer)
	{
		if (nCount >= 100)
		{
			DoBuff
		}
	}
04/26/2018 16:59 Rhea03#4
Quote:
Originally Posted by Avalion View Post
No, but you can handle applying buffs to every user online when a user logs on and the quota is met. Then remove the buff on every user if a user logs out?
yes something like that, look like roika classic
04/26/2018 17:38 Barameu#5
lol i give you some tip already how to do it.
04/26/2018 18:07 Rhea03#6
Quote:
Originally Posted by Barameu View Post
lol i give you some tip already how to do it.
private me a full sir thanks
04/26/2018 18:09 Mushpoie#7
Quote:
Originally Posted by Rhea03 View Post
private me a full sir thanks
Or learn to code it yourself instead of begging others?
04/26/2018 18:26 Avalion#8
Quote:
Originally Posted by Barameu View Post
Here is a tip

Code:
	int nCount = g_UserMng.GetCount();
	if (dwTick > m_dwTickBuffServer)
	{
		if (nCount >= 100)
		{
			DoBuff
		}
	}
First of all, that is silly.

I personally would find it to be much better to apply the buff when a user logs on to the server rather than having it a "tick". Then the buff should last unsigned long max size for the timer.

This way, you would remove the buff when the requirements are not met when the user logs on or a user on the server logs off. This way, you're not doing DoBuff() for all users multiple times in the lifetime of the user like some of the systems out there.

You can just do it when the online count changes and requirements are or are not met. When the requirements are not met, you can iterate over the user map and remove the buff and vice versa.