Fethi Polat 1
Fethi Polat
noisiv 1
noisiv
Manwe Work 1
Manwe Work
Scarlet 1
Scarlet
xranzei 1
xranzei
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

HERAKLES Otomatik Avlı kalıcı sunucu. 19 Haziran'da açılıyor. Atius & Wizard güvencesiyle hemen kayıt ol, ön kayıt ödülleri aktif. HEMEN TIKLA!

tek sorun kapattığında haritadan kimseyi ışınlamaz ekstra IsGm eklenebilir gmler gidebilir
 
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