Esempio n. 1
0
PlayerSet PlayerMapHelper::GetAllSet() const
{
	PlayerSet ret;
	//if (Player::GetSharedState().amountChanged)
	{
		for (const auto& pair : m_playerMap)
		{
			ret.insert(pair.second);
		}
		//Player::GetSharedState().amountChanged = false;
	}
	return ret;
}
Esempio n. 2
0
PlayerSet PlayerMapHelper::GetByTeamSet(char team) const
{
	PlayerSet ret;
	for (const auto& pair : m_playerMap)
	{
		Player* pl = pair.second;
		if (pl->GetTeamTag() == team)
		{
			ret.insert(pl);
		}
	}
	return ret;
}
Esempio n. 3
0
PlayerSet PlayerMapHelper::GetByStatusSet(PlayerState::IngameStatus status) const
{
	PlayerSet ret;
	//if (Player::GetSharedState().statusChanged)
	{
		for (const auto& pair : m_playerMap)
		{
			Player* pl = pair.second;
			if (pl->GetState().GetStatus() == status)
			{
				ret.insert(pl);
			}
		}
		//Player::GetSharedState().statusChanged = false;
	}
	return ret;
}
Esempio n. 4
0
PlayerSet PlayerMapHelper::GetByPhaseSet(PlayerState::GamePhase phase) const
{
	PlayerSet ret;
	//if (Player::GetSharedState().phaseChanged)
	{
		for (const auto& pair : m_playerMap)
		{
			Player* pl = pair.second;
			if (pl->GetState().GetPhase() == phase)
			{
				ret.insert(pl);
			}
		}
		//Player::GetSharedState().phaseChanged = false;
	}
	return ret;
}