Edit: The consensus of the feedback so far is, that this code is very performance inefficient. If I have the time, I will rewrite the code and reupdate.
I coded this for a friend and thought why not share it with everyone.
Disclaimer: I'm still kind of new to coding, so if you have any suggestions on how to improve the code, let me know <3
I won't be adding a guide on how to create the items that are used as the a buff, there are enough guides on that out there.
ProjectCmn.cpp
Project.cpp
Project.h
User.h
User.cpp
VersionCommon.h (WorldServer)
add this:
Resource
You will need to create a new file called onlinebuff.inc.
It has to look like this:
First comes the ID of the buff, after that the amount of users that have to be online to apply this buff.
Please note that this does not work for multiple channels.
I also added these instruction as an attachment if you want to save it for later.
I coded this for a friend and thought why not share it with everyone.
Disclaimer: I'm still kind of new to coding, so if you have any suggestions on how to improve the code, let me know <3
I won't be adding a guide on how to create the items that are used as the a buff, there are enough guides on that out there.
ProjectCmn.cpp
Project.cpp
Project.h
User.h
User.cpp
VersionCommon.h (WorldServer)
add this:
PHP Code:
#define __SYS_ONLINECOUNT_BUFFS
#ifdef __SYS_ONLINECOUNT_BUFFS
#define __SYS_ONLINECOUNT_BUFFS_MODE 1 // 0 = Only highest buff will be active, 1 = All buffs will be active
#endif // __SYS_ONLINECOUNT_BUFFS
You will need to create a new file called onlinebuff.inc.
It has to look like this:
PHP Code:
// dwBuffID Online Count
II_ONLINEBUFF_LEVEL1 10
II_ONLINEBUFF_LEVEL2 20
Please note that this does not work for multiple channels.
I also added these instruction as an attachment if you want to save it for later.