mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-27 03:47:45 +00:00
don't bother checking script/lut exists. if nether exists then send empty effect so other players can see it.
This commit is contained in:
parent
8d10a34174
commit
ca35fe7425
1 changed files with 1 additions and 26 deletions
|
@ -305,23 +305,6 @@ void Action::Action::start()
|
||||||
player->queuePacket( actionStartPkt );
|
player->queuePacket( actionStartPkt );
|
||||||
}
|
}
|
||||||
|
|
||||||
auto pScriptMgr = m_pFw->get< Scripting::ScriptMgr >();
|
|
||||||
|
|
||||||
// check the lut too and see if we have something usable, otherwise cancel the cast
|
|
||||||
if( !pScriptMgr->onStart( *this ) && !hasValidLutEntry() )
|
|
||||||
{
|
|
||||||
// script not implemented and insufficient lut data (no potencies)
|
|
||||||
interrupt();
|
|
||||||
|
|
||||||
if( player )
|
|
||||||
{
|
|
||||||
player->sendUrgent( "Action not implemented, missing script/lut entry for action#{0}", getId() );
|
|
||||||
player->setCurrentAction( nullptr );
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// instantly finish cast if there's no cast time
|
// instantly finish cast if there's no cast time
|
||||||
if( !hasCastTime() )
|
if( !hasCastTime() )
|
||||||
execute();
|
execute();
|
||||||
|
@ -438,15 +421,7 @@ void Action::Action::buildEffects()
|
||||||
|
|
||||||
auto pScriptMgr = m_pFw->get< Scripting::ScriptMgr >();
|
auto pScriptMgr = m_pFw->get< Scripting::ScriptMgr >();
|
||||||
|
|
||||||
if( !pScriptMgr->onExecute( *this ) && !hasValidLutEntry() )
|
pScriptMgr->onExecute( *this );
|
||||||
{
|
|
||||||
if( auto player = m_pSource->getAsPlayer() )
|
|
||||||
{
|
|
||||||
player->sendUrgent( "missing lut entry for action#{}", getId() );
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( m_disableGenericHandler || !hasValidLutEntry() )
|
if( m_disableGenericHandler || !hasValidLutEntry() )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue