本文整理汇总了C++中DungeonMap::PermBindAllPlayers方法的典型用法代码示例。如果您正苦于以下问题:C++ DungeonMap::PermBindAllPlayers方法的具体用法?C++ DungeonMap::PermBindAllPlayers怎么用?C++ DungeonMap::PermBindAllPlayers使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DungeonMap
的用法示例。
在下文中一共展示了DungeonMap::PermBindAllPlayers方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateEncounterState
void DungeonPersistentState::UpdateEncounterState(EncounterCreditType type, uint32 creditEntry, Player* player)
{
DungeonEncounterList const* encounterList = sObjectMgr.GetDungeonEncounterList(GetMapId(), GetDifficulty());
if (!encounterList)
return;
for (DungeonEncounterList::const_iterator itr = encounterList->begin(); itr != encounterList->end(); ++itr)
{
if ((*itr)->creditType == type && (*itr)->creditEntry == creditEntry)
{
uint32 oldMask = m_completedEncountersMask;
m_completedEncountersMask |= 1 << (*itr)->dbcEntry->encounterIndex;
if ( m_completedEncountersMask != oldMask)
{
CharacterDatabase.PExecute("UPDATE instance SET encountersMask = '%u' WHERE id = '%u'", m_completedEncountersMask, GetInstanceId());
DEBUG_LOG("DungeonPersistentState: Dungeon %s (Id %u) completed encounter %s", GetMap()->GetMapName(), GetInstanceId(), (*itr)->dbcEntry->encounterName[sWorld.GetDefaultDbcLocale()]);
if (uint32 dungeonId = (*itr)->lastEncounterDungeon)
{
DEBUG_LOG("DungeonPersistentState:: Dungeon %s (Id %u) completed last encounter %s", GetMap()->GetMapName(), GetInstanceId(), (*itr)->dbcEntry->encounterName[sWorld.GetDefaultDbcLocale()]);
// Place LFG reward there!
}
DungeonMap* dungeon = (DungeonMap*)GetMap();
if (dungeon && player)
dungeon->PermBindAllPlayers(player, dungeon->IsRaidOrHeroicDungeon());
SaveToDB();
}
return;
}
}
}
示例2: UpdateEncounterState
void DungeonPersistentState::UpdateEncounterState(EncounterCreditType type, uint32 creditEntry)
{
DungeonEncounterMapBounds bounds = sObjectMgr.GetDungeonEncounterBounds(creditEntry);
for (DungeonEncounterMap::const_iterator itr = bounds.first; itr != bounds.second; ++itr)
{
DungeonEncounterEntry const* dbcEntry = itr->second->dbcEntry;
if (itr->second->creditType == type && dbcEntry->Difficulty == GetDifficulty() && dbcEntry->mapId == GetMapId())
{
uint32 oldMask = m_completedEncountersMask;
m_completedEncountersMask |= 1 << dbcEntry->encounterIndex;
if ( m_completedEncountersMask != oldMask)
{
CharacterDatabase.PExecute("UPDATE instance SET encountersMask = '%u' WHERE id = '%u'", m_completedEncountersMask, GetInstanceId());
DEBUG_LOG("DungeonPersistentState: Dungeon %s (Id %u) completed encounter %s", GetMap()->GetMapName(), GetInstanceId(), dbcEntry->encounterName[sWorld.GetDefaultDbcLocale()]);
uint32 dungeonId = itr->second->lastEncounterDungeon;
if (dungeonId)
DEBUG_LOG("DungeonPersistentState:: Dungeon %s (Id %u) completed last encounter %s", GetMap()->GetMapName(), GetInstanceId(), dbcEntry->encounterName[sWorld.GetDefaultDbcLocale()]);
DungeonMap* dungeon = (DungeonMap*)GetMap();
if (!dungeon || dungeon->GetPlayers().isEmpty())
return;
Player* player = dungeon->GetPlayers().begin()->getSource();
if (dungeon && player)
dungeon->PermBindAllPlayers(player, dungeon->IsRaidOrHeroicDungeon());
SaveToDB();
if (dungeon && player->GetGroup() && player->GetGroup()->isLFGGroup())
{
sLFGMgr.DungeonEncounterReached(player->GetGroup());
if ((sWorld.getConfig(CONFIG_BOOL_LFG_ONLYLASTENCOUNTER) && dungeonId)
|| IsCompleted())
sLFGMgr.SendLFGRewards(player->GetGroup());
}
}
return;
}
}
}