diff --git a/src/common/Common.h b/src/common/Common.h index 18e529d1..8aa5836c 100644 --- a/src/common/Common.h +++ b/src/common/Common.h @@ -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... diff --git a/src/world/Actor/Player.cpp b/src/world/Actor/Player.cpp index 5d0115cf..3bbb74ef 100644 --- a/src/world/Actor/Player.cpp +++ b/src/world/Actor/Player.cpp @@ -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