Jump to content

Most powerfull server source


Recommended Posts

Hello community,

I don't know if this is the right section for this. I don't even know what's real anymore... I've been spending sleepless nights over the compiler trying to make it work...

Let's start from the beginning. I downloaded Vanilla core r70140 from the only available link I found online. The core was pretty bad-shaped. I fixed everything, I upgraded the compiler to C++17. Few things left to make it to first successful compile, but I don't have the knowledge to do it alone. I realise it now, so I'm asking for the community's help.

If I manage to compile it successfully, I promise to test it, fix everything needs fixing and when I'm done, edit this topic with a download link that won't go down and a tutorial for the non-familliars on how to install it and compile it.

The source has no need for Extern folder and is using the latest libs released (including MariaDB) making it the most lightweight and powerfull core I've seen public. Optimized for security and performance by Vanilla, it's the perfect kick start for a powerful development enviroment or the rise of a new server. The use is up to you.

I've fixed most of it I believe but the real struggle is now at guild.cpp (function void CGuild::AddComment(LPCHARACTER ch, const std::string& str)?

DBManager::instance().FuncAfterQuery([this](auto&& data) { return this->RefreshCommentForce(data); }, ch->GetPlayerID(),
			"INSERT INTO guild_comment%s(guild_id, name, notice, content, time) VALUES(%u, '%s', %d, '%s', NOW())", 
			get_table_postfix(), m_data.guild_id, ch->GetName(), (str[0] == '!') ? 1 : 0, text);

I've changed this line due to deprecation of function bind and mem_fn. I changed 'em all to lambdas but it doesn't matter because there is always an error. I also removed the use of void_bind (from file any_functions.h). Here the error is:

guild.cpp:1023:24: error: no matching member function for call to
      'FuncAfterQuery'
        DBManager::instance().FuncAfterQuery([this](auto&& data) { retur...
        ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
./db.h:157:42: note: candidate function template not viable: no known conversion
      from 'DWORD' (aka 'unsigned int') to 'const char *' for 2nd argument
template <class Functor> void DBManager::FuncAfterQuery(Functor f, cons...
                                         ^
1 error generated.

I cannot find a proper way to convert ch->GetPlayerID() into a const char*. I've tried c_str(), std::to_string(), boost::lexical_cast<string>, etc... Non of them worked without an error. That was supposed to be the job of void_bind, but this method has more errors than this.

Btw if I'm doing something the wrong way here you guys are the experts so please tell me.

I believe after this the core will be ready for testing and therefor uploading. Thank you community for helping me release a better core for everyone and thank you for helping me continue the work of Vanilla, who gave us so much over the years.

Oh I almost forgot. In the upload there will be credits of all people who helped (little or much) as an extra thank you for the contribution.

Let's do it community.

Best regards

  • Sad 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.