mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-11 04:57:45 +00:00
Fixed another bug with self target actions.
This commit is contained in:
parent
72f06fb072
commit
54ba2b529f
2 changed files with 9 additions and 2 deletions
|
@ -123,7 +123,15 @@ std::shared_ptr< FFXIVPacketBase > ActionResultBuilder::createActionResultPacket
|
||||||
actionResult->setResultId( m_resultId );
|
actionResult->setResultId( m_resultId );
|
||||||
actionResult->setEffectFlags( Common::ActionEffectDisplayType::HideActionName );
|
actionResult->setEffectFlags( Common::ActionEffectDisplayType::HideActionName );
|
||||||
if( !m_actorResultsMap.empty() )
|
if( !m_actorResultsMap.empty() )
|
||||||
taskMgr.queueTask( World::makeActionIntegrityTask( m_resultId, m_sourceChara, m_actorResultsMap.begin()->second, 300 ) );
|
taskMgr.queueTask( World::makeActionIntegrityTask( m_resultId, m_sourceChara, m_actorResultsMap.begin()->second, 0 ) );
|
||||||
|
|
||||||
|
for( auto& result : m_actorResultsMap.begin()->second )
|
||||||
|
{
|
||||||
|
auto effect = result->getCalcResultParam();
|
||||||
|
if( result->getTarget() == m_sourceChara )
|
||||||
|
actionResult->addSourceEffect( effect );
|
||||||
|
}
|
||||||
|
|
||||||
m_actorResultsMap.clear();
|
m_actorResultsMap.clear();
|
||||||
return actionResult;
|
return actionResult;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,6 @@ using namespace Sapphire::Network::Packets::WorldPackets::Server;
|
||||||
|
|
||||||
ActionIntegrityTask::ActionIntegrityTask( uint32_t resultId, Entity::CharaPtr pTarget, Action::ActionResultList& results, uint64_t delayTime ) : Task( delayTime )
|
ActionIntegrityTask::ActionIntegrityTask( uint32_t resultId, Entity::CharaPtr pTarget, Action::ActionResultList& results, uint64_t delayTime ) : Task( delayTime )
|
||||||
{
|
{
|
||||||
Logger::debug( "Constructor called {} {} {}", resultId, pTarget->getId(), results.size() );
|
|
||||||
m_resultId = resultId;
|
m_resultId = resultId;
|
||||||
m_pTarget = std::move( pTarget );
|
m_pTarget = std::move( pTarget );
|
||||||
m_results = results;
|
m_results = results;
|
||||||
|
|
Loading…
Add table
Reference in a new issue