mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[7990] 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>
This commit is contained in:
parent
e3fd03c7b9
commit
31957a22d6
5 changed files with 13 additions and 8 deletions
|
|
@ -1505,11 +1505,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(((Player*)this)->GetItemByPos(INVENTORY_SLOT_BAG_0,i), pVictim, damageInfo->attackType);
|
||||
}
|
||||
((Player*)this)->CastItemCombatSpell(pVictim, damageInfo->attackType);
|
||||
|
||||
// victim's damage shield
|
||||
std::set<Aura*> alreadyDone;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue