mirror of
https://github.com/mangosfour/server.git
synced 2025-12-31 04:37:04 +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
|
|
@ -498,7 +498,7 @@ enum ProcFlagsEx
|
|||
PROC_EX_ABSORB = 0x0000400,
|
||||
PROC_EX_REFLECT = 0x0000800,
|
||||
PROC_EX_INTERRUPT = 0x0001000, // Melee hit result can be Interrupt (not used)
|
||||
PROC_EX_RESERVED1 = 0x0002000,
|
||||
PROC_EX_FULL_BLOCK = 0x0002000, // block al attack damage
|
||||
PROC_EX_RESERVED2 = 0x0004000,
|
||||
PROC_EX_RESERVED3 = 0x0008000,
|
||||
PROC_EX_EX_TRIGGER_ALWAYS = 0x0010000, // If set trigger always ( no matter another flags) used for drop charges
|
||||
|
|
|
|||
|
|
@ -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