1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-26 14:37:44 +00:00

cleanup spawn slot handling for bnpcs

This commit is contained in:
NotAdam 2019-01-19 19:28:12 +11:00
parent 603604b28d
commit 9712f94d00

View file

@ -76,17 +76,14 @@ namespace Sapphire::Network::Packets::Server
m_data.bNPCName = bnpc.getBNpcNameId();
m_data.state = 1;
if( target.getId() == bnpc.getId() )
{
m_data.spawnIndex = 0x00;
}
else
{
m_data.spawnIndex = target.getSpawnIdForActorId( bnpc.getId() );
if( !target.isActorSpawnIdValid( m_data.spawnIndex ) )
return;
}
assert( target.getId() != bnpc.getId() );
m_data.spawnIndex = target.getSpawnIdForActorId( bnpc.getId() );
if( !target.isActorSpawnIdValid( m_data.spawnIndex ) )
return;
// 0x20 == spawn hidden to be displayed by the spawneffect control
//m_data.displayFlags = bnpc.getDisplayFlags();