mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-26 22:37:45 +00:00
fixed #277
This commit is contained in:
parent
efa0a81d9e
commit
c67c6a1ab2
1 changed files with 9 additions and 0 deletions
|
@ -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 );
|
||||
|
|
Loading…
Add table
Reference in a new issue