1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-26 22:37:45 +00:00
This commit is contained in:
Perize 2018-03-17 02:27:46 +09:00
parent efa0a81d9e
commit c67c6a1ab2

View file

@ -76,11 +76,20 @@ void Core::Network::GameConnection::skillHandler( const Packets::GamePacket& inP
else
{
Core::Entity::ActorPtr targetActor = player.getAsPlayer();
if( targetId != player.getId() )
{
targetActor = player.lookupTargetById( targetId );
}
// Check if we actually have an actor
if ( targetActor == nullptr )
{
// todo: interrupt a cast.
player.sendDebug( "Invalid target." );
return;
}
if( !player.actionHasCastTime( action ) )
{
pScriptMgr->onCastFinish( player, targetActor->getAsChara(), action );