mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-23 18:17:46 +00:00
Correctly send time left
This commit is contained in:
parent
e62c2ce6c1
commit
41475a0e76
1 changed files with 3 additions and 1 deletions
|
@ -93,10 +93,12 @@ 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 = effect.second->getDuration();
|
||||
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();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue