mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-02 00:47:45 +00:00
45 lines
771 B
C
45 lines
771 B
C
![]() |
#ifndef _STATUSEFFECTCONTAINER_H_
|
||
|
#define _STATUSEFFECTCONTAINER_H_
|
||
|
|
||
|
#include <boost/shared_ptr.hpp>
|
||
|
|
||
|
#include <queue>
|
||
|
#include <map>
|
||
|
|
||
|
#include "Forwards.h"
|
||
|
|
||
|
namespace Core
|
||
|
{
|
||
|
namespace StatusEffect
|
||
|
{
|
||
|
|
||
|
class StatusEffectContainer
|
||
|
{
|
||
|
public:
|
||
|
StatusEffectContainer( Entity::ActorPtr pOwner );
|
||
|
~StatusEffectContainer();
|
||
|
|
||
|
void addStatusEffect( StatusEffectPtr pEffect );
|
||
|
void removeStatusEffect( uint8_t effectSlotId );
|
||
|
void update();
|
||
|
|
||
|
int8_t getFreeSlot();
|
||
|
void freeSlot( uint8_t slotId );
|
||
|
|
||
|
void sendUpdate();
|
||
|
|
||
|
|
||
|
private:
|
||
|
const uint8_t MAX_EFFECTS = 30;
|
||
|
|
||
|
Entity::ActorPtr m_pOwner;
|
||
|
std::queue< uint8_t > m_freeEffectSlotQueue;
|
||
|
|
||
|
std::vector< StatusEffectPtr > m_effectList;
|
||
|
std::map< uint8_t, StatusEffectPtr > m_effectMap;
|
||
|
};
|
||
|
|
||
|
}
|
||
|
}
|
||
|
#endif
|