mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-03 09:17:47 +00:00
Merge pull request #666 from collett8192/update_5.25
Handle minion despawn.
This commit is contained in:
commit
47c031b4b6
3 changed files with 13 additions and 4 deletions
|
@ -350,6 +350,7 @@ namespace Sapphire::Network::ActorControl
|
|||
|
||||
DismountReq = 0x65,
|
||||
SpawnCompanionReq = 0x66,
|
||||
DespawnCompanionReq = 0x67,
|
||||
RemoveStatusEffect = 0x68,
|
||||
CastCancel = 0x69,
|
||||
|
||||
|
|
|
@ -1563,11 +1563,14 @@ void Sapphire::Entity::Player::dismount()
|
|||
|
||||
void Sapphire::Entity::Player::spawnCompanion( uint16_t id )
|
||||
{
|
||||
auto& exdData = Common::Service< Data::ExdDataGenerated >::ref();
|
||||
if( id > 0 )
|
||||
{
|
||||
auto& exdData = Common::Service< Data::ExdDataGenerated >::ref();
|
||||
|
||||
auto companion = exdData.get< Data::Companion >( id );
|
||||
if( !id )
|
||||
return;
|
||||
auto companion = exdData.get< Data::Companion >( id );
|
||||
if( !companion )
|
||||
return;
|
||||
}
|
||||
|
||||
m_companionId = id;
|
||||
sendToInRangeSet( makeActorControl( getId(), ActorControlType::ToggleCompanion, id ), true );
|
||||
|
|
|
@ -130,6 +130,11 @@ void Sapphire::Network::GameConnection::clientTriggerHandler( const Packets::FFX
|
|||
player.spawnCompanion( static_cast< uint16_t >( param1 ) );
|
||||
break;
|
||||
}
|
||||
case ClientTriggerType::DespawnCompanionReq:
|
||||
{
|
||||
player.spawnCompanion( 0 );
|
||||
break;
|
||||
}
|
||||
case ClientTriggerType::RemoveStatusEffect: // Remove status (clicking it off)
|
||||
{
|
||||
// todo: check if status can be removed by client from exd
|
||||
|
|
Loading…
Add table
Reference in a new issue