Çözüldü game.core ne anlatmak istemektedir?

Bu konu çözüme ulaştırılmıştır. Çözüm için konuya yazılan tüm yorumları okumayı unutmayın. Eğer konudaki yorumlar sorununuzu çözmediyse yeni bir konu açabilirsiniz.
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.

therasmus

Üye
Üye
Mesaj
119
Çözümler
10
Beğeni
67
Puan
729
Ticaret Puanı
0
Title sistemi ekledim daha öncesinde tekte eklediğim bi sistemdi. bu sefer title seçip okeyleyince game.core veriyor
core dosyasını açtım bu şekilde gözüktü. burdan ne anlamam gerekiyor yorumlayabilecek var mı acaba?

Kod:
(gdb) bt full
#0  0x403bb801 in ?? ()
No symbol table info available.
#1  0x084e8590 in vtable for CItemAddonManager ()
No symbol table info available.
#2  0x084eacb4 in vtable for LZOManager ()
No symbol table info available.
#3  0x2926b340 in ?? ()
No symbol table info available.
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
 
Çözüm
optimizasyondan kastın nedir tam bilmiyorum makefile dosyam şu şekilde;


Makefile:
CXX = g++9

GAME_VERSION := $(shell cat ../../__REVISION__)

GccMajorVersion := $(shell expr `$(CXX) -dumpversion | cut -f1 -d.`)
GccMinorVersion := $(shell expr `$(CXX) -dumpversion | cut -f2 -d.`)
GccMinorEGT8 := $(shell expr $(GccMinorVersion) \>= 8)

INCDIR =
LIBDIR =
BINDIR = ..
OBJDIR = .obj
$(shell if [ ! -d $(OBJDIR) ]; then mkdir $(OBJDIR); fi)

## LIST OF CONSTANTS BEGIN
ENABLE_GOOGLE_TEST = 0
ENABLE_HSHIELD_SYSTEM = 0
ENABLE_XTRAP_SYSTEM = 0
ENABLE_LUA_5_VERSION = 0
ENABLE_GCC_AUTODEPEND = 1
ENABLE_STATIC = 0
## LIST OF CONSTANTS END

# Depend Path File
ifneq ($(ENABLE_GCC_AUTODEPEND), 1)
DEPFILE = Depend
endif

# Standard Libraries
LIBS = -lm...
bt full yazmadan çıkan yazıları konuya ekler misin?
 
bt full yazmadan çıkan yazıları konuya ekler misin?
Kod:
(gdb) core game_r41095.core
warning: core file may not match specified executable file.
[New LWP 100086]
[New LWP 100176]
[New LWP 100177]
[New LWP 100181]
Core was generated by `./srv1-ch1-core1'.
Program terminated with signal SIGILL, Illegal instruction.
#0  0x403bb801 in ?? ()
[Current thread is 1 (LWP 100086)]
(gdb)
 
ch1 core1 syserrine baktın mı ?
 
tekrar ekledim bu sefer coreyi açtığımda bu şekilde çıktı. gcc sürümüm ile mi alakalı acaba?
gdb core.png
 
title.cpp dosyanı ekler misin bi?
 
title.cpp dosyanı ekler misin bi?
C++:
/*********************************************************************
* date        : 2016.02.15
* file        : title.cpp
* author      : VegaS!
* description :
*/
#include "stdafx.h"
#include "constants.h"
#include "utils.h"
#include "desc.h"
#include "char.h"
#include "db.h"
#include "config.h"
#include "title.h"
#include "affect.h"
#include "item.h"
#include "questmanager.h"
/*********************************************************************
*/
TitleManager::TitleManager()
{
}

TitleManager::~TitleManager()
{
}
/*****************************
* Set requirements gold(yang) for title
*/
#define need_gold_1        500000
#define need_gold_2        800000
#define need_gold_3        1500000
#define need_gold_4        1800000
#define need_gold_5        2500000
#define need_gold_6        3000000
#define need_gold_7        4000000
#define need_gold_8        5000000
#define need_gold_9        10000000
#define need_gold_10    15000000
#define need_gold_11    25000000
#define need_gold_12    50000000
#define need_gold_13    75000000
#define need_gold_14    100000000
#define need_gold_15    150000000
#define need_gold_16    300000000

/*****************************
* Set requirements level for title
*/
#define need_level_1    7
#define need_level_2    14
#define need_level_3    21
#define need_level_4    28
#define need_level_5    35
#define need_level_6    42
#define need_level_7    49
#define need_level_8    56
#define need_level_9    63
#define need_level_10    70
#define need_level_11    77
#define need_level_12    84   
#define need_level_13    91
#define need_level_14    98
#define need_level_15    100
#define need_level_16    103   

/*****************************
* Set requirements level for playTime on character
*/
#define need_minutes_1    5
#define need_minutes_2    15
#define need_minutes_3    40
#define need_minutes_4    50                                                   
#define need_minutes_5    60
#define need_minutes_6    75
#define need_minutes_7    90
#define need_minutes_8    110
#define need_minutes_9    130
#define need_minutes_10    150
#define need_minutes_11    170
#define need_minutes_12    200
#define need_minutes_13    500
#define need_minutes_14    700
#define need_minutes_15    1200
#define need_minutes_16    1500   
#include <boost/unordered_map.hpp>
#include "../../common/stl.h"
/****************************************************************************************************************************************************************************************
* Get enable options
*/
#define ENABLE_CHECK_TIME_POTIONS // If you want to make enable check for buy potions with time
#define ENABLE_GIVE_JCOINS // Enable to give you jcoins loadead from account.account(jcoins [row]) example: if u buy a potion yeelow cost 50coins, when you buy give make: -50 coins and give +50 jcoins

int sTitle[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19}; // Do not change anything here

int x[] = {0, 0, 0}; // Do not change anything here
/****************
* Get type affect on title premium loaded from affect.h ( not change this )
*/   
int get_affect_premium[] = {PRESTIGE_AFFECT_1, PRESTIGE_AFFECT_2, PRESTIGE_AFFECT_3};

/****************
* Settings how hours you need to wait for can buy again potion on shopping-area
*/   
int sPotionTime[] = {12, 12, 12};
/****************
* ItemVnum for potions to check if u have for attached title premium 1/2/3
*/   
int sPotionVnum[] = {55039, 55040, 55041};
/****************
* Price potions in coins value loaded from account.account for potion yellow/pink/white
*/   
int sPotionPrice[] = {50, 50, 50};

int    sTimeDuratingBonus[] = {60*60*24*365};   
/****************
* Table with bonus name affect ( if u want to change bonus you can find in enum EPointTypes on char.h other bonus type )
* If u want you can put automatically value from bonus like - POINTS_ATTBONUS_MONSTER = 63 and , 20 is value for bonus monster apply
*/   
int pTitleBonus_1[] = {POINT_MAX_HP, 1500};
int pTitleBonus_2[] = {POINT_ATTBONUS_HUMAN, 10};
int pTitleBonus_3[] = {POINT_ATTBONUS_MONSTER, 20};

const char* sPotionFlag[] = {"title.getTimePotions_1", "title.getTimePotions_2", "title.getTimePotions_3"}; // Do not change anything here

/****************
* Settings for translate
*/   
const char* requirements[] = {
                                    "[Unvan Sistemi] Bu unvan icin en az %u yanga sahip olmalisin.",
                                    "[Unvan Sistemi] Bu unvan icin en az %u level olmalisin.",
                                    "[Unvan Sistemi] Bu unvan icin en az %u dakika oynamis olmalisin."};                           
const char* title_translate[] = {
                                    "[Unvan Sistemi] Yeni bir iksir satin almak icin %u saat beklemelisin.",
                                    "[Unvan Sistemi] Hesabinda yeterli Ejderha Parası yok.",
                                    "[Unvan Sistemi] Bonus premium teslim alinmistir. Unvan yok olmustur.",
                                    "[Unvan Sistemi] Premium unvan silindi!, x1 Sari iksir iade edildi!",
                                    "[Unvan Sistemi] Premium unvan silindi!, x1 Pembe iksir iade edildi!",                           
                                    "[Unvan Sistemi] Premium unvan silindi!, x1 Beyaz iksir iade edildi!",
                                    "[Unvan Sistemi] Donusumler icin premium bir basliginiz yok!",
                                    "[Unvan Sistemi] Zate bir premium unvana sahipiniz. Bu islemi gerceklestiremezsiniz.",
                                    "[Unvan Sistemi] Zaten bu unvana sahipsin.",
                                    "[Unvan Sistemi] Bu unvan icin x1 Sari iksir'e sahip olmalisin. Nesne Marketten ya da bosslardan bulabilirsin.",
                                    "[Unvan Sistemi] Bu unvan icin x1 Pembe iksir'e sahip olmalisin. Nesne Marketten ya da bosslardan bulabilirsin.",
                                    "[Unvan Sistemi] Bu unvan icin x1 Beyaz iksir'e sahip olmalisin. Nesne Marketten ya da bosslardan bulabilirsin.",
                                    "[Unvan Sistemi] Unvanin silindi. Tekrar gorusmek uzere."};                       

bool TitleManager::TransformTitle(LPCHARACTER ch)
{
    if (NULL == ch)
        return false;

    if (!ch->IsPC())
        return false;
    
    switch (ch->GetRealTitle())
    {
        case 17:   
            if (ch->FindAffect(get_affect_premium[0]))
            {
                ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[2]);       
                ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[3]);
                ch->RemoveAffect(get_affect_premium[0]);   
                ch->UpdateTitle(- ch->GetRealTitle());
                ch->AutoGiveItem(sPotionVnum[0]);   
            }
            else if (!ch->FindAffect(get_affect_premium[0])){
                return false; ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[6]);}
                break;
        case 18:   
            if (ch->FindAffect(get_affect_premium[1]))
            {
                ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[2]);       
                ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[4]);
                ch->RemoveAffect(get_affect_premium[1]);   
                ch->UpdateTitle(- ch->GetRealTitle());
                ch->AutoGiveItem(sPotionVnum[1]);   
            }
            else if (!ch->FindAffect(get_affect_premium[0])){
                return false; ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[6]);}
                break;
        case 19:   
            if (ch->FindAffect(get_affect_premium[2]))
            {
                ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[2]);       
                ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[5]);
                ch->RemoveAffect(get_affect_premium[2]);   
                ch->UpdateTitle(- ch->GetRealTitle());
                ch->AutoGiveItem(sPotionVnum[2]);   
            }
            else if (!ch->FindAffect(get_affect_premium[0])){
                return false; ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[6]);}
                break;
        }       
}       
                                    
void TitleManager::BuyPotion(LPCHARACTER ch, const char* mPotion)
{
    if (NULL == ch)
        return;

    if (!ch->IsPC())
        return;

    if (!*mPotion)
    {   
        return;
    }
/****************
* Argument first
*/
    if (!strcmp(mPotion, "buy_potion_1"))
    {   
        std::auto_ptr<SQLMsg> pMsg(DBManager::instance().DirectQuery("SELECT coins FROM account.account WHERE id = %u", ch->GetDesc()->GetAccountTable().id));
        quest::PC* pPC = quest::CQuestManager::instance().GetPC(ch->GetPlayerID());   
        if (pMsg->Get()->uiNumRows == x[0])    return;
            MYSQL_ROW row = mysql_fetch_row(pMsg->Get()->pSQLResult);
            str_to_number(x[0], row[0]);
    #ifdef ENABLE_CHECK_TIME_POTIONS       
        int szTime = pPC->GetFlag(sPotionFlag[0]);
        if (get_global_time() - szTime < sPotionTime[0] * 60 * 60)   
        {   
            ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[0], sPotionTime[2]);    return;   
        }       
    #endif   
        if (x[0] < sPotionPrice[0])    {
            ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[1]);    return;    }
        else
            ch->AutoGiveItem(sPotionVnum[0]);
            DBManager::instance().DirectQuery("UPDATE account.account SET coins = coins - %u WHERE id = %u", sPotionPrice[0], ch->GetDesc()->GetAccountTable().id);
        #ifdef ENABLE_CHECK_TIME_POTIONS       
            pPC->SetFlag(sPotionFlag[0], get_global_time());
        #endif       
        
        #ifdef ENABLE_GIVE_JCOINS
            DBManager::instance().DirectQuery("UPDATE account.account SET jcoins = jcoins + %u WHERE id = %u", sPotionPrice[0], ch->GetDesc()->GetAccountTable().id);   
        #endif           
        }
//}       
/****************
* Argument two
*/
    if (!strcmp(mPotion, "buy_potion_2"))
    {
        std::auto_ptr<SQLMsg> pMsg(DBManager::instance().DirectQuery("SELECT coins FROM account.account WHERE id = %u", ch->GetDesc()->GetAccountTable().id));
        quest::PC* pPC = quest::CQuestManager::instance().GetPC(ch->GetPlayerID());   
        if (pMsg->Get()->uiNumRows == x[1])    return;
            MYSQL_ROW row = mysql_fetch_row(pMsg->Get()->pSQLResult);
            str_to_number(x[1], row[0]);
    #ifdef ENABLE_CHECK_TIME_POTIONS       
        int szTime = pPC->GetFlag(sPotionFlag[0]);
        if (get_global_time() - szTime < sPotionTime[0] * 60 * 60)   
        {   
            ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[0], sPotionTime[2]);    return;   
        }       
    #endif   
        if (x[1] < sPotionPrice[1])    {
            ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[1]);    return;    }
        else
            ch->AutoGiveItem(sPotionVnum[1]);
            DBManager::instance().DirectQuery("UPDATE account.account SET coins = coins - %u WHERE id = %u", sPotionPrice[1], ch->GetDesc()->GetAccountTable().id);
        #ifdef ENABLE_CHECK_TIME_POTIONS       
            pPC->SetFlag(sPotionFlag[1], get_global_time());
        #endif       
        
        #ifdef ENABLE_GIVE_JCOINS
            DBManager::instance().DirectQuery("UPDATE account.account SET jcoins = jcoins + %u WHERE id = %u", sPotionPrice[1], ch->GetDesc()->GetAccountTable().id);   
        #endif       
    }   
//}   
/****************
* Argument three
*/   
    if (!strcmp(mPotion, "buy_potion_3"))
    {
        std::auto_ptr<SQLMsg> pMsg(DBManager::instance().DirectQuery("SELECT coins FROM account.account WHERE id = %u", ch->GetDesc()->GetAccountTable().id));
        quest::PC* pPC = quest::CQuestManager::instance().GetPC(ch->GetPlayerID());   
        if (pMsg->Get()->uiNumRows == x[2])    return;
            MYSQL_ROW row = mysql_fetch_row(pMsg->Get()->pSQLResult);
            str_to_number(x[2], row[0]);
    #ifdef ENABLE_CHECK_TIME_POTIONS       
        int szTime = pPC->GetFlag(sPotionFlag[0]);
        if (get_global_time() - szTime < sPotionTime[0] * 60 * 60)   
        {   
            ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[0], sPotionTime[2]);    return;   
        }       
    #endif   
        if (x[2] < sPotionPrice[2])    {
            ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[1]);    return;    }
        else
            ch->AutoGiveItem(sPotionVnum[2]);
            DBManager::instance().DirectQuery("UPDATE account.account SET coins = coins - %u WHERE id = %u", sPotionPrice[2], ch->GetDesc()->GetAccountTable().id);
        #ifdef ENABLE_CHECK_TIME_POTIONS       
            pPC->SetFlag(sPotionFlag[0], get_global_time());
        #endif       
        
        #ifdef ENABLE_GIVE_JCOINS
            DBManager::instance().DirectQuery("UPDATE account.account SET jcoins = jcoins + %u WHERE id = %u", sPotionPrice[2], ch->GetDesc()->GetAccountTable().id);   
        #endif   
    }
}   

static bool GetPlayTime(LPCHARACTER ch, int sTime)
{
    if (NULL == ch)
        return false;

    if (!ch->IsPC())
        return false;
    
    if (ch->GetRealPoint(POINT_PLAYTIME) < sTime)
    {
        switch (sTime)
        {
            case need_minutes_1:        case need_minutes_2:    case need_minutes_3:    case need_minutes_4:
            case need_minutes_5:        case need_minutes_6:    case need_minutes_7:    case need_minutes_8:       
            case need_minutes_9:        case need_minutes_10:    case need_minutes_11:    case need_minutes_12:       
            case need_minutes_13:        case need_minutes_14:    case need_minutes_15:    case need_minutes_16:
                ch->ChatPacket(CHAT_TYPE_NOTICE, requirements[2], sTime);
                return false;   
        }
    }
        return true;
}   
    
static bool GetLevel(LPCHARACTER ch, int sLevel)
{
    if (NULL == ch)
        return false;

    if (!ch->IsPC())
        return false;
    
    if (ch->GetLevel() < sLevel)
    {
        switch (sLevel)
        {
            case need_level_1:        case need_level_2:    case need_level_3:    case need_level_4:
            case need_level_5:        case need_level_6:    case need_level_7:    case need_level_8:       
            case need_level_9:        case need_level_10:    case need_level_11:    case need_level_12:       
            case need_level_13:        case need_level_14:    case need_level_15:    case need_level_16:
                ch->ChatPacket(CHAT_TYPE_NOTICE, requirements[1], sLevel);
                return false;   
        }
    }
        return true;
}

static bool GetMoney(LPCHARACTER ch, int sGold)
{
    if (NULL == ch)
        return false;

    if (!ch->IsPC())
        return false;
    
    if (ch->GetGold() < sGold)
    {
        switch (sGold)
        {
            case need_gold_1:    case need_gold_2:    case need_gold_3:    case need_gold_4:
            case need_gold_5:    case need_gold_6:    case need_gold_7:    case need_gold_8:
            case need_gold_9:    case need_gold_10:    case need_gold_11:    case need_gold_12:
            case need_gold_13:    case need_gold_14:    case need_gold_15:    case need_gold_16:
                ch->ChatPacket(CHAT_TYPE_NOTICE, requirements[0], sGold);
                return false;   
        }
    }
        return true;
}

static bool GetTitlePremium(LPCHARACTER ch)
{
    if (NULL == ch)
        return false;

    if (!ch->IsPC())
        return false;
    
    switch (ch->GetRealTitle())
    {
        case 17:   
        case 18:
        case 19:
            ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[7]);   
            return false;
    }
        return true;   
}

static bool GetTitleActual(LPCHARACTER ch, int arg1)
{
    if (NULL == ch)
        return false;

    if (!ch->IsPC())
        return false;
    
    if (ch->GetRealTitle() == arg1)
    {       
        switch (arg1)
        {
            case 1:        case 2:        case 3:        case 4:   
            case 5:        case 6:        case 7:        case 8:   
            case 9:        case 10:    case 11:    case 12:   
            case 13:    case 14:    case 15:    case 16:   
            case 17:    case 18:    case 19:           
                ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[8]);
                return false;
        }
    }
        return true;   
}

bool TitleManager::UpdateTitle(LPCHARACTER ch, int changeTitle, int changeMoney)
{
    if (changeTitle > 0 && changeMoney > 0)
    {
        ch->UpdateTitle(changeTitle - ch->GetTitle());
        ch->PointChange(POINT_GOLD, - changeMoney);   
    }
    else if (changeTitle > 0 && changeMoney < 1)
    {
        ch->UpdateTitle(changeTitle - ch->GetTitle());
    }   
}

void TitleManager::SetAffect(LPCHARACTER ch, const char* valueAffect)
{
    if (NULL == ch)
        return;

    if (!ch->IsPC())
        return;
/****************
* [Premium Title I]
*/               
    if (!strcmp(valueAffect, "send_premium_1"))
    {
        if (ch->CountSpecifyItem(sPotionVnum[0]))
        {   
            ch->AddAffect(get_affect_premium[0], pTitleBonus_1[0], pTitleBonus_1[1], 0, sTimeDuratingBonus[0], 0, true);
            ch->RemoveSpecifyItem(sPotionVnum[0], 1);   
            UpdateTitle(ch, sTitle[17], 0);   
        }       
        else   
            ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[9]);
            return;   
    }   
/****************
* [Premium Title II]
*/       
    if (!strcmp(valueAffect, "send_premium_2"))
    {
        if (ch->CountSpecifyItem(sPotionVnum[1]))
        {       
            ch->AddAffect(get_affect_premium[1], pTitleBonus_2[0], pTitleBonus_2[1], 0, sTimeDuratingBonus[0], 0, true);
            ch->RemoveSpecifyItem(sPotionVnum[1], 1);   
            UpdateTitle(ch, sTitle[18], 0);
        }       
        else   
            ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[10]);
            return;   
    }   
/****************
* [Premium Title III]
*/       
    if (!strcmp(valueAffect, "send_premium_3"))
    {
        if (ch->CountSpecifyItem(sPotionVnum[2]))
        {       
                ch->AddAffect(get_affect_premium[2], pTitleBonus_3[0], pTitleBonus_3[1], 0, sTimeDuratingBonus[0], 0, true);
                ch->RemoveSpecifyItem(sPotionVnum[2], 1);   
                UpdateTitle(ch, sTitle[19], 0);
        }       
        else   
            ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[11]);
            return;   
    }   
}   
bool TitleManager::SetTitle(LPCHARACTER ch, const char* pTitle)
{
    if (NULL == ch)
        return false;

    if (!ch->IsPC())
        return false;

    if (!*pTitle)
    {   
        return false;
    }
/****************
* Title  free
*/
    if (!strcmp(pTitle, "disable")    && (GetTitleActual(ch, sTitle[17]) == true) && (GetTitleActual(ch, sTitle[18]) == true) && (GetTitleActual(ch, sTitle[19]) == true))   
    {       
        ch->UpdateTitle(- ch->GetTitle());   
        ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[12]);
    }
    
    if (!strcmp(pTitle, "title1") && (GetLevel(ch, need_level_1) == true) && (GetPlayTime(ch, need_minutes_1) == true) && (GetMoney(ch, need_gold_1) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[1]) == true))   
    {   
            UpdateTitle(ch, sTitle[1], need_gold_1);
    }
    
    if (!strcmp(pTitle, "title2") && (GetLevel(ch, need_level_2) == true) && (GetPlayTime(ch, need_minutes_2) == true) && (GetMoney(ch, need_gold_2) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[2]) == true))   
    {
            UpdateTitle(ch, sTitle[2], need_gold_2);
    }   
    
    if (!strcmp(pTitle, "title3") && (GetLevel(ch, need_level_3) == true) && (GetPlayTime(ch, need_minutes_3) == true) && (GetMoney(ch, need_gold_3) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[3]) == true))   
    {       
            UpdateTitle(ch, sTitle[3], need_gold_3);
    }   
    
    if (!strcmp(pTitle, "title4") && (GetLevel(ch, need_level_4) == true) && (GetPlayTime(ch, need_minutes_4) == true) && (GetMoney(ch, need_gold_4) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[4]) == true))   
    {
            UpdateTitle(ch, sTitle[4], need_gold_4);
    }   
    
    if (!strcmp(pTitle, "title5") && (GetLevel(ch, need_level_5) == true) && (GetPlayTime(ch, need_minutes_5) == true) && (GetMoney(ch, need_gold_5) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[5]) == true))   
    {
            UpdateTitle(ch, sTitle[5], need_gold_5);
    }   
    
    if (!strcmp(pTitle, "title6") && (GetLevel(ch, need_level_6) == true) && (GetPlayTime(ch, need_minutes_6) == true) && (GetMoney(ch, need_gold_6) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[6]) == true))   
    {
            UpdateTitle(ch, sTitle[6], need_gold_6);
    }
    
    if (!strcmp(pTitle, "title7") && (GetLevel(ch, need_level_7) == true) && (GetPlayTime(ch, need_minutes_7) == true) && (GetMoney(ch, need_gold_7) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[7]) == true))   
    {
            UpdateTitle(ch, sTitle[7], need_gold_7);
    }   
    
    if (!strcmp(pTitle, "title8") && (GetLevel(ch, need_level_8) == true) && (GetPlayTime(ch, need_minutes_8) == true) && (GetMoney(ch, need_gold_8) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[8]) == true))   
    {
            UpdateTitle(ch, sTitle[8], need_gold_8);
    }
    
    if (!strcmp(pTitle, "title9") && (GetLevel(ch, need_level_9) == true) && (GetPlayTime(ch, need_minutes_9) == true) && (GetMoney(ch, need_gold_9) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[9]) == true))   
    {
            UpdateTitle(ch, sTitle[9], need_gold_9);
    }   
    
    if (!strcmp(pTitle, "title10") && (GetLevel(ch, need_level_10) == true) && (GetPlayTime(ch, need_minutes_10) == true) && (GetMoney(ch, need_gold_10) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[10]) == true))   
    {
            UpdateTitle(ch, sTitle[10], need_gold_10);
    }
    
    if (!strcmp(pTitle, "title11") && (GetLevel(ch, need_level_11) == true) && (GetPlayTime(ch, need_minutes_11) == true) && (GetMoney(ch, need_gold_11) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[11]) == true))   
    {
            UpdateTitle(ch, sTitle[11], need_gold_11);
    }   
    
    if (!strcmp(pTitle, "title12") && (GetLevel(ch, need_level_12) == true) && (GetPlayTime(ch, need_minutes_12) == true) && (GetMoney(ch, need_gold_12) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[12]) == true))   
    {
            UpdateTitle(ch, sTitle[12], need_gold_12);
    }
    
    if (!strcmp(pTitle, "title13") && (GetLevel(ch, need_level_13) == true) && (GetPlayTime(ch, need_minutes_13) == true) && (GetMoney(ch, need_gold_13) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[13]) == true))   
    {
            UpdateTitle(ch, sTitle[13], need_gold_13);
    }   
    
    if (!strcmp(pTitle, "title14") && (GetLevel(ch, need_level_14) == true) && (GetPlayTime(ch, need_minutes_14) == true) && (GetMoney(ch, need_gold_14) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[14]) == true))   
    {
            UpdateTitle(ch, sTitle[14], need_gold_14);
    }   
    
    if (!strcmp(pTitle, "title15") && (GetLevel(ch, need_level_15) == true) && (GetPlayTime(ch, need_minutes_15) == true) && (GetMoney(ch, need_gold_15) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[15]) == true))   
    {
            UpdateTitle(ch, sTitle[15], need_gold_15);
    }   
    
    if (!strcmp(pTitle, "title16") && (GetLevel(ch, need_level_16) == true) && (GetPlayTime(ch, need_minutes_16) == true) && (GetMoney(ch, need_gold_16) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[16]) == true))   
    {
            UpdateTitle(ch, sTitle[16], need_gold_16);
    }
/****************
* Title  premium
*/
    if (!strcmp(pTitle, "title17") && (GetTitlePremium(ch) == true))
    {
            SetAffect(ch, "send_premium_1");
    }   
    
    if (!strcmp(pTitle, "title18") && (GetTitlePremium(ch) == true))   
    {
            SetAffect(ch, "send_premium_2");
    }   
    
    if (!strcmp(pTitle, "title19") && (GetTitlePremium(ch) == true))   
    {
            SetAffect(ch, "send_premium_3");
    }       
}
 
İstersen bunu bi deneyebilirsin birde senin kullandığın eski olabilir mi ? date farklı
Linkleri görebilmek için giriş yap veya kayıt ol.
buradakini indirip sendeki ile karşılaştırabilirsin.

C++:
/*********************************************************************
* date        : 2016.07.16
* file        : title.cpp
* author      : VegaS
* description :
*/
#include "stdafx.h"
#include "constants.h"
#include "utils.h"
#include "desc.h"
#include "char.h"
#include "db.h"
#include "config.h"
#include "title.h"
#include "affect.h"
#include "item.h"
#include "questmanager.h"
/*********************************************************************
*/
TitleManager::TitleManager()
{
}

TitleManager::~TitleManager()
{
}
/*****************************
* Set requirements gold(yang) for title
*/
#define need_gold_1        500000
#define need_gold_2        800000
#define need_gold_3        1500000
#define need_gold_4        1800000
#define need_gold_5        2500000
#define need_gold_6        3000000
#define need_gold_7        4000000
#define need_gold_8        5000000
#define need_gold_9        10000000
#define need_gold_10    15000000
#define need_gold_11    25000000
#define need_gold_12    50000000
#define need_gold_13    75000000
#define need_gold_14    100000000
#define need_gold_15    150000000
#define need_gold_16    300000000

/*****************************
* Set requirements level for title
*/
#define need_level_1    7
#define need_level_2    14
#define need_level_3    21
#define need_level_4    28
#define need_level_5    35
#define need_level_6    42
#define need_level_7    49
#define need_level_8    56
#define need_level_9    63
#define need_level_10    70
#define need_level_11    77
#define need_level_12    84  
#define need_level_13    91
#define need_level_14    98
#define need_level_15    100
#define need_level_16    103  

/*****************************
* Set requirements level for playTime on character
*/
#define need_minutes_1    5
#define need_minutes_2    15
#define need_minutes_3    40
#define need_minutes_4    50                                                  
#define need_minutes_5    60
#define need_minutes_6    75
#define need_minutes_7    90
#define need_minutes_8    110
#define need_minutes_9    130
#define need_minutes_10    150
#define need_minutes_11    170
#define need_minutes_12    200
#define need_minutes_13    500
#define need_minutes_14    700
#define need_minutes_15    1200
#define need_minutes_16    1500  
#include <boost/unordered_map.hpp>
#include "../../common/stl.h"
/****************************************************************************************************************************************************************************************
* Get enable options
*/
#define ENABLE_CHECK_TIME_POTIONS // If you want to make enable check for buy potions with time
//#define ENABLE_GIVE_JCOINS // Enable to give you jcoins loadead from account.account(jcoins [row]) example: if u buy a potion yeelow cost 50coins, when you buy give make: -50 cash and give +50 jcoins

int sTitle[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19}; // Do not change anything here

unsigned int x[] = {0, 0, 0}; // Do not change anything here
/****************
* Get type affect on title premium loaded from affect.h ( not change this )
*/  
int get_affect_premium[] = {PRESTIGE_AFFECT_1, PRESTIGE_AFFECT_2, PRESTIGE_AFFECT_3};

/****************
* Settings how hours you need to wait for can buy again potion on shopping-area
*/  
int sPotionTime[] = {12, 12, 12};
/****************
* ItemVnum for potions to check if u have for attached title premium 1/2/3
*/  
int sPotionVnum[] = {55001, 55002, 55003};
/****************
* Price potions in cash value loaded from account.account for potion yellow/pink/white
*/  
unsigned int sPotionPrice[] = {50, 100, 150};

int    sTimeDuratingBonus[] = {60*60*24*365};  
/****************
* Table with bonus name affect ( if u want to change bonus you can find in enum EPointTypes on char.h other bonus type )
* If u want you can put automatically value from bonus like - POINTS_ATTBONUS_MONSTER = 63 and , 20 is value for bonus monster apply
*/  
int pTitleBonus_1[] = {POINT_MAX_HP, 3000};
int pTitleBonus_2[] = {POINT_ATTBONUS_MONSTER, 20};
int pTitleBonus_3[] = {POINT_CRITICAL_PCT, 15};

const char* sPotionFlag[] = {"title.getTimePotions_1", "title.getTimePotions_2", "title.getTimePotions_3"}; // Do not change anything here

/****************
* Settings for translate
*/  
const char* requirements[] = {
                                    "<Ünvan Sistemi> Ünvan için %u yang'n olması gerekiyor!",
                                    "<Ünvan Sistemi> Ünvan için seviyen %u olması gerekiyor!",
                                    "<Ünvan Sistemi> Ünvan için oyun süren %u olması gerekiyor!"};
const char* title_translate[] = {
                                    "<Ünvan Sistemi> Tekrar özel iksir almak için %u beklemelisiniz!",
                                    "<Ünvan Sistemi> Yeterli ejderha parasına sahip değilsin!",
                                    "<Ünvan Sistemi> Özellik ve ünvan yok oldu!",
                                    "<Ünvan Sistemi> Ünvan silindi!, x1 Sarı büyülü iksir iade edildi!",
                                    "<Ünvan Sistemi> Ünvan silindi!, x1 Pembe büyülü iksir iade edildi!",
                                    "<Ünvan Sistemi> Ünvan silindi!, x1 Beyaz büyülü iksir iade edildi!",
                                    "<Ünvan Sistemi> Dönüşüm için yetersiz ünvan!",
                                    "<Ünvan Sistemi> Ekli olan bir ünvan mevcut!",
                                    "<Ünvan Sistemi> Zaten bu ünvana sahipsin!",
                                    "<Ünvan Sistemi> x1 Sarı büyülü iksir gerekli!",
                                    "<Ünvan Sistemi> x1 Pembe büyülü iksir gerekli!",
                                    "<Ünvan Sistemi> x1 Beyaz büyülü iksir gerekli!",
                                    "<Ünvan Sistemi> Ünvanın silindi!"};

bool TitleManager::TransformTitle(LPCHARACTER ch)
{
    if (NULL == ch)
        return false;

    if (!ch->IsPC())
        return false;
   
    switch (ch->GetRealTitle())
    {
        case 17:  
            if (ch->FindAffect(get_affect_premium[0]))
            {
                ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[2]);      
                ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[3]);
                ch->RemoveAffect(get_affect_premium[0]);  
                ch->UpdateTitle(- ch->GetRealTitle());
                ch->AutoGiveItem(sPotionVnum[0]);  
            }
            else if (!ch->FindAffect(get_affect_premium[0])){
                return false; ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[6]);}
                break;
        case 18:  
            if (ch->FindAffect(get_affect_premium[1]))
            {
                ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[2]);      
                ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[4]);
                ch->RemoveAffect(get_affect_premium[1]);  
                ch->UpdateTitle(- ch->GetRealTitle());
                ch->AutoGiveItem(sPotionVnum[1]);  
            }
            else if (!ch->FindAffect(get_affect_premium[0])){
                return false; ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[6]);}
                break;
        case 19:  
            if (ch->FindAffect(get_affect_premium[2]))
            {
                ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[2]);      
                ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[5]);
                ch->RemoveAffect(get_affect_premium[2]);  
                ch->UpdateTitle(- ch->GetRealTitle());
                ch->AutoGiveItem(sPotionVnum[2]);  
            }
            else if (!ch->FindAffect(get_affect_premium[0])){
                return false; ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[6]);}
                break;
        }
    return true;
}

void TitleManager::BuyPotion(LPCHARACTER ch, const char* mPotion)
{
    if (NULL == ch)
        return;

    if (!ch->IsPC())
        return;

    if (!*mPotion)
    {  
        return;
    }
/****************
* Argument first
*/
    if (!strcmp(mPotion, "buy_potion_1"))
    {  
        std::unique_ptr<SQLMsg> pMsg(DBManager::instance().DirectQuery("SELECT cash FROM account.account WHERE id = %u", ch->GetDesc()->GetAccountTable().id));
        quest::PC* pPC = quest::CQuestManager::instance().GetPC(ch->GetPlayerID());  
        if (pMsg->Get()->uiNumRows == x[0])    return;
            MYSQL_ROW row = mysql_fetch_row(pMsg->Get()->pSQLResult);
            str_to_number(x[0], row[0]);
    #ifdef ENABLE_CHECK_TIME_POTIONS      
        int szTime = pPC->GetFlag(sPotionFlag[0]);
        if (get_global_time() - szTime < sPotionTime[0] * 60 * 60)  
        {  
            ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[0], sPotionTime[2]);    return;  
        }      
    #endif  
        if (x[0] < sPotionPrice[0])
        {
            ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[1]);    return;
        }
        else
        {
            ch->AutoGiveItem(sPotionVnum[0]);
            DBManager::instance().DirectQuery("UPDATE account.account SET cash = cash - %u WHERE id = %u", sPotionPrice[0], ch->GetDesc()->GetAccountTable().id);
        #ifdef ENABLE_CHECK_TIME_POTIONS      
            pPC->SetFlag(sPotionFlag[0], get_global_time());
        #endif
       
        #ifdef ENABLE_GIVE_JCOINS
            DBManager::instance().DirectQuery("UPDATE account.account SET jcoins = jcoins + %u WHERE id = %u", sPotionPrice[0], ch->GetDesc()->GetAccountTable().id);  
        #endif
        }
    }
/****************
* Argument two
*/
    if (!strcmp(mPotion, "buy_potion_2"))
    {
        std::unique_ptr<SQLMsg> pMsg(DBManager::instance().DirectQuery("SELECT cash FROM account.account WHERE id = %u", ch->GetDesc()->GetAccountTable().id));
        quest::PC* pPC = quest::CQuestManager::instance().GetPC(ch->GetPlayerID());  
        if (pMsg->Get()->uiNumRows == x[1])    return;
            MYSQL_ROW row = mysql_fetch_row(pMsg->Get()->pSQLResult);
            str_to_number(x[1], row[0]);
    #ifdef ENABLE_CHECK_TIME_POTIONS      
        int szTime = pPC->GetFlag(sPotionFlag[0]);
        if (get_global_time() - szTime < sPotionTime[0] * 60 * 60)  
        {  
            ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[0], sPotionTime[2]);    return;  
        }      
    #endif  
        if (x[1] < sPotionPrice[1])
        {
            ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[1]);    return;
        }
        else
        {
            ch->AutoGiveItem(sPotionVnum[1]);
            DBManager::instance().DirectQuery("UPDATE account.account SET cash = cash - %u WHERE id = %u", sPotionPrice[1], ch->GetDesc()->GetAccountTable().id);
        #ifdef ENABLE_CHECK_TIME_POTIONS
            pPC->SetFlag(sPotionFlag[1], get_global_time());
        #endif      
       
        #ifdef ENABLE_GIVE_JCOINS
            DBManager::instance().DirectQuery("UPDATE account.account SET jcoins = jcoins + %u WHERE id = %u", sPotionPrice[1], ch->GetDesc()->GetAccountTable().id);  
        #endif
        }
    }
/****************
* Argument three
*/  
    if (!strcmp(mPotion, "buy_potion_3"))
    {
        std::unique_ptr<SQLMsg> pMsg(DBManager::instance().DirectQuery("SELECT cash FROM account.account WHERE id = %u", ch->GetDesc()->GetAccountTable().id));
        quest::PC* pPC = quest::CQuestManager::instance().GetPC(ch->GetPlayerID());  
        if (pMsg->Get()->uiNumRows == x[2])    return;
            MYSQL_ROW row = mysql_fetch_row(pMsg->Get()->pSQLResult);
            str_to_number(x[2], row[0]);
    #ifdef ENABLE_CHECK_TIME_POTIONS      
        int szTime = pPC->GetFlag(sPotionFlag[0]);
        if (get_global_time() - szTime < sPotionTime[0] * 60 * 60)  
        {  
            ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[0], sPotionTime[2]);    return;  
        }      
    #endif  
        if (x[2] < sPotionPrice[2])
        {
            ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[1]);    return;
        }
        else
        {
            ch->AutoGiveItem(sPotionVnum[2]);
            DBManager::instance().DirectQuery("UPDATE account.account SET cash = cash - %u WHERE id = %u", sPotionPrice[2], ch->GetDesc()->GetAccountTable().id);
        #ifdef ENABLE_CHECK_TIME_POTIONS      
            pPC->SetFlag(sPotionFlag[0], get_global_time());
        #endif      
       
        #ifdef ENABLE_GIVE_JCOINS
            DBManager::instance().DirectQuery("UPDATE account.account SET jcoins = jcoins + %u WHERE id = %u", sPotionPrice[2], ch->GetDesc()->GetAccountTable().id);  
        #endif
        }
    }
}

static bool GetPlayTime(LPCHARACTER ch, int sTime)
{
    if (NULL == ch)
        return false;

    if (!ch->IsPC())
        return false;
   
    if (ch->GetRealPoint(POINT_PLAYTIME) < sTime)
    {
        switch (sTime)
        {
            case need_minutes_1:        case need_minutes_2:    case need_minutes_3:    case need_minutes_4:
            case need_minutes_5:        case need_minutes_6:    case need_minutes_7:    case need_minutes_8:      
            case need_minutes_9:        case need_minutes_10:    case need_minutes_11:    case need_minutes_12:      
            case need_minutes_13:        case need_minutes_14:    case need_minutes_15:    case need_minutes_16:
                ch->ChatPacket(CHAT_TYPE_NOTICE, requirements[2], sTime);
                return false;  
        }
    }
        return true;
}  
   
static bool GetLevel(LPCHARACTER ch, int sLevel)
{
    if (NULL == ch)
        return false;

    if (!ch->IsPC())
        return false;
   
    if (ch->GetLevel() < sLevel)
    {
        switch (sLevel)
        {
            case need_level_1:        case need_level_2:    case need_level_3:    case need_level_4:
            case need_level_5:        case need_level_6:    case need_level_7:    case need_level_8:      
            case need_level_9:        case need_level_10:    case need_level_11:    case need_level_12:      
            case need_level_13:        case need_level_14:    case need_level_15:    case need_level_16:
                ch->ChatPacket(CHAT_TYPE_NOTICE, requirements[1], sLevel);
                return false;  
        }
    }
        return true;
}

static bool GetMoney(LPCHARACTER ch, int sGold)
{
    if (NULL == ch)
        return false;

    if (!ch->IsPC())
        return false;
   
    if (ch->GetGold() < sGold)
    {
        switch (sGold)
        {
            case need_gold_1:    case need_gold_2:    case need_gold_3:    case need_gold_4:
            case need_gold_5:    case need_gold_6:    case need_gold_7:    case need_gold_8:
            case need_gold_9:    case need_gold_10:    case need_gold_11:    case need_gold_12:
            case need_gold_13:    case need_gold_14:    case need_gold_15:    case need_gold_16:
                ch->ChatPacket(CHAT_TYPE_NOTICE, requirements[0], sGold);
                return false;  
        }
    }
        return true;
}

static bool GetTitlePremium(LPCHARACTER ch)
{
    if (NULL == ch)
        return false;

    if (!ch->IsPC())
        return false;
   
    switch (ch->GetRealTitle())
    {
        case 17:  
        case 18:
        case 19:
            ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[7]);  
            return false;
    }
        return true;  
}

static bool GetTitleActual(LPCHARACTER ch, int arg1)
{
    if (NULL == ch)
        return false;

    if (!ch->IsPC())
        return false;
   
    if (ch->GetRealTitle() == arg1)
    {      
        switch (arg1)
        {
            case 1:        case 2:        case 3:        case 4:  
            case 5:        case 6:        case 7:        case 8:  
            case 9:        case 10:    case 11:    case 12:  
            case 13:    case 14:    case 15:    case 16:  
            case 17:    case 18:    case 19:          
                ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[8]);
                return false;
        }
    }
        return true;  
}

bool TitleManager::UpdateTitle(LPCHARACTER ch, int changeTitle, int changeMoney)
{

    if (!ch)
        return false;

    if (changeTitle > 0 && changeMoney > 0)
    {
        ch->UpdateTitle(changeTitle - ch->GetTitle());
        ch->PointChange(POINT_GOLD, - changeMoney);  
    }
    else if (changeTitle > 0 && changeMoney < 1)
    {
        ch->UpdateTitle(changeTitle - ch->GetTitle());
    }
    return true;
}

void TitleManager::SetAffect(LPCHARACTER ch, const char* valueAffect)
{
    if (NULL == ch)
        return;

    if (!ch->IsPC())
        return;
/****************
* [Premium Title I]
*/              
    if (!strcmp(valueAffect, "send_premium_1"))
    {
        if (ch->CountSpecifyItem(sPotionVnum[0]))
        {  
            ch->AddAffect(get_affect_premium[0], pTitleBonus_1[0], pTitleBonus_1[1], 0, sTimeDuratingBonus[0], 0, true);
            ch->RemoveSpecifyItem(sPotionVnum[0], 1);  
            UpdateTitle(ch, sTitle[17], 0);  
        }
        else
        {
            ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[9]);
            return;
        }
    }
/****************
* [Premium Title II]
*/      
    if (!strcmp(valueAffect, "send_premium_2"))
    {
        if (ch->CountSpecifyItem(sPotionVnum[1]))
        {      
            ch->AddAffect(get_affect_premium[1], pTitleBonus_2[0], pTitleBonus_2[1], 0, sTimeDuratingBonus[0], 0, true);
            ch->RemoveSpecifyItem(sPotionVnum[1], 1);  
            UpdateTitle(ch, sTitle[18], 0);
        }      
        else
        {
            ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[10]);
            return;
        }
    }
/****************
* [Premium Title III]
*/
    if (!strcmp(valueAffect, "send_premium_3"))
    {
        if (ch->CountSpecifyItem(sPotionVnum[2]))
        {      
                ch->AddAffect(get_affect_premium[2], pTitleBonus_3[0], pTitleBonus_3[1], 0, sTimeDuratingBonus[0], 0, true);
                ch->RemoveSpecifyItem(sPotionVnum[2], 1);  
                UpdateTitle(ch, sTitle[19], 0);
        }      
        else
        {
            ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[11]);
            return;
        }
    }
}
bool TitleManager::SetTitle(LPCHARACTER ch, const char* pTitle)
{
    if (NULL == ch)
        return false;

    if (!ch->IsPC())
        return false;

    if (!*pTitle)
    {  
        return false;
    }
/****************
* Title  free
*/
    if (!strcmp(pTitle, "disable")    && (GetTitleActual(ch, sTitle[17]) == true) && (GetTitleActual(ch, sTitle[18]) == true) && (GetTitleActual(ch, sTitle[19]) == true))  
    {      
        ch->UpdateTitle(- ch->GetTitle());  
        ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[12]);
    }
   
    if (!strcmp(pTitle, "title1") && (GetLevel(ch, need_level_1) == true) && (GetPlayTime(ch, need_minutes_1) == true) && (GetMoney(ch, need_gold_1) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[1]) == true))  
    {  
            UpdateTitle(ch, sTitle[1], need_gold_1);
    }
   
    if (!strcmp(pTitle, "title2") && (GetLevel(ch, need_level_2) == true) && (GetPlayTime(ch, need_minutes_2) == true) && (GetMoney(ch, need_gold_2) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[2]) == true))  
    {
            UpdateTitle(ch, sTitle[2], need_gold_2);
    }  
   
    if (!strcmp(pTitle, "title3") && (GetLevel(ch, need_level_3) == true) && (GetPlayTime(ch, need_minutes_3) == true) && (GetMoney(ch, need_gold_3) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[3]) == true))  
    {      
            UpdateTitle(ch, sTitle[3], need_gold_3);
    }  
   
    if (!strcmp(pTitle, "title4") && (GetLevel(ch, need_level_4) == true) && (GetPlayTime(ch, need_minutes_4) == true) && (GetMoney(ch, need_gold_4) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[4]) == true))  
    {
            UpdateTitle(ch, sTitle[4], need_gold_4);
    }  
   
    if (!strcmp(pTitle, "title5") && (GetLevel(ch, need_level_5) == true) && (GetPlayTime(ch, need_minutes_5) == true) && (GetMoney(ch, need_gold_5) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[5]) == true))  
    {
            UpdateTitle(ch, sTitle[5], need_gold_5);
    }  
   
    if (!strcmp(pTitle, "title6") && (GetLevel(ch, need_level_6) == true) && (GetPlayTime(ch, need_minutes_6) == true) && (GetMoney(ch, need_gold_6) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[6]) == true))  
    {
            UpdateTitle(ch, sTitle[6], need_gold_6);
    }
   
    if (!strcmp(pTitle, "title7") && (GetLevel(ch, need_level_7) == true) && (GetPlayTime(ch, need_minutes_7) == true) && (GetMoney(ch, need_gold_7) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[7]) == true))  
    {
            UpdateTitle(ch, sTitle[7], need_gold_7);
    }  
   
    if (!strcmp(pTitle, "title8") && (GetLevel(ch, need_level_8) == true) && (GetPlayTime(ch, need_minutes_8) == true) && (GetMoney(ch, need_gold_8) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[8]) == true))  
    {
            UpdateTitle(ch, sTitle[8], need_gold_8);
    }
   
    if (!strcmp(pTitle, "title9") && (GetLevel(ch, need_level_9) == true) && (GetPlayTime(ch, need_minutes_9) == true) && (GetMoney(ch, need_gold_9) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[9]) == true))  
    {
            UpdateTitle(ch, sTitle[9], need_gold_9);
    }  
   
    if (!strcmp(pTitle, "title10") && (GetLevel(ch, need_level_10) == true) && (GetPlayTime(ch, need_minutes_10) == true) && (GetMoney(ch, need_gold_10) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[10]) == true))  
    {
            UpdateTitle(ch, sTitle[10], need_gold_10);
    }
   
    if (!strcmp(pTitle, "title11") && (GetLevel(ch, need_level_11) == true) && (GetPlayTime(ch, need_minutes_11) == true) && (GetMoney(ch, need_gold_11) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[11]) == true))  
    {
            UpdateTitle(ch, sTitle[11], need_gold_11);
    }  
   
    if (!strcmp(pTitle, "title12") && (GetLevel(ch, need_level_12) == true) && (GetPlayTime(ch, need_minutes_12) == true) && (GetMoney(ch, need_gold_12) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[12]) == true))  
    {
            UpdateTitle(ch, sTitle[12], need_gold_12);
    }
   
    if (!strcmp(pTitle, "title13") && (GetLevel(ch, need_level_13) == true) && (GetPlayTime(ch, need_minutes_13) == true) && (GetMoney(ch, need_gold_13) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[13]) == true))  
    {
            UpdateTitle(ch, sTitle[13], need_gold_13);
    }  
   
    if (!strcmp(pTitle, "title14") && (GetLevel(ch, need_level_14) == true) && (GetPlayTime(ch, need_minutes_14) == true) && (GetMoney(ch, need_gold_14) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[14]) == true))  
    {
            UpdateTitle(ch, sTitle[14], need_gold_14);
    }  
   
    if (!strcmp(pTitle, "title15") && (GetLevel(ch, need_level_15) == true) && (GetPlayTime(ch, need_minutes_15) == true) && (GetMoney(ch, need_gold_15) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[15]) == true))  
    {
            UpdateTitle(ch, sTitle[15], need_gold_15);
    }  
   
    if (!strcmp(pTitle, "title16") && (GetLevel(ch, need_level_16) == true) && (GetPlayTime(ch, need_minutes_16) == true) && (GetMoney(ch, need_gold_16) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[16]) == true))  
    {
            UpdateTitle(ch, sTitle[16], need_gold_16);
    }
/****************
* Title  premium
*/
    if (!strcmp(pTitle, "title17") && (GetTitlePremium(ch) == true))
    {
            SetAffect(ch, "send_premium_1");
    }  
   
    if (!strcmp(pTitle, "title18") && (GetTitlePremium(ch) == true))  
    {
            SetAffect(ch, "send_premium_2");
    }  
   
    if (!strcmp(pTitle, "title19") && (GetTitlePremium(ch) == true))  
    {
            SetAffect(ch, "send_premium_3");
    }
    return true;
}
 
sourceyi build ettiğin ve oyunu açtığın makine ayrı mı?
aynı makine localde çalışıyorum
İstersen bunu bi deneyebilirsin birde senin kullandığın eski olabilir mi ? date farklı
Linkleri görebilmek için giriş yap veya kayıt ol.
buradakini indirip sendeki ile karşılaştırabilirsin.

C++:
/*********************************************************************
* date        : 2016.07.16
* file        : title.cpp
* author      : VegaS
* description :
*/
#include "stdafx.h"
#include "constants.h"
#include "utils.h"
#include "desc.h"
#include "char.h"
#include "db.h"
#include "config.h"
#include "title.h"
#include "affect.h"
#include "item.h"
#include "questmanager.h"
/*********************************************************************
*/
TitleManager::TitleManager()
{
}

TitleManager::~TitleManager()
{
}
/*****************************
* Set requirements gold(yang) for title
*/
#define need_gold_1        500000
#define need_gold_2        800000
#define need_gold_3        1500000
#define need_gold_4        1800000
#define need_gold_5        2500000
#define need_gold_6        3000000
#define need_gold_7        4000000
#define need_gold_8        5000000
#define need_gold_9        10000000
#define need_gold_10    15000000
#define need_gold_11    25000000
#define need_gold_12    50000000
#define need_gold_13    75000000
#define need_gold_14    100000000
#define need_gold_15    150000000
#define need_gold_16    300000000

/*****************************
* Set requirements level for title
*/
#define need_level_1    7
#define need_level_2    14
#define need_level_3    21
#define need_level_4    28
#define need_level_5    35
#define need_level_6    42
#define need_level_7    49
#define need_level_8    56
#define need_level_9    63
#define need_level_10    70
#define need_level_11    77
#define need_level_12    84 
#define need_level_13    91
#define need_level_14    98
#define need_level_15    100
#define need_level_16    103 

/*****************************
* Set requirements level for playTime on character
*/
#define need_minutes_1    5
#define need_minutes_2    15
#define need_minutes_3    40
#define need_minutes_4    50                                                 
#define need_minutes_5    60
#define need_minutes_6    75
#define need_minutes_7    90
#define need_minutes_8    110
#define need_minutes_9    130
#define need_minutes_10    150
#define need_minutes_11    170
#define need_minutes_12    200
#define need_minutes_13    500
#define need_minutes_14    700
#define need_minutes_15    1200
#define need_minutes_16    1500 
#include <boost/unordered_map.hpp>
#include "../../common/stl.h"
/****************************************************************************************************************************************************************************************
* Get enable options
*/
#define ENABLE_CHECK_TIME_POTIONS // If you want to make enable check for buy potions with time
//#define ENABLE_GIVE_JCOINS // Enable to give you jcoins loadead from account.account(jcoins [row]) example: if u buy a potion yeelow cost 50coins, when you buy give make: -50 cash and give +50 jcoins

int sTitle[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19}; // Do not change anything here

unsigned int x[] = {0, 0, 0}; // Do not change anything here
/****************
* Get type affect on title premium loaded from affect.h ( not change this )
*/ 
int get_affect_premium[] = {PRESTIGE_AFFECT_1, PRESTIGE_AFFECT_2, PRESTIGE_AFFECT_3};

/****************
* Settings how hours you need to wait for can buy again potion on shopping-area
*/ 
int sPotionTime[] = {12, 12, 12};
/****************
* ItemVnum for potions to check if u have for attached title premium 1/2/3
*/ 
int sPotionVnum[] = {55001, 55002, 55003};
/****************
* Price potions in cash value loaded from account.account for potion yellow/pink/white
*/ 
unsigned int sPotionPrice[] = {50, 100, 150};

int    sTimeDuratingBonus[] = {60*60*24*365}; 
/****************
* Table with bonus name affect ( if u want to change bonus you can find in enum EPointTypes on char.h other bonus type )
* If u want you can put automatically value from bonus like - POINTS_ATTBONUS_MONSTER = 63 and , 20 is value for bonus monster apply
*/ 
int pTitleBonus_1[] = {POINT_MAX_HP, 3000};
int pTitleBonus_2[] = {POINT_ATTBONUS_MONSTER, 20};
int pTitleBonus_3[] = {POINT_CRITICAL_PCT, 15};

const char* sPotionFlag[] = {"title.getTimePotions_1", "title.getTimePotions_2", "title.getTimePotions_3"}; // Do not change anything here

/****************
* Settings for translate
*/ 
const char* requirements[] = {
                                    "<Ünvan Sistemi> Ünvan için %u yang'n olması gerekiyor!",
                                    "<Ünvan Sistemi> Ünvan için seviyen %u olması gerekiyor!",
                                    "<Ünvan Sistemi> Ünvan için oyun süren %u olması gerekiyor!"};
const char* title_translate[] = {
                                    "<Ünvan Sistemi> Tekrar özel iksir almak için %u beklemelisiniz!",
                                    "<Ünvan Sistemi> Yeterli ejderha parasına sahip değilsin!",
                                    "<Ünvan Sistemi> Özellik ve ünvan yok oldu!",
                                    "<Ünvan Sistemi> Ünvan silindi!, x1 Sarı büyülü iksir iade edildi!",
                                    "<Ünvan Sistemi> Ünvan silindi!, x1 Pembe büyülü iksir iade edildi!",
                                    "<Ünvan Sistemi> Ünvan silindi!, x1 Beyaz büyülü iksir iade edildi!",
                                    "<Ünvan Sistemi> Dönüşüm için yetersiz ünvan!",
                                    "<Ünvan Sistemi> Ekli olan bir ünvan mevcut!",
                                    "<Ünvan Sistemi> Zaten bu ünvana sahipsin!",
                                    "<Ünvan Sistemi> x1 Sarı büyülü iksir gerekli!",
                                    "<Ünvan Sistemi> x1 Pembe büyülü iksir gerekli!",
                                    "<Ünvan Sistemi> x1 Beyaz büyülü iksir gerekli!",
                                    "<Ünvan Sistemi> Ünvanın silindi!"};

bool TitleManager::TransformTitle(LPCHARACTER ch)
{
    if (NULL == ch)
        return false;

    if (!ch->IsPC())
        return false;
  
    switch (ch->GetRealTitle())
    {
        case 17: 
            if (ch->FindAffect(get_affect_premium[0]))
            {
                ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[2]);     
                ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[3]);
                ch->RemoveAffect(get_affect_premium[0]); 
                ch->UpdateTitle(- ch->GetRealTitle());
                ch->AutoGiveItem(sPotionVnum[0]); 
            }
            else if (!ch->FindAffect(get_affect_premium[0])){
                return false; ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[6]);}
                break;
        case 18: 
            if (ch->FindAffect(get_affect_premium[1]))
            {
                ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[2]);     
                ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[4]);
                ch->RemoveAffect(get_affect_premium[1]); 
                ch->UpdateTitle(- ch->GetRealTitle());
                ch->AutoGiveItem(sPotionVnum[1]); 
            }
            else if (!ch->FindAffect(get_affect_premium[0])){
                return false; ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[6]);}
                break;
        case 19: 
            if (ch->FindAffect(get_affect_premium[2]))
            {
                ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[2]);     
                ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[5]);
                ch->RemoveAffect(get_affect_premium[2]); 
                ch->UpdateTitle(- ch->GetRealTitle());
                ch->AutoGiveItem(sPotionVnum[2]); 
            }
            else if (!ch->FindAffect(get_affect_premium[0])){
                return false; ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[6]);}
                break;
        }
    return true;
}

void TitleManager::BuyPotion(LPCHARACTER ch, const char* mPotion)
{
    if (NULL == ch)
        return;

    if (!ch->IsPC())
        return;

    if (!*mPotion)
    { 
        return;
    }
/****************
* Argument first
*/
    if (!strcmp(mPotion, "buy_potion_1"))
    { 
        std::unique_ptr<SQLMsg> pMsg(DBManager::instance().DirectQuery("SELECT cash FROM account.account WHERE id = %u", ch->GetDesc()->GetAccountTable().id));
        quest::PC* pPC = quest::CQuestManager::instance().GetPC(ch->GetPlayerID()); 
        if (pMsg->Get()->uiNumRows == x[0])    return;
            MYSQL_ROW row = mysql_fetch_row(pMsg->Get()->pSQLResult);
            str_to_number(x[0], row[0]);
    #ifdef ENABLE_CHECK_TIME_POTIONS     
        int szTime = pPC->GetFlag(sPotionFlag[0]);
        if (get_global_time() - szTime < sPotionTime[0] * 60 * 60) 
        { 
            ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[0], sPotionTime[2]);    return; 
        }     
    #endif 
        if (x[0] < sPotionPrice[0])
        {
            ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[1]);    return;
        }
        else
        {
            ch->AutoGiveItem(sPotionVnum[0]);
            DBManager::instance().DirectQuery("UPDATE account.account SET cash = cash - %u WHERE id = %u", sPotionPrice[0], ch->GetDesc()->GetAccountTable().id);
        #ifdef ENABLE_CHECK_TIME_POTIONS     
            pPC->SetFlag(sPotionFlag[0], get_global_time());
        #endif
      
        #ifdef ENABLE_GIVE_JCOINS
            DBManager::instance().DirectQuery("UPDATE account.account SET jcoins = jcoins + %u WHERE id = %u", sPotionPrice[0], ch->GetDesc()->GetAccountTable().id); 
        #endif
        }
    }
/****************
* Argument two
*/
    if (!strcmp(mPotion, "buy_potion_2"))
    {
        std::unique_ptr<SQLMsg> pMsg(DBManager::instance().DirectQuery("SELECT cash FROM account.account WHERE id = %u", ch->GetDesc()->GetAccountTable().id));
        quest::PC* pPC = quest::CQuestManager::instance().GetPC(ch->GetPlayerID()); 
        if (pMsg->Get()->uiNumRows == x[1])    return;
            MYSQL_ROW row = mysql_fetch_row(pMsg->Get()->pSQLResult);
            str_to_number(x[1], row[0]);
    #ifdef ENABLE_CHECK_TIME_POTIONS     
        int szTime = pPC->GetFlag(sPotionFlag[0]);
        if (get_global_time() - szTime < sPotionTime[0] * 60 * 60) 
        { 
            ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[0], sPotionTime[2]);    return; 
        }     
    #endif 
        if (x[1] < sPotionPrice[1])
        {
            ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[1]);    return;
        }
        else
        {
            ch->AutoGiveItem(sPotionVnum[1]);
            DBManager::instance().DirectQuery("UPDATE account.account SET cash = cash - %u WHERE id = %u", sPotionPrice[1], ch->GetDesc()->GetAccountTable().id);
        #ifdef ENABLE_CHECK_TIME_POTIONS
            pPC->SetFlag(sPotionFlag[1], get_global_time());
        #endif     
      
        #ifdef ENABLE_GIVE_JCOINS
            DBManager::instance().DirectQuery("UPDATE account.account SET jcoins = jcoins + %u WHERE id = %u", sPotionPrice[1], ch->GetDesc()->GetAccountTable().id); 
        #endif
        }
    }
/****************
* Argument three
*/ 
    if (!strcmp(mPotion, "buy_potion_3"))
    {
        std::unique_ptr<SQLMsg> pMsg(DBManager::instance().DirectQuery("SELECT cash FROM account.account WHERE id = %u", ch->GetDesc()->GetAccountTable().id));
        quest::PC* pPC = quest::CQuestManager::instance().GetPC(ch->GetPlayerID()); 
        if (pMsg->Get()->uiNumRows == x[2])    return;
            MYSQL_ROW row = mysql_fetch_row(pMsg->Get()->pSQLResult);
            str_to_number(x[2], row[0]);
    #ifdef ENABLE_CHECK_TIME_POTIONS     
        int szTime = pPC->GetFlag(sPotionFlag[0]);
        if (get_global_time() - szTime < sPotionTime[0] * 60 * 60) 
        { 
            ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[0], sPotionTime[2]);    return; 
        }     
    #endif 
        if (x[2] < sPotionPrice[2])
        {
            ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[1]);    return;
        }
        else
        {
            ch->AutoGiveItem(sPotionVnum[2]);
            DBManager::instance().DirectQuery("UPDATE account.account SET cash = cash - %u WHERE id = %u", sPotionPrice[2], ch->GetDesc()->GetAccountTable().id);
        #ifdef ENABLE_CHECK_TIME_POTIONS     
            pPC->SetFlag(sPotionFlag[0], get_global_time());
        #endif     
      
        #ifdef ENABLE_GIVE_JCOINS
            DBManager::instance().DirectQuery("UPDATE account.account SET jcoins = jcoins + %u WHERE id = %u", sPotionPrice[2], ch->GetDesc()->GetAccountTable().id); 
        #endif
        }
    }
}

static bool GetPlayTime(LPCHARACTER ch, int sTime)
{
    if (NULL == ch)
        return false;

    if (!ch->IsPC())
        return false;
  
    if (ch->GetRealPoint(POINT_PLAYTIME) < sTime)
    {
        switch (sTime)
        {
            case need_minutes_1:        case need_minutes_2:    case need_minutes_3:    case need_minutes_4:
            case need_minutes_5:        case need_minutes_6:    case need_minutes_7:    case need_minutes_8:     
            case need_minutes_9:        case need_minutes_10:    case need_minutes_11:    case need_minutes_12:     
            case need_minutes_13:        case need_minutes_14:    case need_minutes_15:    case need_minutes_16:
                ch->ChatPacket(CHAT_TYPE_NOTICE, requirements[2], sTime);
                return false; 
        }
    }
        return true;
} 
  
static bool GetLevel(LPCHARACTER ch, int sLevel)
{
    if (NULL == ch)
        return false;

    if (!ch->IsPC())
        return false;
  
    if (ch->GetLevel() < sLevel)
    {
        switch (sLevel)
        {
            case need_level_1:        case need_level_2:    case need_level_3:    case need_level_4:
            case need_level_5:        case need_level_6:    case need_level_7:    case need_level_8:     
            case need_level_9:        case need_level_10:    case need_level_11:    case need_level_12:     
            case need_level_13:        case need_level_14:    case need_level_15:    case need_level_16:
                ch->ChatPacket(CHAT_TYPE_NOTICE, requirements[1], sLevel);
                return false; 
        }
    }
        return true;
}

static bool GetMoney(LPCHARACTER ch, int sGold)
{
    if (NULL == ch)
        return false;

    if (!ch->IsPC())
        return false;
  
    if (ch->GetGold() < sGold)
    {
        switch (sGold)
        {
            case need_gold_1:    case need_gold_2:    case need_gold_3:    case need_gold_4:
            case need_gold_5:    case need_gold_6:    case need_gold_7:    case need_gold_8:
            case need_gold_9:    case need_gold_10:    case need_gold_11:    case need_gold_12:
            case need_gold_13:    case need_gold_14:    case need_gold_15:    case need_gold_16:
                ch->ChatPacket(CHAT_TYPE_NOTICE, requirements[0], sGold);
                return false; 
        }
    }
        return true;
}

static bool GetTitlePremium(LPCHARACTER ch)
{
    if (NULL == ch)
        return false;

    if (!ch->IsPC())
        return false;
  
    switch (ch->GetRealTitle())
    {
        case 17: 
        case 18:
        case 19:
            ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[7]); 
            return false;
    }
        return true; 
}

static bool GetTitleActual(LPCHARACTER ch, int arg1)
{
    if (NULL == ch)
        return false;

    if (!ch->IsPC())
        return false;
  
    if (ch->GetRealTitle() == arg1)
    {     
        switch (arg1)
        {
            case 1:        case 2:        case 3:        case 4: 
            case 5:        case 6:        case 7:        case 8: 
            case 9:        case 10:    case 11:    case 12: 
            case 13:    case 14:    case 15:    case 16: 
            case 17:    case 18:    case 19:         
                ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[8]);
                return false;
        }
    }
        return true; 
}

bool TitleManager::UpdateTitle(LPCHARACTER ch, int changeTitle, int changeMoney)
{

    if (!ch)
        return false;

    if (changeTitle > 0 && changeMoney > 0)
    {
        ch->UpdateTitle(changeTitle - ch->GetTitle());
        ch->PointChange(POINT_GOLD, - changeMoney); 
    }
    else if (changeTitle > 0 && changeMoney < 1)
    {
        ch->UpdateTitle(changeTitle - ch->GetTitle());
    }
    return true;
}

void TitleManager::SetAffect(LPCHARACTER ch, const char* valueAffect)
{
    if (NULL == ch)
        return;

    if (!ch->IsPC())
        return;
/****************
* [Premium Title I]
*/             
    if (!strcmp(valueAffect, "send_premium_1"))
    {
        if (ch->CountSpecifyItem(sPotionVnum[0]))
        { 
            ch->AddAffect(get_affect_premium[0], pTitleBonus_1[0], pTitleBonus_1[1], 0, sTimeDuratingBonus[0], 0, true);
            ch->RemoveSpecifyItem(sPotionVnum[0], 1); 
            UpdateTitle(ch, sTitle[17], 0); 
        }
        else
        {
            ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[9]);
            return;
        }
    }
/****************
* [Premium Title II]
*/     
    if (!strcmp(valueAffect, "send_premium_2"))
    {
        if (ch->CountSpecifyItem(sPotionVnum[1]))
        {     
            ch->AddAffect(get_affect_premium[1], pTitleBonus_2[0], pTitleBonus_2[1], 0, sTimeDuratingBonus[0], 0, true);
            ch->RemoveSpecifyItem(sPotionVnum[1], 1); 
            UpdateTitle(ch, sTitle[18], 0);
        }     
        else
        {
            ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[10]);
            return;
        }
    }
/****************
* [Premium Title III]
*/
    if (!strcmp(valueAffect, "send_premium_3"))
    {
        if (ch->CountSpecifyItem(sPotionVnum[2]))
        {     
                ch->AddAffect(get_affect_premium[2], pTitleBonus_3[0], pTitleBonus_3[1], 0, sTimeDuratingBonus[0], 0, true);
                ch->RemoveSpecifyItem(sPotionVnum[2], 1); 
                UpdateTitle(ch, sTitle[19], 0);
        }     
        else
        {
            ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[11]);
            return;
        }
    }
}
bool TitleManager::SetTitle(LPCHARACTER ch, const char* pTitle)
{
    if (NULL == ch)
        return false;

    if (!ch->IsPC())
        return false;

    if (!*pTitle)
    { 
        return false;
    }
/****************
* Title  free
*/
    if (!strcmp(pTitle, "disable")    && (GetTitleActual(ch, sTitle[17]) == true) && (GetTitleActual(ch, sTitle[18]) == true) && (GetTitleActual(ch, sTitle[19]) == true)) 
    {     
        ch->UpdateTitle(- ch->GetTitle()); 
        ch->ChatPacket(CHAT_TYPE_NOTICE, title_translate[12]);
    }
  
    if (!strcmp(pTitle, "title1") && (GetLevel(ch, need_level_1) == true) && (GetPlayTime(ch, need_minutes_1) == true) && (GetMoney(ch, need_gold_1) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[1]) == true)) 
    { 
            UpdateTitle(ch, sTitle[1], need_gold_1);
    }
  
    if (!strcmp(pTitle, "title2") && (GetLevel(ch, need_level_2) == true) && (GetPlayTime(ch, need_minutes_2) == true) && (GetMoney(ch, need_gold_2) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[2]) == true)) 
    {
            UpdateTitle(ch, sTitle[2], need_gold_2);
    } 
  
    if (!strcmp(pTitle, "title3") && (GetLevel(ch, need_level_3) == true) && (GetPlayTime(ch, need_minutes_3) == true) && (GetMoney(ch, need_gold_3) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[3]) == true)) 
    {     
            UpdateTitle(ch, sTitle[3], need_gold_3);
    } 
  
    if (!strcmp(pTitle, "title4") && (GetLevel(ch, need_level_4) == true) && (GetPlayTime(ch, need_minutes_4) == true) && (GetMoney(ch, need_gold_4) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[4]) == true)) 
    {
            UpdateTitle(ch, sTitle[4], need_gold_4);
    } 
  
    if (!strcmp(pTitle, "title5") && (GetLevel(ch, need_level_5) == true) && (GetPlayTime(ch, need_minutes_5) == true) && (GetMoney(ch, need_gold_5) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[5]) == true)) 
    {
            UpdateTitle(ch, sTitle[5], need_gold_5);
    } 
  
    if (!strcmp(pTitle, "title6") && (GetLevel(ch, need_level_6) == true) && (GetPlayTime(ch, need_minutes_6) == true) && (GetMoney(ch, need_gold_6) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[6]) == true)) 
    {
            UpdateTitle(ch, sTitle[6], need_gold_6);
    }
  
    if (!strcmp(pTitle, "title7") && (GetLevel(ch, need_level_7) == true) && (GetPlayTime(ch, need_minutes_7) == true) && (GetMoney(ch, need_gold_7) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[7]) == true)) 
    {
            UpdateTitle(ch, sTitle[7], need_gold_7);
    } 
  
    if (!strcmp(pTitle, "title8") && (GetLevel(ch, need_level_8) == true) && (GetPlayTime(ch, need_minutes_8) == true) && (GetMoney(ch, need_gold_8) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[8]) == true)) 
    {
            UpdateTitle(ch, sTitle[8], need_gold_8);
    }
  
    if (!strcmp(pTitle, "title9") && (GetLevel(ch, need_level_9) == true) && (GetPlayTime(ch, need_minutes_9) == true) && (GetMoney(ch, need_gold_9) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[9]) == true)) 
    {
            UpdateTitle(ch, sTitle[9], need_gold_9);
    } 
  
    if (!strcmp(pTitle, "title10") && (GetLevel(ch, need_level_10) == true) && (GetPlayTime(ch, need_minutes_10) == true) && (GetMoney(ch, need_gold_10) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[10]) == true)) 
    {
            UpdateTitle(ch, sTitle[10], need_gold_10);
    }
  
    if (!strcmp(pTitle, "title11") && (GetLevel(ch, need_level_11) == true) && (GetPlayTime(ch, need_minutes_11) == true) && (GetMoney(ch, need_gold_11) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[11]) == true)) 
    {
            UpdateTitle(ch, sTitle[11], need_gold_11);
    } 
  
    if (!strcmp(pTitle, "title12") && (GetLevel(ch, need_level_12) == true) && (GetPlayTime(ch, need_minutes_12) == true) && (GetMoney(ch, need_gold_12) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[12]) == true)) 
    {
            UpdateTitle(ch, sTitle[12], need_gold_12);
    }
  
    if (!strcmp(pTitle, "title13") && (GetLevel(ch, need_level_13) == true) && (GetPlayTime(ch, need_minutes_13) == true) && (GetMoney(ch, need_gold_13) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[13]) == true)) 
    {
            UpdateTitle(ch, sTitle[13], need_gold_13);
    } 
  
    if (!strcmp(pTitle, "title14") && (GetLevel(ch, need_level_14) == true) && (GetPlayTime(ch, need_minutes_14) == true) && (GetMoney(ch, need_gold_14) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[14]) == true)) 
    {
            UpdateTitle(ch, sTitle[14], need_gold_14);
    } 
  
    if (!strcmp(pTitle, "title15") && (GetLevel(ch, need_level_15) == true) && (GetPlayTime(ch, need_minutes_15) == true) && (GetMoney(ch, need_gold_15) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[15]) == true)) 
    {
            UpdateTitle(ch, sTitle[15], need_gold_15);
    } 
  
    if (!strcmp(pTitle, "title16") && (GetLevel(ch, need_level_16) == true) && (GetPlayTime(ch, need_minutes_16) == true) && (GetMoney(ch, need_gold_16) == true) && (GetTitlePremium(ch) == true) && (GetTitleActual(ch, sTitle[16]) == true)) 
    {
            UpdateTitle(ch, sTitle[16], need_gold_16);
    }
/****************
* Title  premium
*/
    if (!strcmp(pTitle, "title17") && (GetTitlePremium(ch) == true))
    {
            SetAffect(ch, "send_premium_1");
    } 
  
    if (!strcmp(pTitle, "title18") && (GetTitlePremium(ch) == true)) 
    {
            SetAffect(ch, "send_premium_2");
    } 
  
    if (!strcmp(pTitle, "title19") && (GetTitlePremium(ch) == true)) 
    {
            SetAffect(ch, "send_premium_3");
    }
    return true;
}
deneyeceğim fakat kurduğum sürümü daha önce sorunsuz kullandım.
 
Optimizasyonları devre dışı bırak makefileden
optimizasyondan kastın nedir tam bilmiyorum makefile dosyam şu şekilde;


Makefile:
CXX = g++9

GAME_VERSION := $(shell cat ../../__REVISION__)

GccMajorVersion := $(shell expr `$(CXX) -dumpversion | cut -f1 -d.`)
GccMinorVersion := $(shell expr `$(CXX) -dumpversion | cut -f2 -d.`)
GccMinorEGT8 := $(shell expr $(GccMinorVersion) \>= 8)

INCDIR =
LIBDIR =
BINDIR = ..
OBJDIR = .obj
$(shell if [ ! -d $(OBJDIR) ]; then mkdir $(OBJDIR); fi)

## LIST OF CONSTANTS BEGIN
ENABLE_GOOGLE_TEST = 0
ENABLE_HSHIELD_SYSTEM = 0
ENABLE_XTRAP_SYSTEM = 0
ENABLE_LUA_5_VERSION = 0
ENABLE_GCC_AUTODEPEND = 1
ENABLE_STATIC = 0
## LIST OF CONSTANTS END

# Depend Path File
ifneq ($(ENABLE_GCC_AUTODEPEND), 1)
DEPFILE = Depend
endif

# Standard Libraries
LIBS = -lm -lmd

# Project Flags
CFLAGS  = -m32 -g -Wall -O2 -pipe -fexceptions -fno-strict-aliasing -pthread -D_THREAD_SAFE -DNDEBUG
CFLAGS += -Wno-deprecated-declarations -Wno-nonnull-compare -Wno-deprecated-declarations -Wno-array-bounds -Wno-address
CFLAGS += -Wno-int-in-bool-context -Wno-format-truncation -Wno-stringop-truncation -Wno-sign-compare
CXXFLAGS = -std=c++11 -Wl,-rpath=/usr/local/lib/gcc8

ifeq ($(ENABLE_STATIC), 1)
CFLAGS += -static
endif

ifeq ($(GccMinorEGT8), 1)
CFLAGS += -Wno-unused-local-typedefs
endif

# FreeBSD stack protector
CFLAGS += -fstack-protector-all

# Version defines
CFLAGS += -D__USER__=\"$(USER)\" -D__HOSTNAME__=\"$(HOSTNAME)\" -D__PWD__=\"$(PWD)\" -D__GAME_VERSION__=\"$(GAME_VERSION)\"

# Boost
INCDIR += -I../../../Extern/include/boost

# DevIL
INCDIR += -I../../../Extern/include/IL
LIBS += ../../../Extern/lib/libIL.a\
        ../../../Extern/lib/libjasper.a\
        ../../../Extern/lib/libpng.a\
        ../../../Extern/lib/libtiff.a\
        ../../../Extern/lib/libjbig.a\
        ../../../Extern/lib/libmng.a\
        /usr/lib/liblzma.a\
        ../../../Extern/lib/liblcms.a\
        ../../../Extern/lib/libjpeg.a

# MySQL
INCDIR += -I/usr/local/include/mysql
LIBS += /usr/local/lib/mysql/libmysqlclient.a /usr/lib/libz.a

# CryptoPP
LIBS += ../../../Extern/lib/libcryptopp.a

# GTest
ifeq ($(ENABLE_GOOGLE_TEST), 1)
LIBS += /usr/local/lib/libgtest.a
CFLAGS += -DENABLE_GOOGLE_TEST
endif

# HackShield
ifeq ($(ENABLE_HSHIELD_SYSTEM), 1)
INCDIR += -I../../libhackshield/include
CFLAGS += -DENABLE_HSHIELD_SYSTEM
endif

# XTrap
ifeq ($(ENABLE_XTRAP_SYSTEM), 1)
INCDIR += -I../../libxtrap/include
CFLAGS += -DENABLE_XTRAP_SYSTEM
endif

# OpenSSL
INCDIR += -I/usr/include
LIBS += -lssl -lcrypto
# LIBS += /usr/lib/libssl.a

# Lua
CFLAGS += -DENABLE_LUA_5_VERSION=ENABLE_LUA_5_VERSION
ifeq ($(ENABLE_LUA_5_VERSION), 2)
INCDIR += -I../../liblua/5.2/install/include
LIBDIR += -L../../liblua/5.2/install/lib
LIBS += ../../liblua/5.2/install/lib/liblua.a
else
INCDIR += -I../../liblua/5.0/include
LIBDIR += -L../../liblua/5.0/lib
LIBS += ../../liblua/5.0/lib/liblua.a ../../liblua/5.0/lib/liblualib.a
endif

# Project Libraries
INCDIR += -I../../../Extern/include
INCDIR += -I/usr/local/include
LIBDIR += -L/usr/local/lib

LIBDIR += -L../../libthecore/lib -L../../libpoly -L../../libsql -L../../libgame/lib
LIBS += -lthecore -lpoly -lsql -lgame

# PROJECT_SRC_FILES BEGIN
MAINCPP = main.cpp

CFILE    = minilzo.c

CPPFILE = BattleArena.cpp FSM.cpp MarkConvert.cpp MarkImage.cpp MarkManager.cpp OXEvent.cpp TrafficProfiler.cpp ani.cpp\
          arena.cpp banword.cpp battle.cpp blend_item.cpp block_country.cpp buffer_manager.cpp building.cpp castle.cpp\
          char.cpp char_affect.cpp char_battle.cpp char_change_empire.cpp char_horse.cpp char_item.cpp char_manager.cpp\
          char_quickslot.cpp char_resist.cpp char_skill.cpp char_state.cpp PetSystem.cpp cmd.cpp cmd_emotion.cpp cmd_general.cpp\
          cmd_gm.cpp cmd_oxevent.cpp config.cpp constants.cpp crc32.cpp cube.cpp db.cpp desc.cpp\
          desc_client.cpp desc_manager.cpp desc_p2p.cpp dev_log.cpp dungeon.cpp empire_text_convert.cpp entity.cpp\
          entity_view.cpp event.cpp event_queue.cpp exchange.cpp file_loader.cpp fishing.cpp gm.cpp guild.cpp\
          guild_manager.cpp guild_war.cpp horse_rider.cpp horsename_manager.cpp input.cpp input_auth.cpp input_db.cpp\
          input_login.cpp input_main.cpp input_p2p.cpp input_teen.cpp input_udp.cpp ip_ban.cpp\
          item.cpp item_addon.cpp item_attribute.cpp item_manager.cpp item_manager_idrange.cpp locale.cpp\
          locale_service.cpp log.cpp login_data.cpp lzo_manager.cpp marriage.cpp matrix_card.cpp\
          messenger_manager.cpp mining.cpp mob_manager.cpp monarch.cpp motion.cpp over9refine.cpp p2p.cpp packet_info.cpp\
          party.cpp passpod.cpp pcbang.cpp polymorph.cpp priv_manager.cpp pvp.cpp\
          questevent.cpp questlua.cpp questlua_affect.cpp questlua_arena.cpp questlua_ba.cpp questlua_building.cpp\
          questlua_danceevent.cpp questlua_dungeon.cpp questlua_forked.cpp questlua_game.cpp questlua_global.cpp\
          questlua_guild.cpp questlua_horse.cpp questlua_pet.cpp questlua_item.cpp questlua_marriage.cpp questlua_mgmt.cpp\
          questlua_monarch.cpp questlua_npc.cpp questlua_oxevent.cpp questlua_party.cpp questlua_pc.cpp\
          questlua_quest.cpp questlua_target.cpp questmanager.cpp questnpc.cpp questpc.cpp\
          refine.cpp regen.cpp safebox.cpp sectree.cpp sectree_manager.cpp sequence.cpp shop.cpp\
          skill.cpp start_position.cpp target.cpp text_file_loader.cpp trigger.cpp utils.cpp vector.cpp war_map.cpp\
          wedding.cpp xmas_event.cpp version.cpp panama.cpp threeway_war.cpp map_location.cpp auth_brazil.cpp\
          BlueDragon.cpp BlueDragon_Binder.cpp DragonLair.cpp questlua_dragonlair.cpp\
          HackShield.cpp HackShield_Impl.cpp char_hackshield.cpp skill_power.cpp affect.cpp\
          SpeedServer.cpp questlua_speedserver.cpp XTrapManager.cpp\
          FileMonitor_FreeBSD.cpp ClientPackageCryptInfo.cpp cipher.cpp\
          buff_on_attributes.cpp dragon_soul_table.cpp DragonSoul.cpp\
          group_text_parse_tree.cpp char_dragonsoul.cpp questlua_dragonsoul.cpp\
          shop_manager.cpp shopEx.cpp item_manager_read_tables.cpp shutdown_manager.cpp title.cpp
# PROJECT_SRC_FILES END

# PROJECT_OBJ_FILES BEGIN
COBJS    = $(CFILE:%.c=$(OBJDIR)/%.o)
CPPOBJS    = $(CPPFILE:%.cpp=$(OBJDIR)/%.o)
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
CDEPS    = $(COBJS:%.o=%.d)
CPPDEPS    = $(CPPOBJS:%.o=%.d)
endif

MAINOBJ = $(MAINCPP:%.cpp=$(OBJDIR)/%.o)
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
MAINDEPS = $(MAINOBJ:%.o=%.d)
endif

# PROJECT_OBJ_FILES END

# Target Paths
MAIN_TARGET = $(BINDIR)/game_r$(GAME_VERSION)

default: $(MAIN_TARGET)
test: $(TEST_TARGET)

$(OBJDIR)/%.o: %.c
    @echo compiling $<
    @$(CXX) $(CFLAGS) $(INCDIR) -c $< -o $@
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
    @$(CXX) -MM -MG -MP $(CFLAGS) $(INCDIR) -c $< -o $(OBJDIR)/$*.d
    @sed -i '' -e's/$*.o:/$(OBJDIR)\/$*.o:/g' $(OBJDIR)/$*.d
endif

$(OBJDIR)/%.o: %.cpp
    @echo compiling $<
    @$(CXX) $(CFLAGS) $(CXXFLAGS) $(INCDIR) -c $< -o $@
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
    @$(CXX) -MM -MG -MP $(CFLAGS) $(CXXFLAGS) $(INCDIR) -c $< -o $(OBJDIR)/$*.d
    @sed -i '' -e's/$*.o:/$(OBJDIR)\/$*.o:/g' $(OBJDIR)/$*.d
endif

limit_time:
    @echo update limit time
    @python update_limit_time.py

$(MAIN_TARGET): $(CPPOBJS) $(COBJS) $(MAINOBJ)
    @echo linking $(MAIN_TARGET)
    @$(CXX) $(CFLAGS) $(CXXFLAGS) $(LIBDIR) $(COBJS) $(CPPOBJS) $(MAINOBJ) $(LIBS) -o $(MAIN_TARGET)

symlink:
    @ln -fs game_r$(GAME_VERSION) $(BINDIR)/game_symlink

strip:
    @cp $(MAIN_TARGET) $(BINDIR)/game_r
    @strip $(BINDIR)/game_r

clean:
    @echo cleaning $(MAIN_TARGET) $(OBJDIR)
    @rm -f $(COBJS) $(CPPOBJS) $(MAINOBJ)
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
    @rm -f $(CDEPS) $(CPPDEPS) $(MAINDEPS)
endif
    @rm -f $(BINDIR)/game_r* $(BINDIR)/test_r* $(BINDIR)/conv

dep:
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
    @echo "Note: gcc autodepend is autodetected, so target dep skipped"
else
    makedepend -f $(DEPFILE) $(INCDIR) -I/usr/include/c++/3.3 -I/usr/include/c++/4.2 -p$(OBJDIR)/ $(CPPFILE) $(CFILE) $(MAINCPP) $(TESTCPP) 2> /dev/null > $(DEPFILE)
endif

# AUTO_DEPEND_CHECK BEGIN
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
sinclude $(CDEPS)
sinclude $(CPPDEPS)
sinclude $(MAINDEPS)
else
sinclude $(DEPFILE)
endif
# AUTO_DEPEND_CHECK END
 
optimizasyondan kastın nedir tam bilmiyorum makefile dosyam şu şekilde;


Makefile:
CXX = g++9

GAME_VERSION := $(shell cat ../../__REVISION__)

GccMajorVersion := $(shell expr `$(CXX) -dumpversion | cut -f1 -d.`)
GccMinorVersion := $(shell expr `$(CXX) -dumpversion | cut -f2 -d.`)
GccMinorEGT8 := $(shell expr $(GccMinorVersion) \>= 8)

INCDIR =
LIBDIR =
BINDIR = ..
OBJDIR = .obj
$(shell if [ ! -d $(OBJDIR) ]; then mkdir $(OBJDIR); fi)

## LIST OF CONSTANTS BEGIN
ENABLE_GOOGLE_TEST = 0
ENABLE_HSHIELD_SYSTEM = 0
ENABLE_XTRAP_SYSTEM = 0
ENABLE_LUA_5_VERSION = 0
ENABLE_GCC_AUTODEPEND = 1
ENABLE_STATIC = 0
## LIST OF CONSTANTS END

# Depend Path File
ifneq ($(ENABLE_GCC_AUTODEPEND), 1)
DEPFILE = Depend
endif

# Standard Libraries
LIBS = -lm -lmd

# Project Flags
CFLAGS  = -m32 -g -Wall -O2 -pipe -fexceptions -fno-strict-aliasing -pthread -D_THREAD_SAFE -DNDEBUG
CFLAGS += -Wno-deprecated-declarations -Wno-nonnull-compare -Wno-deprecated-declarations -Wno-array-bounds -Wno-address
CFLAGS += -Wno-int-in-bool-context -Wno-format-truncation -Wno-stringop-truncation -Wno-sign-compare
CXXFLAGS = -std=c++11 -Wl,-rpath=/usr/local/lib/gcc8

ifeq ($(ENABLE_STATIC), 1)
CFLAGS += -static
endif

ifeq ($(GccMinorEGT8), 1)
CFLAGS += -Wno-unused-local-typedefs
endif

# FreeBSD stack protector
CFLAGS += -fstack-protector-all

# Version defines
CFLAGS += -D__USER__=\"$(USER)\" -D__HOSTNAME__=\"$(HOSTNAME)\" -D__PWD__=\"$(PWD)\" -D__GAME_VERSION__=\"$(GAME_VERSION)\"

# Boost
INCDIR += -I../../../Extern/include/boost

# DevIL
INCDIR += -I../../../Extern/include/IL
LIBS += ../../../Extern/lib/libIL.a\
        ../../../Extern/lib/libjasper.a\
        ../../../Extern/lib/libpng.a\
        ../../../Extern/lib/libtiff.a\
        ../../../Extern/lib/libjbig.a\
        ../../../Extern/lib/libmng.a\
        /usr/lib/liblzma.a\
        ../../../Extern/lib/liblcms.a\
        ../../../Extern/lib/libjpeg.a

# MySQL
INCDIR += -I/usr/local/include/mysql
LIBS += /usr/local/lib/mysql/libmysqlclient.a /usr/lib/libz.a

# CryptoPP
LIBS += ../../../Extern/lib/libcryptopp.a

# GTest
ifeq ($(ENABLE_GOOGLE_TEST), 1)
LIBS += /usr/local/lib/libgtest.a
CFLAGS += -DENABLE_GOOGLE_TEST
endif

# HackShield
ifeq ($(ENABLE_HSHIELD_SYSTEM), 1)
INCDIR += -I../../libhackshield/include
CFLAGS += -DENABLE_HSHIELD_SYSTEM
endif

# XTrap
ifeq ($(ENABLE_XTRAP_SYSTEM), 1)
INCDIR += -I../../libxtrap/include
CFLAGS += -DENABLE_XTRAP_SYSTEM
endif

# OpenSSL
INCDIR += -I/usr/include
LIBS += -lssl -lcrypto
# LIBS += /usr/lib/libssl.a

# Lua
CFLAGS += -DENABLE_LUA_5_VERSION=ENABLE_LUA_5_VERSION
ifeq ($(ENABLE_LUA_5_VERSION), 2)
INCDIR += -I../../liblua/5.2/install/include
LIBDIR += -L../../liblua/5.2/install/lib
LIBS += ../../liblua/5.2/install/lib/liblua.a
else
INCDIR += -I../../liblua/5.0/include
LIBDIR += -L../../liblua/5.0/lib
LIBS += ../../liblua/5.0/lib/liblua.a ../../liblua/5.0/lib/liblualib.a
endif

# Project Libraries
INCDIR += -I../../../Extern/include
INCDIR += -I/usr/local/include
LIBDIR += -L/usr/local/lib

LIBDIR += -L../../libthecore/lib -L../../libpoly -L../../libsql -L../../libgame/lib
LIBS += -lthecore -lpoly -lsql -lgame

# PROJECT_SRC_FILES BEGIN
MAINCPP = main.cpp

CFILE    = minilzo.c

CPPFILE = BattleArena.cpp FSM.cpp MarkConvert.cpp MarkImage.cpp MarkManager.cpp OXEvent.cpp TrafficProfiler.cpp ani.cpp\
          arena.cpp banword.cpp battle.cpp blend_item.cpp block_country.cpp buffer_manager.cpp building.cpp castle.cpp\
          char.cpp char_affect.cpp char_battle.cpp char_change_empire.cpp char_horse.cpp char_item.cpp char_manager.cpp\
          char_quickslot.cpp char_resist.cpp char_skill.cpp char_state.cpp PetSystem.cpp cmd.cpp cmd_emotion.cpp cmd_general.cpp\
          cmd_gm.cpp cmd_oxevent.cpp config.cpp constants.cpp crc32.cpp cube.cpp db.cpp desc.cpp\
          desc_client.cpp desc_manager.cpp desc_p2p.cpp dev_log.cpp dungeon.cpp empire_text_convert.cpp entity.cpp\
          entity_view.cpp event.cpp event_queue.cpp exchange.cpp file_loader.cpp fishing.cpp gm.cpp guild.cpp\
          guild_manager.cpp guild_war.cpp horse_rider.cpp horsename_manager.cpp input.cpp input_auth.cpp input_db.cpp\
          input_login.cpp input_main.cpp input_p2p.cpp input_teen.cpp input_udp.cpp ip_ban.cpp\
          item.cpp item_addon.cpp item_attribute.cpp item_manager.cpp item_manager_idrange.cpp locale.cpp\
          locale_service.cpp log.cpp login_data.cpp lzo_manager.cpp marriage.cpp matrix_card.cpp\
          messenger_manager.cpp mining.cpp mob_manager.cpp monarch.cpp motion.cpp over9refine.cpp p2p.cpp packet_info.cpp\
          party.cpp passpod.cpp pcbang.cpp polymorph.cpp priv_manager.cpp pvp.cpp\
          questevent.cpp questlua.cpp questlua_affect.cpp questlua_arena.cpp questlua_ba.cpp questlua_building.cpp\
          questlua_danceevent.cpp questlua_dungeon.cpp questlua_forked.cpp questlua_game.cpp questlua_global.cpp\
          questlua_guild.cpp questlua_horse.cpp questlua_pet.cpp questlua_item.cpp questlua_marriage.cpp questlua_mgmt.cpp\
          questlua_monarch.cpp questlua_npc.cpp questlua_oxevent.cpp questlua_party.cpp questlua_pc.cpp\
          questlua_quest.cpp questlua_target.cpp questmanager.cpp questnpc.cpp questpc.cpp\
          refine.cpp regen.cpp safebox.cpp sectree.cpp sectree_manager.cpp sequence.cpp shop.cpp\
          skill.cpp start_position.cpp target.cpp text_file_loader.cpp trigger.cpp utils.cpp vector.cpp war_map.cpp\
          wedding.cpp xmas_event.cpp version.cpp panama.cpp threeway_war.cpp map_location.cpp auth_brazil.cpp\
          BlueDragon.cpp BlueDragon_Binder.cpp DragonLair.cpp questlua_dragonlair.cpp\
          HackShield.cpp HackShield_Impl.cpp char_hackshield.cpp skill_power.cpp affect.cpp\
          SpeedServer.cpp questlua_speedserver.cpp XTrapManager.cpp\
          FileMonitor_FreeBSD.cpp ClientPackageCryptInfo.cpp cipher.cpp\
          buff_on_attributes.cpp dragon_soul_table.cpp DragonSoul.cpp\
          group_text_parse_tree.cpp char_dragonsoul.cpp questlua_dragonsoul.cpp\
          shop_manager.cpp shopEx.cpp item_manager_read_tables.cpp shutdown_manager.cpp title.cpp
# PROJECT_SRC_FILES END

# PROJECT_OBJ_FILES BEGIN
COBJS    = $(CFILE:%.c=$(OBJDIR)/%.o)
CPPOBJS    = $(CPPFILE:%.cpp=$(OBJDIR)/%.o)
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
CDEPS    = $(COBJS:%.o=%.d)
CPPDEPS    = $(CPPOBJS:%.o=%.d)
endif

MAINOBJ = $(MAINCPP:%.cpp=$(OBJDIR)/%.o)
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
MAINDEPS = $(MAINOBJ:%.o=%.d)
endif

# PROJECT_OBJ_FILES END

# Target Paths
MAIN_TARGET = $(BINDIR)/game_r$(GAME_VERSION)

default: $(MAIN_TARGET)
test: $(TEST_TARGET)

$(OBJDIR)/%.o: %.c
    @echo compiling $<
    @$(CXX) $(CFLAGS) $(INCDIR) -c $< -o $@
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
    @$(CXX) -MM -MG -MP $(CFLAGS) $(INCDIR) -c $< -o $(OBJDIR)/$*.d
    @sed -i '' -e's/$*.o:/$(OBJDIR)\/$*.o:/g' $(OBJDIR)/$*.d
endif

$(OBJDIR)/%.o: %.cpp
    @echo compiling $<
    @$(CXX) $(CFLAGS) $(CXXFLAGS) $(INCDIR) -c $< -o $@
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
    @$(CXX) -MM -MG -MP $(CFLAGS) $(CXXFLAGS) $(INCDIR) -c $< -o $(OBJDIR)/$*.d
    @sed -i '' -e's/$*.o:/$(OBJDIR)\/$*.o:/g' $(OBJDIR)/$*.d
endif

limit_time:
    @echo update limit time
    @python update_limit_time.py

$(MAIN_TARGET): $(CPPOBJS) $(COBJS) $(MAINOBJ)
    @echo linking $(MAIN_TARGET)
    @$(CXX) $(CFLAGS) $(CXXFLAGS) $(LIBDIR) $(COBJS) $(CPPOBJS) $(MAINOBJ) $(LIBS) -o $(MAIN_TARGET)

symlink:
    @ln -fs game_r$(GAME_VERSION) $(BINDIR)/game_symlink

strip:
    @cp $(MAIN_TARGET) $(BINDIR)/game_r
    @strip $(BINDIR)/game_r

clean:
    @echo cleaning $(MAIN_TARGET) $(OBJDIR)
    @rm -f $(COBJS) $(CPPOBJS) $(MAINOBJ)
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
    @rm -f $(CDEPS) $(CPPDEPS) $(MAINDEPS)
endif
    @rm -f $(BINDIR)/game_r* $(BINDIR)/test_r* $(BINDIR)/conv

dep:
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
    @echo "Note: gcc autodepend is autodetected, so target dep skipped"
else
    makedepend -f $(DEPFILE) $(INCDIR) -I/usr/include/c++/3.3 -I/usr/include/c++/4.2 -p$(OBJDIR)/ $(CPPFILE) $(CFILE) $(MAINCPP) $(TESTCPP) 2> /dev/null > $(DEPFILE)
endif

# AUTO_DEPEND_CHECK BEGIN
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
sinclude $(CDEPS)
sinclude $(CPPDEPS)
sinclude $(MAINDEPS)
else
sinclude $(DEPFILE)
endif
# AUTO_DEPEND_CHECK END

auto_ptr den kaynaklı crash yiyorsun. auto_ptr yerine unique_ptr kullan, olmadı direkt manuel delete yaptırırsın eski tip..
 
Çözüm
verdiğimde unique_ptr ayarlanmış şekilde deneyebilirsin.
 
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.
Geri
Üst