All pastes #994352 Raw Edit

Anonymous

public cpp v1 · immutable
#994352 ·published 2008-04-23 10:39 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;			}			if(raid->MemberCount() >= 40)				continue;			Player * pLeader = objmgr.GetPlayer(raid->GetLeader()->name, false);			if(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->ExpandToRaid();	m_raids.insert(raid);}