#ifndef STTEAMCOMMANDER_H
#define STTEAMCOMMANDER_H

class gzSettingsTeamCommanderClass : public stSettingsBase {
public:
	const char *GetName()
	{
		return "gzSettingsTeamCommanderClass";
	};
	void Delete();
	void Load();

	bool m_enable;
	unsigned int m_vehiclePurchaseInterval;
	int m_minimumVictoryLog;
	aWideStringArray m_commanderList;
};

class gzTeamCommanderClass : public EventHandler, public gzSettingsEvent {
public:
	const char *GetName()
	{
		return "gzTeamCommanderClass";
	}
	gzTeamCommanderClass();
	void Delete() { };
	void Settings_Loaded();
	void Level_Ended();
	void Think();
	void Player_Left(gzEventPlayerBase &);
	void Object_Created(gzEventObjectCreate &);
	bool CanBecome(int Id);
	bool IsCommander(int Team, int pID);
	void Log(const char *Message, ...);
	unsigned int m_teamPool[2];
	gzPlayer *m_commander[2];
	float m_harvMaxEngineTorque[2];
	unsigned int m_nextPurchaseTime[2];
	bool m_canRequestVehicleNotify[2];
	unsigned int m_buildingWarn[2][128];
	int m_lastBuildingWarn[2];
	unsigned int m_lastSelection;
	bool m_commanderPurchase[2];
	float m_commandTime[2];
	gzSettingsTeamCommanderClass *m_settings;
};
extern gzTeamCommanderClass *gzTeamCommander;

#endif
