Jump to content

Recommended Posts

I have a problem with the guilds , on the server i can create 2 guilds with the same name ex:

STAFF 1: https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif

STAFF 2: https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif


Do you have an ideea how to fix it ?

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

open guild_manager.cpp

Look for:

Spoiler

DWORD CGuildManager::CreateGuild(TGuildCreateParameter& gcp)

add inside the function:

Spoiler

std::auto_ptr<SQLMsg> pmsg(DBManager::instance().DirectQuery("SELECT COUNT(*) FROM guild%s WHERE name = '%s'",get_table_postfix(), gcp.name));

    if (pmsg->Get()->uiNumRows > 0)
    {
        MYSQL_ROW row = mysql_fetch_row(pmsg->Get()->pSQLResult);

        if (!(row[0] && row[0][0] == '0'))
        {
            gcp.master->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Guild is already existing,Choose a different name."));
            return 0;
        }
    }
    else
    {
        gcp.master->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("<길드> 길드를 생성할 수 없습니다."));
        return 0;
    }

 

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.