MORTE 79 Posted September 16, 2015 Share Posted September 16, 2015 For example, select an item in the store to buy, come and buy another, then when I buy gives dc, I saw that the official displays a message SHOP_SOLDOUT Sold Someone help me get to show the message, instead of closing the game? Link to comment Share on other sites More sharing options...
Honorable Member xP3NG3Rx 19730 Posted September 17, 2015 Honorable Member Share Posted September 17, 2015 (edited) Server\game\src\shop.cpp > "int CShop::Buy(LPCHARACTER ch, BYTE pos)" Search and replace this: if (IsPCShop()) { if (!pkSelectedItem) { sys_log(0, "Shop::Buy : Critical: This user seems to be a hacker : invalid pcshop item : BuyerPID:%d SellerPID:%d", ch->GetPlayerID(), m_pkPC->GetPlayerID()); return false; } if ((pkSelectedItem->GetOwner() != m_pkPC)) { sys_log(0, "Shop::Buy : Critical: This user seems to be a hacker : invalid pcshop item : BuyerPID:%d SellerPID:%d", ch->GetPlayerID(), m_pkPC->GetPlayerID()); return false; } } With this: if (IsPCShop()) { if (!pkSelectedItem) { sys_log(0, "Shop::Buy1 : Critical: This user seems to be a hacker : invalid pcshop item : BuyerPID:%d SellerPID:%d", ch->GetPlayerID(), m_pkPC->GetPlayerID()); return SHOP_SUBHEADER_GC_SOLDOUT; } if ((pkSelectedItem->GetOwner() != m_pkPC)) { sys_log(0, "Shop::Buy2 : Critical: This user seems to be a hacker : invalid pcshop item : BuyerPID:%d SellerPID:%d", ch->GetPlayerID(), m_pkPC->GetPlayerID()); return SHOP_SUBHEADER_GC_SOLDOUT; } } You could remove the sys_log about hacker thing because it not necessary. if (IsPCShop() && (!pkSelectedItem || pkSelectedItem->GetOwner() != m_pkPC)) return SHOP_SUBHEADER_GC_SOLDOUT; Edited September 17, 2015 by xP3NG3Rx 1 Link to comment Share on other sites More sharing options...
MORTE 79 Posted September 17, 2015 Author Share Posted September 17, 2015 if (IsPCShop()) { if (!pkSelectedItem) { sys_log(0, "Shop::Buy : Critical: This user seems to be a hacker : invalid pcshop item : BuyerPID:%d SellerPID:%d", ch->GetPlayerID(), m_pkPC->GetPlayerID()); return false; } if ((pkSelectedItem->GetOwner() != m_pkPC)) { sys_log(0, "Shop::Buy : Critical: This user seems to be a hacker : invalid pcshop item : BuyerPID:%d SellerPID:%d", ch->GetPlayerID(), m_pkPC->GetPlayerID()); return false; } } to if (IsPCShop() && (!pkSelectedItem || pkSelectedItem->GetOwner() != m_pkPC)) return SHOP_SUBHEADER_GC_SOLDOUT; replace it? Link to comment Share on other sites More sharing options...
Honorable Member xP3NG3Rx 19730 Posted September 17, 2015 Honorable Member Share Posted September 17, 2015 (edited) If you do not want to see that "seems hacker" message in the syslog, yes. Image Edited August 19, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
MORTE 79 Posted September 17, 2015 Author Share Posted September 17, 2015 (edited) thank you! Edited September 17, 2015 by MORTE Link to comment Share on other sites More sharing options...
MORTE 79 Posted September 19, 2015 Author Share Posted September 19, 2015 (edited) xP3NG3Rx After doing so, I compiled and now when I die 2 or 3 times character takes DC , you know why? Edited August 24, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now