当前位置: 首页>>代码示例>>C++>>正文


C++ CellGuidSet类代码示例

本文整理汇总了C++中CellGuidSet的典型用法代码示例。如果您正苦于以下问题:C++ CellGuidSet类的具体用法?C++ CellGuidSet怎么用?C++ CellGuidSet使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了CellGuidSet类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: LoadHelper

void LoadHelper(CellGuidSet const& guid_set, CellPair& cell, GridRefManager<T>& /*m*/, uint32& count, Map* map, GridType& grid)
{
    BattleGround* bg = map->IsBattleGroundOrArena() ? ((BattleGroundMap*)map)->GetBG() : NULL;

    for (CellGuidSet::const_iterator i_guid = guid_set.begin(); i_guid != guid_set.end(); ++i_guid)
    {
        uint32 guid = *i_guid;

        T* obj = new T;
        // sLog.outString("DEBUG: LoadHelper from table: %s for (guid: %u) Loading",table,guid);
        if (!obj->LoadFromDB(guid, map))
        {
            delete obj;
            continue;
        }

        grid.AddGridObject(obj);

        addUnitState(obj, cell);
        obj->SetMap(map);
        obj->AddToWorld();
        if (obj->isActiveObject())
            map->AddToActive(obj);

        obj->GetViewPoint().Event_AddedToWorld(&grid);

        if (bg)
            bg->OnObjectDBLoad(obj);

        ++count;
    }
}
开发者ID:Davuk,项目名称:mangos-cata,代码行数:32,代码来源:ObjectGridLoader.cpp

示例2: LoadHelper

void LoadHelper(CellGuidSet const& guid_set, CellPair &cell,
		GridRefManager<T> &m, uint32 &count, Map* map) {
	for (CellGuidSet::const_iterator i_guid = guid_set.begin();
			i_guid != guid_set.end(); ++i_guid) {
		T* obj = new T;
		uint32 guid = *i_guid;
		//sLog->outString("DEBUG: LoadHelper from table: %s for (guid: %u) Loading", table, guid);
		if (!obj->LoadFromDB(guid, map)) {
			delete obj;
			continue;
		}

		AddObjectHelper(cell, m, count, map, obj);
	}
}
开发者ID:ProjectStarGate,项目名称:StarGate-Plus-EMU,代码行数:15,代码来源:ObjectGridLoader.cpp

示例3: LoadHelper

void LoadHelper(CellGuidSet const& guid_set, CellCoord &cell, GridRefManager<T> &m, uint32 &count, Map* map)
{
    for (CellGuidSet::const_iterator i_guid = guid_set.begin(); i_guid != guid_set.end(); ++i_guid)
    {
        T* obj = new T;
        ObjectGuid::LowType guid = *i_guid;
        //TC_LOG_INFO("misc", "DEBUG: LoadHelper from table: %s for (guid: %u) Loading", table, guid);
        if (!obj->LoadFromDB(guid, map))
        {
            delete obj;
            continue;
        }

        AddObjectHelper(cell, m, count, map, obj);
    }
}
开发者ID:Diyvol,项目名称:TrinityCore,代码行数:16,代码来源:ObjectGridLoader.cpp


注:本文中的CellGuidSet类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。