本文整理汇总了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;
}
}
示例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);
}
}
示例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);
}
}