1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-27 06:47:45 +00:00

Fixed bnpc movement

This commit is contained in:
Mordred 2019-01-20 23:49:43 +01:00
parent a8101844d5
commit 813ad98c5f
3 changed files with 3 additions and 5 deletions

View file

@ -73,6 +73,7 @@ Sapphire::Entity::BNpc::BNpc( uint32_t id, BNpcTemplatePtr pTemplate, float posX
m_mp = 200;
m_state = BNpcState::Idle;
m_status = ActorStatus::Idle;
m_baseStats.max_hp = maxHp;
m_baseStats.max_mp = 200;
@ -128,7 +129,7 @@ uint32_t Sapphire::Entity::BNpc::getBNpcNameId() const
void Sapphire::Entity::BNpc::spawn( PlayerPtr pTarget )
{
pTarget->queuePacket( std::make_shared< NpcSpawnPacket >( *getAsBNpc(), *pTarget ) );
pTarget->queuePacket( std::make_shared< NpcSpawnPacket >( *this, *pTarget ) );
}
void Sapphire::Entity::BNpc::despawn( PlayerPtr pTarget )
@ -166,7 +167,6 @@ bool Sapphire::Entity::BNpc::moveTo( const FFXIVARR_POSITION3& pos )
setPos( newPos );
Common::FFXIVARR_POSITION3 tmpPos{ getPos().x + x, y, getPos().z + z };
setPos( tmpPos );
setRot( newRot );

View file

@ -244,7 +244,7 @@ bool Sapphire::Entity::Chara::face( const Common::FFXIVARR_POSITION3& p )
setRot( newRot );
return oldRot != newRot ? true : false;
return oldRot != newRot;
}
/*!

View file

@ -39,7 +39,6 @@ namespace Sapphire::Network::Packets::Server
m_data.mPMax = bnpc.getMaxMp();
m_data.subtype = 5;
//m_data.tPMax = 3000;
m_data.level = bnpc.getLevel();
m_data.pose = bnpc.getPose();
@ -73,7 +72,6 @@ namespace Sapphire::Network::Packets::Server
if( !target.isActorSpawnIdValid( m_data.spawnIndex ) )
return;
// 0x20 == spawn hidden to be displayed by the spawneffect control
//m_data.displayFlags = bnpc.getDisplayFlags();