/**
 * \file Params.h
 * \date 14.04.2003
 *
 * Server parameters in world model
 */

#ifndef COMMON_WORLD_PARAMS_H
#define COMMON_WORLD_PARAMS_H

#include "Player/World/WorldObject.h"
#include "Common/World/ParamStructs.h"
#include "Common/World/Types.h"
#include "Common/World/Point.h"

/**
 * \class Params
 * \author Matus Horvath
 * \brief Server and player parameters
 */
class Params : public WorldObject
{
public:
	// Construction and destruction
	Params(World* w);
	Params(const Params& params);
	virtual ~Params();

	// Set up params from server information
	void ProcessServerParams(const SERVER_PARAMS* params);
	void ProcessPlayerParams(const PLAYER_PARAMS* params);
	void ProcessPlayerType(int id, const PLAYER_TYPE* type);

public:
	SERVER_PARAMS* server;
	PLAYER_PARAMS* player;
	PLAYER_TYPE** types;

	Point flags[FLAG_MAX];

protected:
	void SetupFlags();

};

#endif // COMMON_WORLD_PARAMS_H
