1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-27 06:47:45 +00:00

Sorting out action effects (castbar, anim); Block heal and damage on dead actors;

This commit is contained in:
Maru 2017-08-30 01:52:20 -03:00
parent 5010aed6b3
commit 34568b6431
2 changed files with 10 additions and 3 deletions

View file

@ -53,7 +53,7 @@ void Core::Action::ActionCast::onStart()
castPacket.data().action_id = m_id; castPacket.data().action_id = m_id;
castPacket.data().unknown = 1; castPacket.data().unknown = 1;
castPacket.data().cast_time = m_castTime; castPacket.data().cast_time = m_castTime / 1000; // This is used for the cast bar above the target bar of the caster.
castPacket.data().target_id = m_pTarget->getId(); castPacket.data().target_id = m_pTarget->getId();
m_pSource->sendToInRangeSet( castPacket, false ); m_pSource->sendToInRangeSet( castPacket, false );

View file

@ -1516,10 +1516,11 @@ void Core::Entity::Player::handleScriptSkill( uint32_t type, uint32_t actionId,
case Core::Common::HandleSkillType::StdDamage: case Core::Common::HandleSkillType::StdDamage:
{ {
sendDebug( "STD_DAMAGE" ); sendDebug( "STD_DAMAGE" );
GamePacketNew< FFXIVIpcEffect, ServerZoneIpcType > effectPacket( getId() ); GamePacketNew< FFXIVIpcEffect, ServerZoneIpcType > effectPacket( getId() );
effectPacket.data().targetId = pTarget.getId(); effectPacket.data().targetId = pTarget.getId();
effectPacket.data().actionAnimationId = actionId; effectPacket.data().actionAnimationId = actionId;
effectPacket.data().unknown_2 = 0; effectPacket.data().unknown_2 = 1; // This seems to have an effect on the "double-cast finish" animation
// effectPacket.data().unknown_3 = 1; // effectPacket.data().unknown_3 = 1;
effectPacket.data().actionTextId = actionId; effectPacket.data().actionTextId = actionId;
effectPacket.data().numEffects = 1; effectPacket.data().numEffects = 1;
@ -1532,6 +1533,9 @@ void Core::Entity::Player::handleScriptSkill( uint32_t type, uint32_t actionId,
sendToInRangeSet( effectPacket, true ); sendToInRangeSet( effectPacket, true );
if (!pTarget.isAlive())
break;
pTarget.takeDamage( param1 ); pTarget.takeDamage( param1 );
pTarget.onActionHostile( shared_from_this() ); pTarget.onActionHostile( shared_from_this() );
break; break;
@ -1546,7 +1550,7 @@ void Core::Entity::Player::handleScriptSkill( uint32_t type, uint32_t actionId,
GamePacketNew< FFXIVIpcEffect, ServerZoneIpcType > effectPacket( getId() ); GamePacketNew< FFXIVIpcEffect, ServerZoneIpcType > effectPacket( getId() );
effectPacket.data().targetId = pTarget.getId(); effectPacket.data().targetId = pTarget.getId();
effectPacket.data().actionAnimationId = actionId; effectPacket.data().actionAnimationId = actionId;
effectPacket.data().unknown_2 = 0; effectPacket.data().unknown_2 = 1; // This seems to have an effect on the "double-cast finish" animation
// effectPacket.data().unknown_3 = 1; // effectPacket.data().unknown_3 = 1;
effectPacket.data().actionTextId = actionId; effectPacket.data().actionTextId = actionId;
effectPacket.data().numEffects = 1; effectPacket.data().numEffects = 1;
@ -1559,6 +1563,9 @@ void Core::Entity::Player::handleScriptSkill( uint32_t type, uint32_t actionId,
sendToInRangeSet( effectPacket, true ); sendToInRangeSet( effectPacket, true );
if ( !pTarget.isAlive() )
break;
pTarget.heal( calculatedHeal ); pTarget.heal( calculatedHeal );
break; break;
} }