mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 17:49:10 +00:00
fix(Core/Pets): Mob "soloed" by pet should not grant exp/loot to its … (#11969)
* fix(Core/Pets): Mob "soloed" by pet should not grant exp/loot to its master. Fixes #11528
This commit is contained in:
@@ -999,7 +999,11 @@ uint32 Unit::DealDamage(Unit* attacker, Unit* victim, uint32 damage, CleanDamage
|
||||
victim->ToCreature()->SetLootRecipient(attacker);
|
||||
|
||||
if (!attacker || attacker->IsControlledByPlayer() || attacker->IsCreatedByPlayer())
|
||||
victim->ToCreature()->LowerPlayerDamageReq(health < damage ? health : damage);
|
||||
{
|
||||
uint32 unDamage = health < damage ? health : damage;
|
||||
bool damagedByPlayer = unDamage && attacker && attacker->m_movedByPlayer != nullptr;
|
||||
victim->ToCreature()->LowerPlayerDamageReq(unDamage, damagedByPlayer);
|
||||
}
|
||||
}
|
||||
|
||||
if (health <= damage)
|
||||
|
||||
Reference in New Issue
Block a user