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

Merge pull request #611 from collett8192/actionlut_fix

Fix non-existing lut entry being executed.
This commit is contained in:
Adam 2020-01-02 20:59:09 +11:00 committed by GitHub
commit 885746c860

View file

@ -391,8 +391,9 @@ void Action::Action::buildEffects()
snapshotAffectedActors( m_hitActors );
auto pScriptMgr = m_pFw->get< Scripting::ScriptMgr >();
auto hasLutEntry = ActionLut::validEntryExists( static_cast< uint16_t >( getId() ) );
if( !pScriptMgr->onExecute( *this ) && !ActionLut::validEntryExists( static_cast< uint16_t >( getId() ) ) )
if( !pScriptMgr->onExecute( *this ) && !hasLutEntry )
{
if( auto player = m_pSource->getAsPlayer() )
{
@ -402,7 +403,7 @@ void Action::Action::buildEffects()
return;
}
if( m_hitActors.empty() )
if( !hasLutEntry || m_hitActors.empty() )
return;
auto lutEntry = ActionLut::getEntry( static_cast< uint16_t >( getId() ) );