mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-04 01:37:47 +00:00
Merge pull request #933 from collett8192/3.0_master
fix some PlayerCondition flags
This commit is contained in:
commit
4992503308
2 changed files with 8 additions and 3 deletions
|
@ -1373,9 +1373,10 @@ namespace Sapphire::Common
|
|||
{
|
||||
None1 = 0,
|
||||
HideUILockChar = 1, // as the name suggests, hides the ui and logs the char...
|
||||
InCombat = 2, // in Combat, locks gearchange/return/teleport
|
||||
Casting = 3,
|
||||
InNpcEvent = 6, // when talking to an npc, locks ui giving "occupied" message
|
||||
InCombat = 18, // in Combat, locks gearchange/return/teleport
|
||||
Casting = 19,
|
||||
EventAction = 22,
|
||||
InNpcEvent = 24, // when talking to an npc, locks ui giving "occupied" message
|
||||
|
||||
// InNpcEvent1 = 10, // Sent together with InNpcEvent, when waiting for input? just a guess...
|
||||
|
||||
|
|
|
@ -1134,6 +1134,7 @@ const std::map< uint32_t, uint8_t >& Player::getActorIdToHateSlotMap()
|
|||
void Player::onMobAggro( const BNpc& bnpc )
|
||||
{
|
||||
hateListAdd( bnpc );
|
||||
setCondition( PlayerCondition::InCombat );
|
||||
Network::Util::Packet::sendActorControl( *this, getId(), SetBattle, 1 );
|
||||
}
|
||||
|
||||
|
@ -1141,7 +1142,10 @@ void Player::onMobDeaggro( const BNpc& bnpc )
|
|||
{
|
||||
hateListRemove( bnpc );
|
||||
if( m_actorIdTohateSlotMap.empty() )
|
||||
{
|
||||
removeCondition( PlayerCondition::InCombat );
|
||||
Network::Util::Packet::sendActorControl( *this, getId(), SetBattle, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
bool Player::isLogin() const
|
||||
|
|
Loading…
Add table
Reference in a new issue