1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-25 19:17:45 +00:00

Set player in/out of combat when updating the hate list.

This commit is contained in:
Daniel Davies 2020-05-05 13:55:34 +01:00
parent dd3af7e689
commit 3624b9e30b

View file

@ -1417,6 +1417,8 @@ void Sapphire::Entity::Player::hateListAdd( BNpcPtr pBNpc )
m_actorIdTohateSlotMap[ pBNpc->getId() ] = hateId;
sendHateList();
}
setInCombat(true);
}
void Sapphire::Entity::Player::hateListRemove( BNpcPtr pBNpc )
@ -1431,6 +1433,7 @@ void Sapphire::Entity::Player::hateListRemove( BNpcPtr pBNpc )
m_freeHateSlotQueue.push( hateSlot );
m_actorIdTohateSlotMap.erase( it );
sendHateList();
setInCombat( !m_actorIdTohateSlotMap.empty() );
return;
}