Mt2Hizmet 1
Mt2Hizmet
Fethi Polat 1
Fethi Polat
farkmt2official 1
farkmt2official
BlackFullMoon 1
BlackFullMoon
mavzermete 1
mavzermete
Hikaye Ekle

welberw map aç kapa şeysi

  • Konuyu başlatan Konuyu başlatan mistikaptal
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 25
  • Görüntüleme Görüntüleme 2K
tek sorun kapattığında haritadan kimseyi ışınlamaz ekstra IsGm eklenebilir gmler gidebilir
sorun mu :D zaten olayı haritaya kimseyi ışınlamaması sistemin bir sorunu yok hocam sıkıntısız çalışıyor ışınlanma yüzüğü ile de test edebilirsiniz ben bizzat denedim.
 
C++:
 Aktif sunucuda gereksiz yük oluşturur.
Performans düşüklüğüne sebep olur.
Cache olarak kullanılabilir.

 std::unordered_map<long, bool> g_mapAccessCache;

bool CHARACTER::IsMapAccessAllowed(long lMapIndex)
{
    auto it = g_mapAccessCache.find(lMapIndex);
    if (it != g_mapAccessCache.end())
        return it->second;

    char query[256];
    snprintf(query, sizeof(query), "SELECT access_enabled FROM map_access_control WHERE map_index = %ld", lMapIndex);
    std::unique_ptr<SQLMsg> msg(DBManager::instance().DirectQuery(query));

    bool result = true;
    if (msg->Get()->uiNumRows > 0)
    {
        MYSQL_ROW row = mysql_fetch_row(msg->Get()->pSQLResult);
        result = row && row[0] && atoi(row[0]) != 0;
    }

    g_mapAccessCache[lMapIndex] = result;
    return result;
}
 
C++:
 Aktif sunucuda gereksiz yük oluşturur.
Performans düşüklüğüne sebep olur.
Cache olarak kullanılabilir.

 std::unordered_map<long, bool> g_mapAccessCache;

bool CHARACTER::IsMapAccessAllowed(long lMapIndex)
{
    auto it = g_mapAccessCache.find(lMapIndex);
    if (it != g_mapAccessCache.end())
        return it->second;

    char query[256];
    snprintf(query, sizeof(query), "SELECT access_enabled FROM map_access_control WHERE map_index = %ld", lMapIndex);
    std::unique_ptr<SQLMsg> msg(DBManager::instance().DirectQuery(query));

    bool result = true;
    if (msg->Get()->uiNumRows > 0)
    {
        MYSQL_ROW row = mysql_fetch_row(msg->Get()->pSQLResult);
        result = row && row[0] && atoi(row[0]) != 0;
    }

    g_mapAccessCache[lMapIndex] = result;
    return result;
}
konuya dahil ettim teşekkürler
 

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Geri
Üst