mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[9160] Implement and use PROC_EX_FULL_BLOCK
It used for spell 31245 and ranks new proc flags. Original patch provided by dardennf.
This commit is contained in:
parent
83261d9b9b
commit
a21affbd68
9 changed files with 37 additions and 13 deletions
|
|
@ -1317,7 +1317,7 @@ void Unit::CalculateMeleeDamage(Unit *pVictim, uint32 damage, CalcDamageInfo *da
|
|||
}
|
||||
case MELEE_HIT_PARRY:
|
||||
damageInfo->TargetState = VICTIMSTATE_PARRY;
|
||||
damageInfo->procEx|=PROC_EX_PARRY;
|
||||
damageInfo->procEx |= PROC_EX_PARRY;
|
||||
damageInfo->cleanDamage += damageInfo->damage;
|
||||
damageInfo->damage = 0;
|
||||
break;
|
||||
|
|
@ -1332,12 +1332,13 @@ void Unit::CalculateMeleeDamage(Unit *pVictim, uint32 damage, CalcDamageInfo *da
|
|||
{
|
||||
damageInfo->TargetState = VICTIMSTATE_NORMAL;
|
||||
damageInfo->HitInfo |= HITINFO_BLOCK;
|
||||
damageInfo->procEx|=PROC_EX_BLOCK;
|
||||
damageInfo->procEx |= PROC_EX_BLOCK;
|
||||
damageInfo->blocked_amount = damageInfo->target->GetShieldBlockValue();
|
||||
if (damageInfo->blocked_amount >= damageInfo->damage)
|
||||
{
|
||||
damageInfo->TargetState = VICTIMSTATE_BLOCKS;
|
||||
damageInfo->blocked_amount = damageInfo->damage;
|
||||
damageInfo->procEx |= PROC_EX_FULL_BLOCK;
|
||||
}
|
||||
damageInfo->damage -= damageInfo->blocked_amount;
|
||||
damageInfo->cleanDamage += damageInfo->blocked_amount;
|
||||
|
|
@ -1345,9 +1346,9 @@ void Unit::CalculateMeleeDamage(Unit *pVictim, uint32 damage, CalcDamageInfo *da
|
|||
}
|
||||
case MELEE_HIT_GLANCING:
|
||||
{
|
||||
damageInfo->HitInfo |= HITINFO_GLANCING;
|
||||
damageInfo->TargetState = VICTIMSTATE_NORMAL;
|
||||
damageInfo->procEx|=PROC_EX_NORMAL_HIT;
|
||||
damageInfo->HitInfo |= HITINFO_GLANCING;
|
||||
damageInfo->TargetState = VICTIMSTATE_NORMAL;
|
||||
damageInfo->procEx |= PROC_EX_NORMAL_HIT;
|
||||
float reducePercent = 1.0f; //damage factor
|
||||
// calculate base values and mods
|
||||
float baseLowEnd = 1.3f;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue