mirror of
https://github.com/mangosfour/server.git
synced 2025-12-26 07:37:02 +00:00
[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:
parent
ba62cdbe8f
commit
b258a17ba4
15 changed files with 50 additions and 32 deletions
|
|
@ -40,7 +40,7 @@ void HostileRefManager::threatAssist(Unit *pVictim, float pThreat, SpellEntry co
|
|||
ref = getFirst();
|
||||
while(ref != NULL)
|
||||
{
|
||||
float threat = ThreatCalcHelper::calcThreat(pVictim, iOwner, pThreat, (pThreatSpell ? GetSpellSchoolMask(pThreatSpell) : SPELL_SCHOOL_MASK_NORMAL), pThreatSpell);
|
||||
float threat = ThreatCalcHelper::calcThreat(pVictim, iOwner, pThreat, false, (pThreatSpell ? GetSpellSchoolMask(pThreatSpell) : SPELL_SCHOOL_MASK_NORMAL), pThreatSpell);
|
||||
if(pVictim == getOwner())
|
||||
ref->addThreat(float (threat) / size); // It is faster to modify the threat durectly if possible
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue