mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-30 16:17:46 +00:00
Maintarget logic improved in AOE packet generation
This commit is contained in:
parent
1eb202faa8
commit
beeae1b5c8
1 changed files with 5 additions and 1 deletions
|
@ -152,7 +152,11 @@ std::shared_ptr< FFXIVPacketBase > ActionResultBuilder::createActionResultPacket
|
|||
|
||||
if( targetCount > 1 || actionData->data().EffectType != Common::CastType::SingleTarget ) // use AoeEffect packets
|
||||
{
|
||||
auto actionResult = makeEffectPacket( m_sourceChara->getId(), 0, m_actionId );
|
||||
// todo: maintarget logic is lackluster. There needs to be some criteria for when a main target is required.
|
||||
uint32_t mainTarget = Common::INVALID_GAME_OBJECT_ID;
|
||||
if( !targetList.empty() )
|
||||
mainTarget = targetList[ 0 ]->getId();
|
||||
auto actionResult = makeEffectPacket( m_sourceChara->getId(), mainTarget, m_actionId );
|
||||
actionResult->setRotation( Common::Util::floatToUInt16Rot( m_sourceChara->getRot() ) );
|
||||
actionResult->setRequestId( m_requestId );
|
||||
actionResult->setResultId( m_resultId );
|
||||
|
|
Loading…
Add table
Reference in a new issue