mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-30 16:17:46 +00:00
Always send AOE effects as AOE packet, regardless of targetcount. Also allow setting position of aoe effect
This commit is contained in:
parent
46cbd436f9
commit
1eb202faa8
4 changed files with 22 additions and 122 deletions
|
@ -5373,66 +5373,8 @@
|
|||
"target": []
|
||||
}
|
||||
},
|
||||
"453": {
|
||||
"name": "Incinerate",
|
||||
"potency": 0,
|
||||
"comboPotency": 0,
|
||||
"flankPotency": 0,
|
||||
"frontPotency": 0,
|
||||
"rearPotency": 0,
|
||||
"curePotency": 0,
|
||||
"restorePercentage": 0,
|
||||
"nextCombo": [],
|
||||
"statuses": {
|
||||
"caster": [],
|
||||
"target": []
|
||||
}
|
||||
},
|
||||
"454": {
|
||||
"name": "Vulcan Burst",
|
||||
"potency": 0,
|
||||
"comboPotency": 0,
|
||||
"flankPotency": 0,
|
||||
"frontPotency": 0,
|
||||
"rearPotency": 0,
|
||||
"curePotency": 0,
|
||||
"restorePercentage": 0,
|
||||
"nextCombo": [],
|
||||
"statuses": {
|
||||
"caster": [],
|
||||
"target": []
|
||||
}
|
||||
},
|
||||
"455": {
|
||||
"name": "Eruption",
|
||||
"potency": 0,
|
||||
"comboPotency": 0,
|
||||
"flankPotency": 0,
|
||||
"frontPotency": 0,
|
||||
"rearPotency": 0,
|
||||
"curePotency": 0,
|
||||
"restorePercentage": 0,
|
||||
"nextCombo": [],
|
||||
"statuses": {
|
||||
"caster": [],
|
||||
"target": []
|
||||
}
|
||||
},
|
||||
"456": {
|
||||
"name": "Radiant Plume",
|
||||
"potency": 0,
|
||||
"comboPotency": 0,
|
||||
"flankPotency": 0,
|
||||
"frontPotency": 0,
|
||||
"rearPotency": 0,
|
||||
"curePotency": 0,
|
||||
"restorePercentage": 0,
|
||||
"nextCombo": [],
|
||||
"statuses": {
|
||||
"caster": [],
|
||||
"target": []
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
"457": {
|
||||
"name": "Crimson Cyclone",
|
||||
"potency": 0,
|
||||
|
@ -5448,21 +5390,6 @@
|
|||
"target": []
|
||||
}
|
||||
},
|
||||
"458": {
|
||||
"name": "Hellfire",
|
||||
"potency": 0,
|
||||
"comboPotency": 0,
|
||||
"flankPotency": 0,
|
||||
"frontPotency": 0,
|
||||
"rearPotency": 0,
|
||||
"curePotency": 0,
|
||||
"restorePercentage": 0,
|
||||
"nextCombo": [],
|
||||
"statuses": {
|
||||
"caster": [],
|
||||
"target": []
|
||||
}
|
||||
},
|
||||
"462": {
|
||||
"name": "イフリート:角復活",
|
||||
"potency": 0,
|
||||
|
@ -8928,36 +8855,6 @@
|
|||
"target": []
|
||||
}
|
||||
},
|
||||
"733": {
|
||||
"name": "Eruption",
|
||||
"potency": 0,
|
||||
"comboPotency": 0,
|
||||
"flankPotency": 0,
|
||||
"frontPotency": 0,
|
||||
"rearPotency": 0,
|
||||
"curePotency": 0,
|
||||
"restorePercentage": 0,
|
||||
"nextCombo": [],
|
||||
"statuses": {
|
||||
"caster": [],
|
||||
"target": []
|
||||
}
|
||||
},
|
||||
"734": {
|
||||
"name": "Radiant Plume",
|
||||
"potency": 0,
|
||||
"comboPotency": 0,
|
||||
"flankPotency": 0,
|
||||
"frontPotency": 0,
|
||||
"rearPotency": 0,
|
||||
"curePotency": 0,
|
||||
"restorePercentage": 0,
|
||||
"nextCombo": [],
|
||||
"statuses": {
|
||||
"caster": [],
|
||||
"target": []
|
||||
}
|
||||
},
|
||||
"735": {
|
||||
"name": "Miasma Breath",
|
||||
"potency": 0,
|
||||
|
@ -10518,21 +10415,6 @@
|
|||
"target": []
|
||||
}
|
||||
},
|
||||
"872": {
|
||||
"name": "attack",
|
||||
"potency": 0,
|
||||
"comboPotency": 0,
|
||||
"flankPotency": 0,
|
||||
"frontPotency": 0,
|
||||
"rearPotency": 0,
|
||||
"curePotency": 0,
|
||||
"restorePercentage": 0,
|
||||
"nextCombo": [],
|
||||
"statuses": {
|
||||
"caster": [],
|
||||
"target": []
|
||||
}
|
||||
},
|
||||
"873": {
|
||||
"name": "attack",
|
||||
"potency": 0,
|
||||
|
|
|
@ -143,12 +143,21 @@ std::shared_ptr< FFXIVPacketBase > ActionResultBuilder::createActionResultPacket
|
|||
auto& teriMgr = Common::Service< Sapphire::World::Manager::TerritoryMgr >::ref();
|
||||
auto zone = teriMgr.getTerritoryByGuId( m_sourceChara->getTerritoryId() );
|
||||
|
||||
if( targetCount > 1 ) // use AoeEffect packets
|
||||
// need to get actionData
|
||||
auto& exdData = Common::Service< Data::ExdData >::ref();
|
||||
|
||||
auto actionData = exdData.getRow< Excel::Action >( m_actionId );
|
||||
if( !actionData )
|
||||
throw std::runtime_error( "No actiondata found!" );
|
||||
|
||||
if( targetCount > 1 || actionData->data().EffectType != Common::CastType::SingleTarget ) // use AoeEffect packets
|
||||
{
|
||||
auto actionResult = makeEffectPacket( m_sourceChara->getId(), targetList[ 0 ]->getId(), m_actionId );
|
||||
auto actionResult = makeEffectPacket( m_sourceChara->getId(), 0, m_actionId );
|
||||
actionResult->setRotation( Common::Util::floatToUInt16Rot( m_sourceChara->getRot() ) );
|
||||
actionResult->setRequestId( m_requestId );
|
||||
actionResult->setResultId( m_resultId );
|
||||
actionResult->setTargetPosition( m_sourceChara->getPos() );
|
||||
|
||||
|
||||
uint8_t targetIndex = 0;
|
||||
for( auto& [ actor, actorResultList ] : m_actorResultsMap )
|
||||
|
|
|
@ -417,6 +417,7 @@ namespace Sapphire::Encounter
|
|||
if( !pAction || pAction->isInterrupted() )
|
||||
{
|
||||
actionMgr.handleTargetedAction( *pBNpc, pActionData->m_actionId, targetId, pTeri->getNextActionResultId() );
|
||||
//actionMgr.handlePlacedAction( *pBNpc, pActionData->m_actionId, pBNpc->getPos(), pTeri->getNextActionResultId() );
|
||||
}
|
||||
// todo: this really shouldnt exist, but need to figure out why actions interrupt
|
||||
else if( pAction->getId() == pActionData->m_actionId )
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include <Network/GamePacket.h>
|
||||
#include <Network/PacketDef/Zone/ServerZoneDef.h>
|
||||
#include <Util/UtilMath.h>
|
||||
#include "Forwards.h"
|
||||
#include <string>
|
||||
#include <cstring>
|
||||
|
@ -87,6 +88,13 @@ namespace Sapphire::Network::Packets::WorldPackets::Server
|
|||
{
|
||||
m_data.ResultId = static_cast< uint32_t >( resultId );
|
||||
}
|
||||
|
||||
void setTargetPosition( Common::FFXIVARR_POSITION3& pos )
|
||||
{
|
||||
m_data.TargetPos[ 0 ] = Common::Util::floatToUInt16( pos.x );
|
||||
m_data.TargetPos[ 1 ] = Common::Util::floatToUInt16( pos.y );
|
||||
m_data.TargetPos[ 2 ] = Common::Util::floatToUInt16( pos.z );
|
||||
}
|
||||
private:
|
||||
uint8_t m_targetEffectCount{ 0 };
|
||||
uint8_t m_sourceEffectCount{ 0 };
|
||||
|
|
Loading…
Add table
Reference in a new issue