mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-27 06:47: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
|
else
|
||||||
{
|
{
|
||||||
Core::Entity::ActorPtr targetActor = player.getAsPlayer();
|
Core::Entity::ActorPtr targetActor = player.getAsPlayer();
|
||||||
|
|
||||||
if( targetId != player.getId() )
|
if( targetId != player.getId() )
|
||||||
{
|
{
|
||||||
targetActor = player.lookupTargetById( targetId );
|
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 ) )
|
if( !player.actionHasCastTime( action ) )
|
||||||
{
|
{
|
||||||
pScriptMgr->onCastFinish( player, targetActor->getAsChara(), action );
|
pScriptMgr->onCastFinish( player, targetActor->getAsChara(), action );
|
||||||
|
|
Loading…
Add table
Reference in a new issue