bool block = false;
#ifdef SHOP_ONLY_ALLOWED_INDEX
if (shop_max > 0)
{
#else
if (shop_max == 0)
block = true;
else {
#endif
std::auto_ptr <SQLMsg> pkMsg(DBManager::instance().DirectQuery("SELECT map_index from player_shop WHERE channel=%d and status='OK' and map_index=%d", g_bChannel, GetMapIndex()));
SQLResult* pRes = pkMsg->Get();
if (pRes->uiNumRows >= shop_max)
block = true;
}
if (block)
{
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("SHOP_MAP_MAX"));
return;
}
}