fix(Core/Player): Weapon skill gain (#5961)

This commit is contained in:
Kitzunu
2021-05-28 00:49:24 +02:00
committed by GitHub
parent d8911d816f
commit f1b43a8976
5 changed files with 35 additions and 12 deletions

View File

@@ -15518,7 +15518,12 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
return;
// Update skills here for players
if (GetTypeId() == TYPEID_PLAYER)
// only when you are not fighting other players or their pets/totems (pvp)
if (GetTypeId() == TYPEID_PLAYER &&
target->GetTypeId() != TYPEID_PLAYER &&
!(target->IsTotem() && target->ToTotem()->GetOwner()->IsPlayer()) &&
!target->IsPet()
)
{
// On melee based hit/miss/resist need update skill (for victim and attacker)
if (procExtra & (PROC_EX_NORMAL_HIT | PROC_EX_MISS | PROC_EX_RESIST))