/*********************************************************************//**
*	\brief Sklad zbrani a naboju.
*	Implementace objektu, ktery udrzuje informace o zbranich
*	a poctech naboju.
*
*	\author Michal Jirous
*	\date 8.12.2008
*	\file war_storage.h
**********************************************************************/

#ifndef __WAR_STORAGE_H__
#define __WAR_STORAGE_H__

#include "weapons.h"

/** @brief Objekt, ktery udrzuje informace o zbranich a nabojich. */
class WarStorage
{
	AmmoElement ammunition[AMMO_COUNT];
	BasicWeapon* weapons[WEAPONS_COUNT];
public:
	WarStorage();	/*!< @brief Konstruktor inicialzuje datove struktury. */
	~WarStorage();	/*!< @brief Destruktor dealokuje vsechna alokovana data. */
	void init( );	/*!< @brief Vytvoreni vsech potrebnych dat pro fungovani skladu. */
	AmmoElement *getAmmo( unsigned int ammo_type );		/*!< @brief Zjistuje objekt naboje dle Id. */
	BasicWeapon *getWeapon( unsigned int weapon_type );	/*!< @brief Zjistuje objekt zbrane dle Id. */
	
	unsigned int getAmmoAmount( unsigned int ammo_type );/*!< @brief Zjistuje pocet naboju dle Id. */
	void addAmmo( unsigned int ammo_type, unsigned int amount );	/*!< @brief Prida naboje dle Id. */
	void removeAmmo( unsigned int ammo_type, unsigned int amount );	/*!< @brief Odebere naboje dle Id. */
	void setAmmo( unsigned int ammo_type, unsigned int amount );	/*!< @brief Nastavi pocet naboju dle Id. */
};


#endif
