本文整理汇总了C++中GuidSet::clear方法的典型用法代码示例。如果您正苦于以下问题:C++ GuidSet::clear方法的具体用法?C++ GuidSet::clear怎么用?C++ GuidSet::clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GuidSet
的用法示例。
在下文中一共展示了GuidSet::clear方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Reset
void Reset() override
{
for (unsigned int& i : m_uiSpiritTimer)
i = urand(0, 1000);
m_sSpiritsGuidsSet.clear();
}
示例2: DespawnIntroCreatures
void DespawnIntroCreatures()
{
if (m_pInstance)
{
for (GuidSet::const_iterator itr = m_lIntroMobsSet.begin(); itr != m_lIntroMobsSet.end(); ++itr)
{
if (Creature* pCreature = m_pInstance->instance->GetCreature(*itr))
pCreature->ForcedDespawn();
}
}
m_lIntroMobsSet.clear();
}
示例3: DespawnAdds
void DespawnAdds()
{
if (m_pInstance)
{
for (GuidSet::const_iterator itr = m_lAddsSet.begin(); itr != m_lAddsSet.end(); ++itr)
{
if (Creature* pCreature = m_pInstance->instance->GetCreature(*itr))
{
if (pCreature->isAlive())
{
pCreature->AI()->EnterEvadeMode();
pCreature->ForcedDespawn(15000);
}
}
}
}
m_lAddsSet.clear();
}
示例4: Reset
void Reset() override
{
m_uiVisualTimer = 1000;
m_sWretchedGuids.clear();
}
示例5: Reset
void Reset() override
{
Initialize();
_Reset();
lWrappedPlayers.clear();
}
示例6: SendLfgUpdateList
void WorldSession::SendLfgUpdateList(uint32 dungeonID)
{
if (!sWorld.getConfig(CONFIG_BOOL_LFR_ENABLE))
{
DEBUG_LOG("SendLfgUpdateList %u failed - Raid finder disabled", GetPlayer()->GetObjectGuid().GetCounter());
return;
}
DEBUG_LOG("SMSG_LFG_SEARCH_RESULTS %u dungeonentry: %u ", GetPlayer()->GetObjectGuid().GetCounter(), dungeonID);
LFGDungeonEntry const* dungeon = sLFGMgr.GetDungeon(dungeonID);
if (!dungeon)
return;
Team team = sWorld.getConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_INTERACTION_GROUP) ? TEAM_NONE : GetPlayer()->GetTeam();
GuidSet groups = sLFGMgr.GetDungeonGroupQueue(dungeon, team);
GuidSet players = sLFGMgr.GetDungeonPlayerQueue(dungeon, team);
uint32 groupCount = groups.size();
uint32 groupSize = 4+4;
for (GuidSet::const_iterator itr = groups.begin(); itr != groups.end(); ++itr)
{
Group* pGroup = sObjectMgr.GetGroup(*itr);
if (!pGroup)
continue;
Player* pLeader = sObjectMgr.GetPlayer(pGroup->GetLeaderGuid());
if (!pLeader)
continue;
sLFGMgr.GetLFGPlayerState(pLeader->GetObjectGuid())->AddFlags(LFG_MEMBER_FLAG_CHARINFO |
LFG_MEMBER_FLAG_COMMENT |
LFG_MEMBER_FLAG_GROUPLEADER |
LFG_MEMBER_FLAG_GROUPGUID |
LFG_MEMBER_FLAG_ROLES |
LFG_MEMBER_FLAG_AREA |
LFG_MEMBER_FLAG_STATUS |
LFG_MEMBER_FLAG_BIND);
uint32 flags = sLFGMgr.GetLFGPlayerState(pLeader->GetObjectGuid())->GetFlags();
if (flags & LFG_MEMBER_FLAG_COMMENT)
groupSize += sLFGMgr.GetLFGPlayerState(pLeader->GetObjectGuid())->GetComment().size()+1;
if (flags & LFG_MEMBER_FLAG_ROLES)
groupSize +=3;
if (flags & LFG_MEMBER_FLAG_BIND)
groupSize += (8+4);
players.insert(*itr);
for (GroupReference *itr2 = pGroup->GetFirstMember(); itr2 != NULL; itr2 = itr2->next())
{
Player* player = itr2->getSource();
if (!player || player == pLeader)
continue;
sLFGMgr.GetLFGPlayerState(player->GetObjectGuid())->AddFlags(LFG_MEMBER_FLAG_GROUPLEADER |
LFG_MEMBER_FLAG_GROUPGUID |
LFG_MEMBER_FLAG_STATUS);
sLFGMgr.GetLFGPlayerState(player->GetObjectGuid())->RemoveFlags(LFG_MEMBER_FLAG_CHARINFO |
LFG_MEMBER_FLAG_COMMENT |
LFG_MEMBER_FLAG_ROLES |
LFG_MEMBER_FLAG_AREA |
LFG_MEMBER_FLAG_BIND);
players.insert(player->GetObjectGuid());
}
}
uint32 playerCount = players.size();
uint32 playerSize = 4+4;
uint32 guidsSize = 0;
GuidSet playersUpdated;
playersUpdated.clear();
for(GuidSet::const_iterator itr = players.begin(); itr != players.end(); ++itr)
{
Player* player = sObjectMgr.GetPlayer(*itr);
if (!player || !player->IsInWorld())
continue;
uint32 flags = sLFGMgr.GetLFGPlayerState(player->GetObjectGuid())->GetFlags();
playerSize += (8+4);
if (flags & LFG_MEMBER_FLAG_CHARINFO)
playerSize += (1+1+1+3+4+4+4+4+4+4+4+4+4+4+4+4+4+4+4+4+4+4+4+4);
if (flags & LFG_MEMBER_FLAG_COMMENT)
playerSize += sLFGMgr.GetLFGPlayerState(player->GetObjectGuid())->GetComment().size()+1; // comment
if (flags & LFG_MEMBER_FLAG_GROUPLEADER)
playerSize += 1;
//.........这里部分代码省略.........