本文整理汇总了C++中LfgDungeonSet::clear方法的典型用法代码示例。如果您正苦于以下问题:C++ LfgDungeonSet::clear方法的具体用法?C++ LfgDungeonSet::clear怎么用?C++ LfgDungeonSet::clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LfgDungeonSet
的用法示例。
在下文中一共展示了LfgDungeonSet::clear方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SendLfgPlayerInfo
/// <summary>
/// Build and Send LFG lock player info and reward
/// </summary>
/// <param name="plr">Player</param>
void LFGMgr::SendLfgPlayerInfo(Player *plr)
{
uint32 rsize = 0;
uint32 lsize = 0;
LfgDungeonSet *randomlist = GetRandomDungeons(plr->getLevel(), plr->GetSession()->Expansion());
LfgLockStatusSet *lockSet = GetPlayerLockStatusDungeons(plr, m_DungeonsMap[LFG_ALL_DUNGEONS]);
if (randomlist)
rsize = randomlist->size();
if (lockSet)
lsize = lockSet->size();
sLog.outDebug("SMSG_LFG_PLAYER_INFO");
WorldPacket data(SMSG_LFG_PLAYER_INFO, 1 + rsize * (4 + 1 + 4 + 4 + 4 + 4 + 1 + 4 + 4 + 4) + 4 + lsize * (4 + 4));
if (!randomlist)
{
data << uint8(0);
}
else
{
data << uint8(randomlist->size()); // Random Dungeon count
for (LfgDungeonSet::iterator it = randomlist->begin(); it != randomlist->end(); ++it)
{
data << uint32(*it); // Entry
BuildRewardBlock(data, *it, plr);
}
randomlist->clear();
delete randomlist;
}
BuildPlayerLockDungeonBlock(data, lockSet);
plr->GetSession()->SendPacket(&data);
}