mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-26 22:37:45 +00:00
Sorting out action effects (castbar, anim); Block heal and damage on dead actors;
This commit is contained in:
parent
5010aed6b3
commit
34568b6431
2 changed files with 10 additions and 3 deletions
|
@ -53,7 +53,7 @@ void Core::Action::ActionCast::onStart()
|
|||
|
||||
castPacket.data().action_id = m_id;
|
||||
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();
|
||||
|
||||
m_pSource->sendToInRangeSet( castPacket, false );
|
||||
|
|
|
@ -1516,10 +1516,11 @@ void Core::Entity::Player::handleScriptSkill( uint32_t type, uint32_t actionId,
|
|||
case Core::Common::HandleSkillType::StdDamage:
|
||||
{
|
||||
sendDebug( "STD_DAMAGE" );
|
||||
|
||||
GamePacketNew< FFXIVIpcEffect, ServerZoneIpcType > effectPacket( getId() );
|
||||
effectPacket.data().targetId = pTarget.getId();
|
||||
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().actionTextId = actionId;
|
||||
effectPacket.data().numEffects = 1;
|
||||
|
@ -1532,6 +1533,9 @@ void Core::Entity::Player::handleScriptSkill( uint32_t type, uint32_t actionId,
|
|||
|
||||
sendToInRangeSet( effectPacket, true );
|
||||
|
||||
if (!pTarget.isAlive())
|
||||
break;
|
||||
|
||||
pTarget.takeDamage( param1 );
|
||||
pTarget.onActionHostile( shared_from_this() );
|
||||
break;
|
||||
|
@ -1546,7 +1550,7 @@ void Core::Entity::Player::handleScriptSkill( uint32_t type, uint32_t actionId,
|
|||
GamePacketNew< FFXIVIpcEffect, ServerZoneIpcType > effectPacket( getId() );
|
||||
effectPacket.data().targetId = pTarget.getId();
|
||||
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().actionTextId = actionId;
|
||||
effectPacket.data().numEffects = 1;
|
||||
|
@ -1559,6 +1563,9 @@ void Core::Entity::Player::handleScriptSkill( uint32_t type, uint32_t actionId,
|
|||
|
||||
sendToInRangeSet( effectPacket, true );
|
||||
|
||||
if ( !pTarget.isAlive() )
|
||||
break;
|
||||
|
||||
pTarget.heal( calculatedHeal );
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue