Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Trigering "on hit" combat spell only at related to current hit weapon.
Also check at loading that only weapon item templates have "on hit" spell triggers.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>

(based on commit 992cc3d)

In fact: repally backport after some lost changes in recent spell proc patch apply.
Thanks to CHEGOK for pointing to problematic line.
  • Loading branch information
nos4r2zod authored and VladimirMangos committed Jun 3, 2010
1 parent f6f145f commit cc629fd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/game/Unit.cpp
Expand Up @@ -1717,11 +1717,9 @@ void Unit::DealMeleeDamage(CalcDamageInfo *damageInfo, bool durabilityLoss)
// If not miss
if (!(damageInfo->HitInfo & HITINFO_MISS))
{
// on weapon hit casts
if(GetTypeId() == TYPEID_PLAYER && pVictim->isAlive())
{
for(int i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; i++)
((Player*)this)->CastItemCombatSpell(pVictim, damageInfo->attackType);
}
((Player*)this)->CastItemCombatSpell(pVictim, damageInfo->attackType);

// victim's damage shield
std::set<Aura*> alreadyDone;
Expand Down

0 comments on commit cc629fd

Please sign in to comment.