Index: game/SpellEffects.cpp =================================================================== --- game/SpellEffects.cpp (revision 5170) +++ game/SpellEffects.cpp (working copy) @@ -3215,7 +3215,7 @@ if(damageType==SPELL_SCHOOL_NORMAL && unitTarget->IsImmunedToPhysicalDamage() ) { - m_caster->SendAttackStateUpdate (HITINFO_MISS, unitTarget, 1, SPELL_SCHOOL_NORMAL, 0, 0, 0, VICTIMSTATE_IS_IMMUNE, 0); + m_caster->SendSpellMiss( unitTarget, m_spellInfo->Id, SPELL_MISS_IMMUNE ); return; } @@ -3247,9 +3247,6 @@ m_caster->DoAttackDamage(unitTarget, &eff_damage, &cleanDamage, &blocked_dmg, damageType, &hitInfo, &victimState, &absorbed_dmg, &resisted_dmg, attType, m_spellInfo, m_IsTriggeredSpell); - if ((hitInfo & nohitMask) && attType != RANGED_ATTACK) // not send ranged miss/etc - m_caster->SendAttackStateUpdate(hitInfo & nohitMask, unitTarget, 1, SpellSchools(m_spellInfo->School), eff_damage, absorbed_dmg, resisted_dmg, VICTIMSTATE_NORMAL, blocked_dmg); - if(hitInfo & HITINFO_CRITICALHIT) criticalhit = true; Index: game/Unit.cpp =================================================================== --- game/Unit.cpp (revision 5170) +++ game/Unit.cpp (working copy) @@ -1208,6 +1208,7 @@ pVictim->ModifyAuraState(AURA_STATE_DEFENSE, true); pVictim->StartReactiveTimer( REACTIVE_DEFENSE ); } + SendSpellMiss(pVictim, spellInfo->Id, SPELL_MISS_PARRY); break; } case MELEE_HIT_DODGE: @@ -1244,6 +1245,7 @@ pVictim->ModifyAuraState(AURA_STATE_DEFENSE, true); pVictim->StartReactiveTimer( REACTIVE_DEFENSE ); } + SendSpellMiss(pVictim, spellInfo->Id, SPELL_MISS_DODGE); break; } case MELEE_HIT_BLOCK: @@ -1263,6 +1265,7 @@ victimState = VICTIMSTATE_BLOCKS; cleanDamage->damage += *damage; // To Help Calculate Rage *damage = 0; + SendSpellMiss(pVictim, spellInfo->Id, SPELL_MISS_BLOCK); } else { @@ -1285,10 +1288,6 @@ break; } - // Not correct, but this is what is used elsewhere to send misses and resists - if ( hitInfo & (HITINFO_ABSORB|HITINFO_RESIST|HITINFO_MISS) ) - SendAttackStateUpdate(hitInfo & (HITINFO_ABSORB|HITINFO_RESIST|HITINFO_MISS), pVictim, 1, SpellSchools(spellInfo->School), *damage, 0,0,victimState,blocked_amount); - // do all damage=0 cases here if(damage <= 0) CastMeleeProcDamageAndSpell(pVictim,0,BASE_ATTACK,outcome,spellInfo,isTriggeredSpell); @@ -1310,8 +1309,8 @@ cleanDamage->damage = 0; *damage = 0; ProcDamageAndSpell(pVictim, PROC_FLAG_TARGET_RESISTS, PROC_FLAG_RESIST_SPELL, 0, spellInfo,isTriggeredSpell); - SendAttackStateUpdate(HITINFO_RESIST|HITINFO_SWINGNOHITSOUND, pVictim, 1, SpellSchools(spellInfo->School), 0, 0,0,VICTIMSTATE_NORMAL,0); - return; + SendSpellMiss(pVictim, spellInfo->Id, SPELL_MISS_RESIST); + return; } // Calculate damage bonus @@ -1386,13 +1385,13 @@ // Handle absorb &resists if(damage <= absorb + resist && absorb) { - SendAttackStateUpdate(HITINFO_ABSORB|HITINFO_SWINGNOHITSOUND, pVictim, 1, SpellSchools(spellInfo->School),damage, absorb,resist,VICTIMSTATE_NORMAL,0); + SendSpellMiss( pVictim, spellInfo->Id, SPELL_MISS_ABSORB ); return 0; } else if(damage <= resist) // If we didn't fully absorb check if we fully resisted { ProcDamageAndSpell(pVictim, PROC_FLAG_TARGET_RESISTS, PROC_FLAG_RESIST_SPELL, 0, spellInfo,isTriggeredSpell); - SendAttackStateUpdate(HITINFO_RESIST|HITINFO_SWINGNOHITSOUND, pVictim, 1, SpellSchools(spellInfo->School), damage, absorb,resist,VICTIMSTATE_NORMAL,0); + SendSpellMiss( pVictim, spellInfo->Id, SPELL_MISS_RESIST ); return 0; } } @@ -1898,6 +1897,8 @@ *hitInfo |= HITINFO_MISS; *damage = 0; cleanDamage->damage = 0; + if ( spellCasted ) + SendSpellMiss(pVictim, spellCasted->Id, SPELL_MISS_EVADE ); return; } case MELEE_HIT_MISS: @@ -1907,6 +1908,8 @@ cleanDamage->damage = 0; if(GetTypeId()== TYPEID_PLAYER) ((Player*)this)->UpdateWeaponSkill(attType); + if ( spellCasted ) + SendSpellMiss(pVictim, spellCasted->Id, SPELL_MISS_MISS ); return; } } @@ -2071,6 +2074,9 @@ pVictim->StartReactiveTimer( REACTIVE_DEFENSE ); } + if ( spellCasted ) + SendSpellMiss(pVictim, spellCasted->Id, SPELL_MISS_PARRY ); + CastMeleeProcDamageAndSpell(pVictim, 0, attType, outcome, spellCasted, isTriggeredSpell); return; @@ -2103,6 +2109,9 @@ StartReactiveTimer( REACTIVE_OVERPOWER ); } + if ( spellCasted ) + SendSpellMiss(pVictim, spellCasted->Id, SPELL_MISS_DODGE ); + CastMeleeProcDamageAndSpell(pVictim, 0, attType, outcome, spellCasted, isTriggeredSpell); return; @@ -2125,6 +2134,10 @@ { *victimState = VICTIMSTATE_BLOCKS; *blocked_amount = uint32(*damage); + + if ( spellCasted ) + SendSpellMiss(pVictim, spellCasted->Id, SPELL_MISS_BLOCK ); + } if(pVictim->GetTypeId() == TYPEID_PLAYER)