mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-23 18:17:46 +00:00
Merge ca8c40a1b2
into e3f22108df
This commit is contained in:
commit
c64481c621
7 changed files with 28 additions and 3 deletions
|
@ -1 +1 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><result><return_code>OK</return_code><information><item><title>It works</title><published>1485447328</published><updated>1485447484</updated><lsb_id>133a2a9464b7a1e1cb77ed6899fc8e813b273d29</lsb_id><lsb_parentid></lsb_parentid><lsb_tag></lsb_tag><catId>4</catId><content>This is a Sapphire Test topic.</content></item></information><inquiry_categoryList><mainCategory><label>TestMainCategory</label><mainCategoryId>58</mainCategoryId><subCategoryList><subCategory><label>TestSubCategory</label><subCategoryId>342</subCategoryId></subCategoryList></mainCategory></inquiry_categoryList><inquiry_itemList><item><title>Test Inquiry</title><kid>1111</kid></item></inquiry_itemList><report_itemList/></result>
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><result><return_code>OK</return_code><information><item><title>It works</title><published>1485447328</published><updated>1485447484</updated><lsb_id>133a2a9464b7a1e1cb77ed6899fc8e813b273d29</lsb_id><lsb_parentid></lsb_parentid><lsb_tag></lsb_tag><catId>4</catId><content>This is a Sapphire Test topic.</content></item></information><inquiry_categoryList><mainCategory><label>TestMainCategory</label><mainCategoryId>58</mainCategoryId><subCategoryList><subCategory><label>TestSubCategory</label><subCategoryId>342</subCategoryId></subCategory></subCategoryList></mainCategory></inquiry_categoryList><inquiry_itemList><item><title>Test Inquiry</title><kid>1111</kid></item></inquiry_itemList><report_itemList/></result>
|
|
@ -650,3 +650,8 @@ void Core::Entity::Actor::removeSingleStatusEffectFromId( int32_t id )
|
|||
{
|
||||
m_pStatusEffectContainer->removeSingleStatusEffectFromId( id );
|
||||
}
|
||||
|
||||
Core::StatusEffect::StatusEffectContainerPtr Core::Entity::Actor::getStatusEffectContainer() const
|
||||
{
|
||||
return m_pStatusEffectContainer;
|
||||
}
|
||||
|
|
|
@ -301,6 +301,8 @@ public:
|
|||
// remove a status effect by id
|
||||
void removeSingleStatusEffectFromId( int32_t id );
|
||||
|
||||
StatusEffect::StatusEffectContainerPtr getStatusEffectContainer() const;
|
||||
|
||||
// TODO: Why did i even declare them publicly here?!
|
||||
std::set< ActorPtr > m_inRangeActors;
|
||||
std::set< PlayerPtr > m_inRangePlayers;
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
#include <src/servers/Server_Common/Util/UtilMath.h>
|
||||
#include "src/servers/Server_Zone/Actor/Player.h"
|
||||
#include "src/servers/Server_Zone/Forwards.h"
|
||||
#include "src/servers/Server_Zone/StatusEffect/StatusEffectContainer.h"
|
||||
#include "src/servers/Server_Zone/StatusEffect/StatusEffect.h"
|
||||
|
||||
namespace Core {
|
||||
namespace Network {
|
||||
|
|
|
@ -93,6 +93,16 @@ namespace Server {
|
|||
//m_data.unknown_60 = 3;
|
||||
//m_data.unknown_61 = 7;
|
||||
|
||||
uint64_t currentTimeMs = Util::getTimeMs();
|
||||
|
||||
for( auto const& effect : pPlayer->getStatusEffectContainer()->getEffectMap() )
|
||||
{
|
||||
m_data.effect[effect.first].effect_id = effect.second->getId();
|
||||
m_data.effect[effect.first].duration = static_cast< float >( effect.second->getDuration() - ( currentTimeMs - effect.second->getStartTimeMs() ) ) / 1000;
|
||||
m_data.effect[effect.first].sourceActorId = effect.second->getSrcActorId();
|
||||
m_data.effect[effect.first].unknown1 = effect.second->getParam();
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
};
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
|
|
|
@ -29,6 +29,8 @@ public:
|
|||
int8_t getFreeSlot();
|
||||
void freeSlot( uint8_t slotId );
|
||||
|
||||
std::map< uint8_t, Core::StatusEffect::StatusEffectPtr > getEffectMap() const;
|
||||
|
||||
void sendUpdate();
|
||||
|
||||
|
||||
|
@ -38,7 +40,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