mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-27 22:57:45 +00:00
Merge pull request #1 from Kooper16/status-application
Fixed script skill processing
This commit is contained in:
commit
047798f408
1 changed files with 39 additions and 36 deletions
|
@ -520,7 +520,7 @@ void Action::Action::buildActionResults()
|
|||
|
||||
Network::Util::Packet::sendHudParam( *m_pSource );
|
||||
|
||||
if( !m_enableGenericHandler || !hasLutEntry || m_hitActors.empty() )
|
||||
if( m_hitActors.empty() )
|
||||
{
|
||||
// send any effect packet added by script or an empty one just to play animation for other players
|
||||
m_actionResultBuilder->sendActionResults( {} );
|
||||
|
@ -539,6 +539,8 @@ void Action::Action::buildActionResults()
|
|||
bool shouldRestoreMP = true;
|
||||
bool shouldApplyComboSucceedEffect = true;
|
||||
|
||||
if( m_enableGenericHandler && hasLutEntry )
|
||||
{
|
||||
for( auto& actor : m_hitActors )
|
||||
{
|
||||
if( m_lutEntry.potency > 0 )
|
||||
|
@ -557,7 +559,7 @@ void Action::Action::buildActionResults()
|
|||
|
||||
if( !isComboAction() || isCorrectCombo() )
|
||||
{
|
||||
if( m_lutEntry.curePotency > 0 ) // actions with self heal
|
||||
if( m_lutEntry.curePotency > 0 )// actions with self heal
|
||||
{
|
||||
auto heal = calcHealing( m_lutEntry.curePotency );
|
||||
m_actionResultBuilder->heal( actor, m_pSource, heal.first, heal.second, Common::ActionResultFlag::EffectOnSource );
|
||||
|
@ -570,7 +572,7 @@ void Action::Action::buildActionResults()
|
|||
}
|
||||
|
||||
if( !m_lutEntry.nextCombo.empty() ) // if we have a combo action followup
|
||||
m_actionResultBuilder->startCombo( m_pSource, getId() ); // this is on all targets hit
|
||||
m_actionResultBuilder->startCombo( m_pSource, getId() );// this is on all targets hit
|
||||
}
|
||||
}
|
||||
else if( m_lutEntry.curePotency > 0 )
|
||||
|
@ -591,6 +593,10 @@ void Action::Action::buildActionResults()
|
|||
}
|
||||
}
|
||||
|
||||
if( m_lutEntry.statuses.caster.size() > 0 || m_lutEntry.statuses.target.size() > 0 )
|
||||
handleStatusEffects();
|
||||
}
|
||||
|
||||
// If we hit an enemy
|
||||
if( m_hitActors.size() > 0 && getHitChara()->getObjKind() != m_pSource->getObjKind() )
|
||||
{
|
||||
|
@ -599,9 +605,6 @@ void Action::Action::buildActionResults()
|
|||
|
||||
handleJobAction();
|
||||
|
||||
if( m_lutEntry.statuses.caster.size() > 0 || m_lutEntry.statuses.target.size() > 0 )
|
||||
handleStatusEffects();
|
||||
|
||||
m_actionResultBuilder->sendActionResults( m_hitActors );
|
||||
|
||||
// TODO: disabled, reset kills our queued actions
|
||||
|
|
Loading…
Add table
Reference in a new issue