mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-27 14:57:44 +00:00
Fix non-existing lut entry being executed.
This commit is contained in:
parent
86a2f18f25
commit
1ff69bcce0
1 changed files with 3 additions and 2 deletions
|
@ -391,8 +391,9 @@ void Action::Action::buildEffects()
|
||||||
snapshotAffectedActors( m_hitActors );
|
snapshotAffectedActors( m_hitActors );
|
||||||
|
|
||||||
auto pScriptMgr = m_pFw->get< Scripting::ScriptMgr >();
|
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() )
|
if( auto player = m_pSource->getAsPlayer() )
|
||||||
{
|
{
|
||||||
|
@ -402,7 +403,7 @@ void Action::Action::buildEffects()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( m_hitActors.empty() )
|
if( !hasLutEntry || m_hitActors.empty() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
auto lutEntry = ActionLut::getEntry( static_cast< uint16_t >( getId() ) );
|
auto lutEntry = ActionLut::getEntry( static_cast< uint16_t >( getId() ) );
|
||||||
|
|
Loading…
Add table
Reference in a new issue