1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-01 08:27:46 +00:00

Fixed an issue with one hit kills not registering on kill events.

This commit is contained in:
Mordred 2017-12-08 23:05:25 +01:00
parent a77772bc9d
commit 5c13f51042

View file

@ -704,11 +704,11 @@ void Core::Entity::Actor::handleScriptSkill( uint32_t type, uint16_t actionId, u
sendToInRangeSet( effectPacket, true ); sendToInRangeSet( effectPacket, true );
pTarget.takeDamage( static_cast< uint32_t >( param1 ) );
if ( pTarget.isAlive() ) if ( pTarget.isAlive() )
pTarget.onActionHostile( shared_from_this() ); pTarget.onActionHostile( shared_from_this() );
pTarget.takeDamage( static_cast< uint32_t >( param1 ) );
} }
else else
{ {
@ -724,11 +724,12 @@ void Core::Entity::Actor::handleScriptSkill( uint32_t type, uint16_t actionId, u
// todo: send to range of what? ourselves? when mob script hits this is going to be lacking // todo: send to range of what? ourselves? when mob script hits this is going to be lacking
sendToInRangeSet( effectPacket, true ); sendToInRangeSet( effectPacket, true );
pHitActor->takeDamage( static_cast< uint32_t >( param1 ) );
if( pHitActor->isAlive() ) if( pHitActor->isAlive() )
pHitActor->onActionHostile( shared_from_this() ); pHitActor->onActionHostile( shared_from_this() );
pHitActor->takeDamage( static_cast< uint32_t >( param1 ) );
// Debug // Debug
if ( isPlayer() ) if ( isPlayer() )
{ {