當前位置: 首頁>>代碼示例>>C++>>正文


C++ FindBaseMap函數代碼示例

本文整理匯總了C++中FindBaseMap函數的典型用法代碼示例。如果您正苦於以下問題:C++ FindBaseMap函數的具體用法?C++ FindBaseMap怎麽用?C++ FindBaseMap使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了FindBaseMap函數的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: FindBaseMap

Map* MapManager::CreateBaseMap(uint32 id)
{
    Map* map = FindBaseMap(id);

    if (map == NULL)
    {
        TRINITY_GUARD(ACE_Thread_Mutex, Lock);

        map = FindBaseMap(id);
        if (map == NULL) // pussywizard: check again after acquiring mutex
        {
            MapEntry const* entry = sMapStore.LookupEntry(id);
            ASSERT(entry);

            if (entry->Instanceable())
                map = new MapInstanced(id);
            else
            {
                map = new Map(id, 0, REGULAR_DIFFICULTY);
                map->LoadRespawnTimes();
            }

            i_maps[id] = map;
        }
    }

    ASSERT(map);
    return map;
}
開發者ID:AlexHjelm,項目名稱:sunwell,代碼行數:29,代碼來源:MapManager.cpp

示例2: FindBaseMap

Map* MapManager::FindBaseNonInstanceMap(uint32 mapId) const
{
    Map* map = FindBaseMap(mapId);
    if (map && map->Instanceable())
        return NULL;
    return map;
}
開發者ID:Davuk,項目名稱:ArkCORE-NG,代碼行數:7,代碼來源:MapManager.cpp

示例3: FindBaseMap

Map* MapManager::CreateBaseMap(uint32 id)
{
    Map* map = FindBaseMap(id);

    if (map == nullptr)
    {
        std::lock_guard<std::mutex> lock(_mapsLock);

        MapEntry const* entry = sMapStore.LookupEntry(id);
        ASSERT(entry);

        if (entry->Instanceable())
            map = new MapInstanced(id, i_gridCleanUpDelay);
        else
        {
            map = new Map(id, i_gridCleanUpDelay, 0, REGULAR_DIFFICULTY);
            map->LoadRespawnTimes();
            map->LoadCorpseData();
        }

        i_maps[id] = map;
    }

    ASSERT(map);
    return map;
}
開發者ID:Refuge89,項目名稱:TrinityCore,代碼行數:26,代碼來源:MapManager.cpp

示例4: FindBaseMap

Map* MapManager::CreateBaseMap(uint32 id)
{
    Map* map = FindBaseMap(id);

    if (!map)
    {
        MapEntry const* entry = sMapStore.AssertEntry(id);
        if (entry->ParentMapID != -1)
        {
            CreateBaseMap(entry->ParentMapID);

            // must have been created by parent map
            map = FindBaseMap(id);
            return ASSERT_NOTNULL(map);
        }

        std::lock_guard<std::mutex> lock(_mapsLock);
        map = CreateBaseMap_i(entry);
    }

    ASSERT(map);
    return map;
}
開發者ID:090809,項目名稱:TrinityCore,代碼行數:23,代碼來源:MapManager.cpp

示例5: FindBaseMap

Map* MapManager::CreateBaseMap(uint32 id)
{
    Map* m = FindBaseMap(id);

    if (m == NULL)
    {
        SKYFIRE_GUARD(ACE_Thread_Mutex, Lock);

        const MapEntry* entry = sMapStore.LookupEntry(id);
        if (entry && entry->Instanceable())
        {
            m = new MapInstanced(id, i_gridCleanUpDelay);
        }
        else
        {
            m = new Map(id, i_gridCleanUpDelay, 0, REGULAR_DIFFICULTY);
        }
        i_maps[id] = m;
    }

    ASSERT(m != NULL);
    return m;
}
開發者ID:SkyFireArchives,項目名稱:SkyFireEMU_406a,代碼行數:23,代碼來源:MapManager.cpp


注:本文中的FindBaseMap函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。