mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[7723] New AI call EnterCombat called at enter creature to combat (and re-enter if leave by some reason).
This commit is contained in:
parent
f2f817883a
commit
73db1cbe01
10 changed files with 30 additions and 25 deletions
|
|
@ -1158,6 +1158,7 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
|
|||
if(!unit->isInCombat() && unit->GetTypeId() != TYPEID_PLAYER && ((Creature*)unit)->AI())
|
||||
((Creature*)unit)->AI()->AttackedBy(m_caster);
|
||||
|
||||
unit->AddThreat(m_caster, 0.0f);
|
||||
unit->SetInCombatWith(m_caster);
|
||||
m_caster->SetInCombatWith(unit);
|
||||
|
||||
|
|
@ -1165,7 +1166,6 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
|
|||
{
|
||||
m_caster->SetContestedPvP(attackedPlayer);
|
||||
}
|
||||
unit->AddThreat(m_caster, 0.0f);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue