feat: check attackers user type
This commit is contained in:
@@ -103,9 +103,13 @@ namespace Interlude
|
|||||||
if (m_Hero && m_Hero->GetId() != casted.GetAttackerId())
|
if (m_Hero && m_Hero->GetId() != casted.GetAttackerId())
|
||||||
{
|
{
|
||||||
if (m_Hero->GetId() == casted.GetTargetId())
|
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());
|
m_Hero->AddAttacker(casted.GetAttackerId());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (casted.GetAttackerId() != casted.GetTargetId())
|
else if (casted.GetAttackerId() != casted.GetTargetId())
|
||||||
{
|
{
|
||||||
// try to remove creature that is attacking another target from the attackers
|
// try to remove creature that is attacking another target from the attackers
|
||||||
|
Reference in New Issue
Block a user