mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-01 08:27:46 +00:00
fix builds with new effect packet
This commit is contained in:
parent
3131d36ea6
commit
9d7896043c
5 changed files with 24 additions and 30 deletions
|
@ -73,13 +73,13 @@ void Core::Action::ActionMount::onFinish()
|
||||||
|
|
||||||
pPlayer->unsetStateFlag( PlayerStateFlag::Casting );
|
pPlayer->unsetStateFlag( PlayerStateFlag::Casting );
|
||||||
|
|
||||||
auto effectPacket = makeZonePacket< FFXIVIpcEffect >( getId() );
|
auto effectPacket = makeZonePacket< Server::FFXIVIpcEffect >( getId() );
|
||||||
|
|
||||||
effectPacket->data().targetId = pPlayer->getId();
|
effectPacket->data().animationTargetId = pPlayer->getId();
|
||||||
effectPacket->data().actionAnimationId = m_id;
|
effectPacket->data().actionAnimationId = m_id;
|
||||||
// Affects displaying action name next to number in floating text
|
// Affects displaying action name next to number in floating text
|
||||||
//effectPacket->data().unknown_62 = 13;
|
//effectPacket->data().unknown_62 = 13;
|
||||||
effectPacket->data().actionTextId = 4;
|
effectPacket->data().actionAnimationId = 4;
|
||||||
effectPacket->data().numEffects = 1;
|
effectPacket->data().numEffects = 1;
|
||||||
effectPacket->data().rotation = Math::Util::floatToUInt16Rot( pPlayer->getRot() );
|
effectPacket->data().rotation = Math::Util::floatToUInt16Rot( pPlayer->getRot() );
|
||||||
//effectPacket->data().effectTarget = INVALID_GAME_OBJECT_ID;
|
//effectPacket->data().effectTarget = INVALID_GAME_OBJECT_ID;
|
||||||
|
|
|
@ -84,12 +84,11 @@ void Core::Action::ActionTeleport::onFinish()
|
||||||
|
|
||||||
pPlayer->setZoningType( ZoneingType::Teleport );
|
pPlayer->setZoningType( ZoneingType::Teleport );
|
||||||
|
|
||||||
auto effectPacket = makeZonePacket< FFXIVIpcEffect >( getId() );
|
auto effectPacket = makeZonePacket< Server::FFXIVIpcEffect >( getId() );
|
||||||
effectPacket->data().targetId = pPlayer->getId();
|
effectPacket->data().animationTargetId = pPlayer->getId();
|
||||||
effectPacket->data().actionAnimationId = 5;
|
effectPacket->data().actionAnimationId = 5;
|
||||||
//effectPacket.data().unknown_3 = 1;
|
//effectPacket.data().unknown_3 = 1;
|
||||||
effectPacket->data().actionTextId = 5;
|
effectPacket->data().actionAnimationId = 5;
|
||||||
effectPacket->data().unknown_5 = 1;
|
|
||||||
effectPacket->data().numEffects = 1;
|
effectPacket->data().numEffects = 1;
|
||||||
effectPacket->data().rotation = static_cast< uint16_t >( 0x8000 * ( ( pPlayer->getRot() + 3.1415926 ) ) / 3.1415926 );
|
effectPacket->data().rotation = static_cast< uint16_t >( 0x8000 * ( ( pPlayer->getRot() + 3.1415926 ) ) / 3.1415926 );
|
||||||
effectPacket->data().effectTargetId = pPlayer->getId();
|
effectPacket->data().effectTargetId = pPlayer->getId();
|
||||||
|
|
|
@ -69,12 +69,10 @@ void Core::Action::EventItemAction::onFinish()
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
auto effectPacket = makeZonePacket< FFXIVIpcEffect >( m_pSource->getId() );
|
auto effectPacket = makeZonePacket< Server::FFXIVIpcEffect >( m_pSource->getId() );
|
||||||
effectPacket->data().targetId = static_cast< uint32_t >( m_additional );
|
effectPacket->data().animationTargetId = static_cast< uint32_t >( m_additional );
|
||||||
effectPacket->data().actionAnimationId = 1;
|
effectPacket->data().actionAnimationId = 1;
|
||||||
// effectPacket.data().unknown_3 = 3;
|
effectPacket->data().actionId = m_id;
|
||||||
effectPacket->data().actionTextId = m_id;
|
|
||||||
effectPacket->data().unknown_5 = 2;
|
|
||||||
effectPacket->data().numEffects = 1;
|
effectPacket->data().numEffects = 1;
|
||||||
effectPacket->data().rotation = Math::Util::floatToUInt16Rot( m_pSource->getRot() );
|
effectPacket->data().rotation = Math::Util::floatToUInt16Rot( m_pSource->getRot() );
|
||||||
effectPacket->data().effectTargetId = static_cast< uint32_t >( m_additional );
|
effectPacket->data().effectTargetId = static_cast< uint32_t >( m_additional );
|
||||||
|
|
|
@ -399,19 +399,16 @@ void Core::Entity::Chara::autoAttack( CharaPtr pTarget )
|
||||||
uint16_t damage = static_cast< uint16_t >( 10 + rand() % 12 );
|
uint16_t damage = static_cast< uint16_t >( 10 + rand() % 12 );
|
||||||
uint32_t variation = static_cast< uint32_t >( 0 + rand() % 4 );
|
uint32_t variation = static_cast< uint32_t >( 0 + rand() % 4 );
|
||||||
|
|
||||||
auto ipcEffect = makeZonePacket< FFXIVIpcEffect >( getId() );
|
auto ipcEffect = makeZonePacket< Server::FFXIVIpcEffect >( getId() );
|
||||||
ipcEffect->data().targetId = pTarget->getId();
|
ipcEffect->data().animationTargetId = pTarget->getId();
|
||||||
ipcEffect->data().actionAnimationId = 0x366;
|
ipcEffect->data().actionAnimationId = 0x366;
|
||||||
ipcEffect->data().unknown_2 = variation;
|
ipcEffect->data().actionId = 0x366;
|
||||||
// effectPacket->data().unknown_3 = 1;
|
|
||||||
ipcEffect->data().actionTextId = 0x366;
|
|
||||||
ipcEffect->data().numEffects = 1;
|
ipcEffect->data().numEffects = 1;
|
||||||
ipcEffect->data().rotation = Math::Util::floatToUInt16Rot( getRot() );
|
ipcEffect->data().rotation = Math::Util::floatToUInt16Rot( getRot() );
|
||||||
ipcEffect->data().effectTargetId = pTarget->getId();
|
ipcEffect->data().effectTargetId = pTarget->getId();
|
||||||
ipcEffect->data().effects[0].value = damage;
|
ipcEffect->data().effects[0].value = damage;
|
||||||
ipcEffect->data().effects[0].effectType = ActionEffectType::Damage;
|
ipcEffect->data().effects[0].effectType = ActionEffectType::Damage;
|
||||||
ipcEffect->data().effects[0].hitSeverity = static_cast< ActionHitSeverityType >( variation );
|
ipcEffect->data().effects[0].hitSeverity = static_cast< ActionHitSeverityType >( variation );
|
||||||
//ipcEffect->data().effects[0].unknown_3 = 7;
|
|
||||||
|
|
||||||
sendToInRangeSet( ipcEffect );
|
sendToInRangeSet( ipcEffect );
|
||||||
|
|
||||||
|
@ -444,12 +441,12 @@ void Core::Entity::Chara::handleScriptSkill( uint32_t type, uint16_t actionId, u
|
||||||
// Prepare packet. This is seemingly common for all packets in the action handler.
|
// Prepare packet. This is seemingly common for all packets in the action handler.
|
||||||
|
|
||||||
|
|
||||||
auto effectPacket = makeZonePacket< FFXIVIpcEffect >( getId() );
|
auto effectPacket = makeZonePacket< Server::FFXIVIpcEffect >( getId() );
|
||||||
effectPacket->data().targetId = target.getId();
|
effectPacket->data().animationTargetId = target.getId();
|
||||||
effectPacket->data().actionAnimationId = actionId;
|
effectPacket->data().actionAnimationId = actionId;
|
||||||
//effectPacket->data().unknown_62 = 1; // Affects displaying action name next to number in floating text
|
//effectPacket->data().unknown_62 = 1; // Affects displaying action name next to number in floating text
|
||||||
effectPacket->data().unknown_2 = 1; // This seems to have an effect on the "double-cast finish" animation
|
//effectPacket->data().globalEffectCounter = 1; // This seems to have an effect on the "double-cast finish" animation
|
||||||
effectPacket->data().actionTextId = actionId;
|
effectPacket->data().actionId = actionId;
|
||||||
effectPacket->data().numEffects = 1;
|
effectPacket->data().numEffects = 1;
|
||||||
effectPacket->data().rotation = Math::Util::floatToUInt16Rot( getRot() );
|
effectPacket->data().rotation = Math::Util::floatToUInt16Rot( getRot() );
|
||||||
effectPacket->data().effectTargetId = target.getId();
|
effectPacket->data().effectTargetId = target.getId();
|
||||||
|
@ -487,7 +484,7 @@ void Core::Entity::Chara::handleScriptSkill( uint32_t type, uint16_t actionId, u
|
||||||
|
|
||||||
for( const auto& pHitActor : actorsCollided )
|
for( const auto& pHitActor : actorsCollided )
|
||||||
{
|
{
|
||||||
effectPacket->data().targetId = pHitActor->getId();
|
effectPacket->data().animationTargetId = pHitActor->getId();
|
||||||
effectPacket->data().effectTargetId = pHitActor->getId();
|
effectPacket->data().effectTargetId = pHitActor->getId();
|
||||||
|
|
||||||
// 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
|
||||||
|
@ -540,7 +537,7 @@ void Core::Entity::Chara::handleScriptSkill( uint32_t type, uint16_t actionId, u
|
||||||
|
|
||||||
for( auto pHitActor : actorsCollided )
|
for( auto pHitActor : actorsCollided )
|
||||||
{
|
{
|
||||||
effectPacket->data().targetId = target.getId();
|
effectPacket->data().animationTargetId = target.getId();
|
||||||
effectPacket->data().effectTargetId = pHitActor->getId();
|
effectPacket->data().effectTargetId = pHitActor->getId();
|
||||||
|
|
||||||
sendToInRangeSet( effectPacket, true );
|
sendToInRangeSet( effectPacket, true );
|
||||||
|
|
|
@ -1418,14 +1418,14 @@ void Core::Entity::Player::autoAttack( CharaPtr pTarget )
|
||||||
|
|
||||||
if( getClass() == ClassJob::Machinist || getClass() == ClassJob::Bard || getClass() == ClassJob::Archer )
|
if( getClass() == ClassJob::Machinist || getClass() == ClassJob::Bard || getClass() == ClassJob::Archer )
|
||||||
{
|
{
|
||||||
auto effectPacket = makeZonePacket< FFXIVIpcEffect >( getId() );
|
auto effectPacket = makeZonePacket< Server::FFXIVIpcEffect >( getId() );
|
||||||
effectPacket->data().targetId = pTarget->getId();
|
effectPacket->data().animationTargetId = pTarget->getId();
|
||||||
effectPacket->data().actionAnimationId = 8;
|
effectPacket->data().actionAnimationId = 8;
|
||||||
// effectPacket.data().unknown_2 = variation;
|
// effectPacket.data().unknown_2 = variation;
|
||||||
effectPacket->data().numEffects = 1;
|
effectPacket->data().numEffects = 1;
|
||||||
//effectPacket->data().unknown_61 = 1;
|
//effectPacket->data().unknown_61 = 1;
|
||||||
//effectPacket->data().unknown_62 = 1;
|
//effectPacket->data().unknown_62 = 1;
|
||||||
effectPacket->data().actionTextId = 8;
|
effectPacket->data().actionId = 8;
|
||||||
effectPacket->data().rotation = Math::Util::floatToUInt16Rot( getRot() );
|
effectPacket->data().rotation = Math::Util::floatToUInt16Rot( getRot() );
|
||||||
effectPacket->data().effectTargetId = pTarget->getId();
|
effectPacket->data().effectTargetId = pTarget->getId();
|
||||||
//effectPacket->data().effectTarget = pTarget->getId();
|
//effectPacket->data().effectTarget = pTarget->getId();
|
||||||
|
@ -1439,14 +1439,14 @@ void Core::Entity::Player::autoAttack( CharaPtr pTarget )
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
auto effectPacket = makeZonePacket< FFXIVIpcEffect >( getId() );
|
auto effectPacket = makeZonePacket< Server::FFXIVIpcEffect >( getId() );
|
||||||
effectPacket->data().targetId = pTarget->getId();
|
effectPacket->data().animationTargetId = pTarget->getId();
|
||||||
effectPacket->data().actionAnimationId = 7;
|
effectPacket->data().actionAnimationId = 7;
|
||||||
// effectPacket.data().unknown_2 = variation;
|
// effectPacket.data().unknown_2 = variation;
|
||||||
effectPacket->data().numEffects = 1;
|
effectPacket->data().numEffects = 1;
|
||||||
//effectPacket->data().unknown_61 = 1;
|
//effectPacket->data().unknown_61 = 1;
|
||||||
//effectPacket->data().unknown_62 = 1;
|
//effectPacket->data().unknown_62 = 1;
|
||||||
effectPacket->data().actionTextId = 7;
|
effectPacket->data().actionId = 7;
|
||||||
effectPacket->data().rotation = Math::Util::floatToUInt16Rot( getRot() );
|
effectPacket->data().rotation = Math::Util::floatToUInt16Rot( getRot() );
|
||||||
effectPacket->data().effectTargetId = pTarget->getId();
|
effectPacket->data().effectTargetId = pTarget->getId();
|
||||||
effectPacket->data().effects[0].value = damage;
|
effectPacket->data().effects[0].value = damage;
|
||||||
|
|
Loading…
Add table
Reference in a new issue