All pastes #991610 Raw Edit

Miscellany

public cpp v1 · immutable
#991610 ·published 2008-04-21 05:06 UTC
rendered paste body
typedef set<Group*> RaidList;RaidList m_raids;void RaidQueue(Player * pPlayer){	if(pPlayer->GetGroup())		return;	if(m_raids.size() != 0)	{		for(RaidList::iterator itr = m_raids.begin(); itr != m_raids.end(); itr++)		{			Group * raid = (*itr);			if(raid == NULL)			{				m_raids.erase(raid);				continue;			}			Player * pLeader = objmgr.GetPlayer(raid->GetLeader()->name, false);			if(raid->IsFull() || pLeader == NULL || pLeader->IsInWorld())				continue;			if(raid->GetLeader()->team != pPlayer->GetTeam())				continue;			raid->AddMember(pPlayer->m_playerInfo);			return;		}	}	Group * raid = Group::Create();	raid->AddMember(pPlayer->m_playerInfo);	raid->SetLeader(pPlayer, true);	raid->ExpandToRaid();	m_raids.insert(raid);}