rendered paste bodyIndex: Unit.cpp
===================================================================
--- Unit.cpp (revision 4435)
+++ Unit.cpp (working copy)
@@ -3557,7 +3557,12 @@
if(procAttacker & PROC_FLAG_CRIT_SPELL) procAttacker |= PROC_FLAG_CRIT_MELEE;
if(procVictim & PROC_FLAG_STRUCK_SPELL) procVictim |= PROC_FLAG_STRUCK_MELEE;
if(procVictim & PROC_FLAG_STRUCK_CRIT_SPELL) procVictim |= PROC_FLAG_STRUCK_CRIT_MELEE;
- attType = BASE_ATTACK; // Melee abilities are assumed to be dealt with mainhand weapon
+ attType = BASE_ATTACK; // Melee abilities are assumed to be dealt with mainhand weapon
+ if(procAttacker & PROC_FLAG_HIT_OFFHAND)
+ {
+ procAttacker |= PROC_FLAG_HIT_OFFHAND;
+ attType = OFF_ATTACK; //overwrite the attType;
+ }
}
else if (procSpell->DmgClass == SPELL_DAMAGE_CLASS_RANGED)
{
@@ -3649,6 +3654,11 @@
{
procAttacker = PROC_FLAG_HIT_MELEE;
procVictim = PROC_FLAG_STRUCK_MELEE;
+ if ( attType == OFF_ATTACK )
+ {
+ procAttacker = PROC_FLAG_HIT_OFFHAND;
+ procVictim = PROC_FLAG_STRUCK_MELEE;
+ }
}
else
{
Index: Unit.h
===================================================================
--- Unit.h (revision 4435)
+++ Unit.h (working copy)
@@ -427,8 +427,9 @@
PROC_FLAG_TARGET_LOW_HEALTH = 0x00000100, // On deal damage to enemy with 20% or less health
PROC_FLAG_LOW_HEALTH = 0x00000200, // On health dropped below 20%
PROC_FLAG_STRUCK_RANGED = 0x00000400, // On being struck ranged
- PROC_FLAG_HIT_SPECIAL = 0x00000800, // (!)Removed, may be reassigned in future
- PROC_FLAG_CRIT_MELEE = 0x00001000, // On crit melee
+ //PROC_FLAG_HIT_SPECIAL = 0x00000800, // (!)Removed, may be reassigned in future
+ PROC_FLAG_HIT_OFFHAND = 0x00000800, // On melee hit with offhand weapon
+ PROC_FLAG_CRIT_MELEE = 0x00001000, // On crit melee
PROC_FLAG_STRUCK_CRIT_MELEE = 0x00002000, // On being critically struck in melee
PROC_FLAG_CAST_SPELL = 0x00004000, // On cast spell (and broken Aspect of Hawk)
PROC_FLAG_TAKE_DAMAGE = 0x00008000, // On take damage