mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-23 18:17:46 +00:00
Added getters for effects
This commit is contained in:
parent
b6a20b465c
commit
aba22a319b
4 changed files with 14 additions and 1 deletions
|
@ -645,3 +645,8 @@ void Core::Entity::Actor::addStatusEffectByIdIfNotExist( int32_t id, int32_t dur
|
|||
}
|
||||
}
|
||||
|
||||
Core::StatusEffect::StatusEffectContainerPtr Core::Entity::Actor::getStatusEffectContainer() const
|
||||
{
|
||||
return m_pStatusEffectContainer;
|
||||
}
|
||||
|
||||
|
|
|
@ -298,6 +298,8 @@ public:
|
|||
// add a status effect by id if it doesn't exist
|
||||
void addStatusEffectByIdIfNotExist( int32_t id, int32_t duration, uint16_t param = 0 );
|
||||
|
||||
StatusEffect::StatusEffectContainerPtr getStatusEffectContainer() const;
|
||||
|
||||
// TODO: Why did i even declare them publicly here?!
|
||||
std::set< ActorPtr > m_inRangeActors;
|
||||
std::set< PlayerPtr > m_inRangePlayers;
|
||||
|
|
|
@ -40,6 +40,11 @@ void Core::StatusEffect::StatusEffectContainer::freeSlot( uint8_t slotId )
|
|||
m_freeEffectSlotQueue.push( slotId );
|
||||
}
|
||||
|
||||
std::map< uint8_t, Core::StatusEffect::StatusEffectPtr > Core::StatusEffect::StatusEffectContainer::getEffectMap() const
|
||||
{
|
||||
return m_effectMap;
|
||||
}
|
||||
|
||||
|
||||
Core::StatusEffect::StatusEffectContainer::~StatusEffectContainer()
|
||||
{
|
||||
|
|
|
@ -28,6 +28,8 @@ public:
|
|||
int8_t getFreeSlot();
|
||||
void freeSlot( uint8_t slotId );
|
||||
|
||||
std::map< uint8_t, Core::StatusEffect::StatusEffectPtr > getEffectMap() const;
|
||||
|
||||
void sendUpdate();
|
||||
|
||||
|
||||
|
@ -37,7 +39,6 @@ private:
|
|||
Entity::ActorPtr m_pOwner;
|
||||
std::queue< uint8_t > m_freeEffectSlotQueue;
|
||||
|
||||
std::vector< StatusEffectPtr > m_effectList;
|
||||
std::vector< std::pair< uint8_t, uint32_t> > m_tickEffectList;
|
||||
std::map< uint8_t, StatusEffectPtr > m_effectMap;
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue