[7723] New AI call EnterCombat called at enter creature to combat (and re-enter if leave by some reason).

This commit is contained in:
VladimirMangos 2009-04-27 03:36:31 +04:00
parent f2f817883a
commit 73db1cbe01
10 changed files with 30 additions and 25 deletions

View file

@ -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