1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-07 11:17:46 +00:00

Fix battle actor control

This commit is contained in:
Lucy 2023-01-24 06:38:33 +01:00
parent f5d16ee916
commit 7aa18548f0

View file

@ -1282,14 +1282,14 @@ const std::map< uint32_t, uint8_t >& Player::getActorIdToHateSlotMap()
void Player::onMobAggro( const BNpc& bnpc )
{
hateListAdd( bnpc );
queuePacket( makeActorControl( getId(), SetBattle, 1 ) );
queuePacket( makeActorControl( getId(), SetBattle, 1, 0, 0 ) );
}
void Player::onMobDeaggro( const BNpc& bnpc )
{
hateListRemove( bnpc );
if( m_actorIdTohateSlotMap.empty() )
queuePacket( makeActorControl( getId(), SetBattle ) );
queuePacket( makeActorControl( getId(), SetBattle, 0, 0, 0 ) );
}
bool Player::isLogin() const