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

Renabled Bnpc dmg calc, striking dummies are now invincible.

This commit is contained in:
Mordred 2021-12-31 14:57:18 +01:00
parent d244ad437b
commit 514c507dcf

View file

@ -83,6 +83,10 @@ Sapphire::Entity::BNpc::BNpc( uint32_t id, std::shared_ptr< Common::BNPCInstance
if( pInfo->WanderingRange == 0 || pInfo->BoundInstanceID != 0 ) if( pInfo->WanderingRange == 0 || pInfo->BoundInstanceID != 0 )
setFlag( Immobile ); setFlag( Immobile );
// Striking Dummy
if( pInfo->NameId == 541 )
m_invincibilityType = Common::InvincibilityRefill;
auto& exdData = Common::Service< Data::ExdData >::ref(); auto& exdData = Common::Service< Data::ExdData >::ref();
auto bNpcBaseData = exdData.getRow< Component::Excel::BNpcBase >( m_bNpcBaseId ); auto bNpcBaseData = exdData.getRow< Component::Excel::BNpcBase >( m_bNpcBaseId );
@ -883,7 +887,7 @@ void Sapphire::Entity::BNpc::autoAttack( CharaPtr pTarget )
srand( static_cast< uint32_t >( tick ) ); srand( static_cast< uint32_t >( tick ) );
auto damage = Math::CalcStats::calcAutoAttackDamage( *this ); auto damage = Math::CalcStats::calcAutoAttackDamage( *this );
damage.first = 1; //damage.first = 1;
auto effectPacket = std::make_shared< EffectPacket >( getId(), pTarget->getId(), 7 ); auto effectPacket = std::make_shared< EffectPacket >( getId(), pTarget->getId(), 7 );
effectPacket->setRotation( Util::floatToUInt16Rot( getRot() ) ); effectPacket->setRotation( Util::floatToUInt16Rot( getRot() ) );