EskiKnightOnline.net | v.1098 MYKO | 400.000 TL Ödül Havuzu | Official : 14 Haziran 2024 - 22:00 !
Cuceko
Cuceko
Cuceko

İstediğin Yerde Pazar Kurma

  •         

            

            

            

            

  • HyperFilter | DoS Protection | DDoS Protection | DoS Mitigation | DDoS Mitigation | AntiDoS | AntiDDoS | Proxy Shielding
A Çevrimdışı

Ash

17 Kasım 2017
9,843
26
48


SRC içinden olacak her şey basit bir mantığa hizmet etmektedir

void CUser::MerchantOpen() 'i silin yerine ;

void CUser::MerchantOpen()
{
int16 errorCode = 0;
if (isDead())
errorCode = MERCHANT_OPEN_DEAD;
else if (isStoreOpen())
errorCode = MERCHANT_OPEN_SHOPPING;
else if (isTrading())
errorCode = MERCHANT_OPEN_TRADING;
else if (GetZoneID() || GetZoneID() )
errorCode = MERCHANT_OPEN_INVALID_ZONE;
else if (GetLevel() < 30)
errorCode = MERCHANT_OPEN_UNDERLEVELED;
else if (isMerchanting())
errorCode = MERCHANT_OPEN_MERCHANTING;
else
errorCode = MERCHANT_OPEN_SUCCESS;

Packet result(WIZ_MERCHANT, uint8(MERCHANT_OPEN));
result << errorCode;
Send(&result);

// If we're already merchanting, user may be desynced
// so we need to close our current merchant first.
if (errorCode == MERCHANT_OPEN_MERCHANTING)
MerchantClose();
}

Eğer yukarıda vermiş oldugum Kod ile src'den build yaptığınız'da hata veriyorsa şimdi alta paylaşmış olduğum kodu deneyin eğer oda olmuyorsa src niz yapısı farklıdır

void CUser::MerchantOpen()
{
int16 errorCode = 0;
if (isDead())
errorCode = MERCHANT_OPEN_DEAD;
else if (isStoreOpen())
errorCode = MERCHANT_OPEN_SHOPPING;
else if (isTrading())
errorCode = MERCHANT_OPEN_TRADING;
else if (GetZoneID() != (GetZoneID())
|| isMining())
errorCode = MERCHANT_OPEN_INVALID_ZONE;
else if (GetLevel() < 20)
errorCode = MERCHANT_OPEN_UNDERLEVELED;
else if (isBuyingMerchant()){
BuyingMerchantClose();
return;
}else if(uint32(m_bLastMerchantTime+55) > uint32(UNIXTIME))
errorCode = MERCHANT_OPEN_TRADING;
else if (isMerchanting() || m_bMerchantStatex)
errorCode = MERCHANT_OPEN_MERCHANTING;
else
{
errorCode = MERCHANT_OPEN_SUCCESS;
m_bMerchantStatex = 1;
m_bLastMerchantTime = uint32(UNIXTIME);
}
[FONT=&amp]
[/FONT]