1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-03 17:27:47 +00:00

Fixed script skill processing

This commit is contained in:
Kooper16 2023-07-23 22:01:26 +02:00
parent 97e1772d7f
commit 8a288f34f3

View file

@ -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 )
@ -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