[8658] Threat calculation fixes and improvements.

* Add single arg version Unit::AddThreat for just adding to threat list.
* Req. provide schollmask and crit flag for any real threat value for proper threats mod apply.
* Send crit flag in DealDamage as MELEE_HIT_CRIT for spell damage for later send to threat call.
* For not affected by modifiers threat values use SPELL_SCHOOL_MASK_NONE.
* Implement aura SPELL_AURA_MOD_CRITICAL_THREAT (used only in itemset 529 effect).
This commit is contained in:
VladimirMangos 2009-10-17 10:47:44 +04:00
parent ba62cdbe8f
commit b258a17ba4
15 changed files with 50 additions and 32 deletions

View file

@ -60,7 +60,7 @@ AggressorAI::MoveInLineOfSight(Unit *u)
}
else if(sMapStore.LookupEntry(m_creature->GetMapId())->IsDungeon())
{
m_creature->AddThreat(u, 0.0f);
m_creature->AddThreat(u);
u->SetInCombatWith(m_creature);
}
}
@ -155,7 +155,7 @@ AggressorAI::AttackStart(Unit *u)
// DEBUG_LOG("Creature %s tagged a victim to kill [guid=%u]", m_creature->GetName(), u->GetGUIDLow());
i_victimGuid = u->GetGUID();
m_creature->AddThreat(u, 0.0f);
m_creature->AddThreat(u);
m_creature->SetInCombatWith(u);
u->SetInCombatWith(m_creature);