Jump to content

[Collector's topic] Remove Unussed code


Recommended Posts

On 11/14/2021 at 4:39 PM, CsanMag said:

If I remove all these features will the server be faster or why we need to remove them?

I get they are not used but that's it? It's just about thinning the code?

I don't recommend you using this tutorial if you don't understand what you do, the code's are just there, just keep them. 😄  (Just my opinion, dont change what you dont understand)

Link to comment
Share on other sites

  • 1 month later...
  • 5 weeks later...
  • Bot

for matrix in db.cpp i have this error if i modify like this

void DBManager::LoginPrepare(long lRemainSecs, LPDESC d, DWORD * pdwClientKey, int * paiPremiumTimes)
{
	const TAccountTable & r = d->GetAccountTable();

	CLoginData * pkLD = M2_NEW CLoginData;

	pkLD->SetKey(d->GetLoginKey());
	pkLD->SetLogin(r.login);
	pkLD->SetRemainSecs(lRemainSecs);
	pkLD->SetIP(d->GetHostName());
	pkLD->SetClientKey(pdwClientKey);

	if (paiPremiumTimes)
		pkLD->SetPremium(paiPremiumTimes);

	InsertLoginData(pkLD);
	SendAuthLogin(d);
}

spacer.png

Edited by Metin2 Dev
Core X - External 2 Internal

english_banner.gif

Link to comment
Share on other sites

  • Premium
4 hours ago, Cryptex said:

for matrix in db.cpp i have this error if i modify like this

void DBManager::LoginPrepare(long lRemainSecs, LPDESC d, DWORD * pdwClientKey, int * paiPremiumTimes)
{
	const TAccountTable & r = d->GetAccountTable();

	CLoginData * pkLD = M2_NEW CLoginData;

	pkLD->SetKey(d->GetLoginKey());
	pkLD->SetLogin(r.login);
	pkLD->SetRemainSecs(lRemainSecs);
	pkLD->SetIP(d->GetHostName());
	pkLD->SetClientKey(pdwClientKey);

	if (paiPremiumTimes)
		pkLD->SetPremium(paiPremiumTimes);

	InsertLoginData(pkLD);
	SendAuthLogin(d);
}

spacer.png

compare the arguments of DBManager::LoginPrepare in db.cpp & db.h.

the output says they are different.

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • 4 months later...
  • 1 year later...

Thank you

but add 

input_login.cpp

 

Search and delete

    if (g_TeenDesc) // BufferedPacket 사용 금지
    {
        TPacketGTLogin p;

        p.header = HEADER_GT_LOGIN;
        p.empty = 0;
        p.id = d->GetAccountTable().id;

        g_TeenDesc->Packet(&p, sizeof(p));
        sys_log(0, "TEEN_SEND: (%u, %s)", d->GetAccountTable().id, ch->GetName());
    }

 

  • Good 2
Link to comment
Share on other sites

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.