feat: check attackers user type
This commit is contained in:
parent
936697defc
commit
e0ffa3a62e
@ -103,9 +103,13 @@ namespace Interlude
|
||||
if (m_Hero && m_Hero->GetId() != casted.GetAttackerId())
|
||||
{
|
||||
if (m_Hero->GetId() == casted.GetTargetId())
|
||||
{
|
||||
const auto attacker = m_NetworkHandler.GetUser(casted.GetAttackerId());
|
||||
if (attacker && attacker->userType == L2::UserType::NPC)
|
||||
{
|
||||
m_Hero->AddAttacker(casted.GetAttackerId());
|
||||
}
|
||||
}
|
||||
else if (casted.GetAttackerId() != casted.GetTargetId())
|
||||
{
|
||||
// try to remove creature that is attacking another target from the attackers
|
||||
|
Loading…
Reference in New Issue
Block a user