fix(Core/Players): Fixed awarding kill credit while being on vehicles. (#13944)
Fixes #12849
This commit is contained in:
@@ -1031,7 +1031,7 @@ uint32 Unit::DealDamage(Unit* attacker, Unit* victim, uint32 damage, CleanDamage
|
|||||||
if (!attacker || attacker->IsControlledByPlayer() || attacker->IsCreatedByPlayer())
|
if (!attacker || attacker->IsControlledByPlayer() || attacker->IsCreatedByPlayer())
|
||||||
{
|
{
|
||||||
uint32 unDamage = health < damage ? health : damage;
|
uint32 unDamage = health < damage ? health : damage;
|
||||||
bool damagedByPlayer = unDamage && attacker && attacker->m_movedByPlayer != nullptr;
|
bool damagedByPlayer = unDamage && attacker && (attacker->IsPlayer() || attacker->m_movedByPlayer != nullptr);
|
||||||
victim->ToCreature()->LowerPlayerDamageReq(unDamage, damagedByPlayer);
|
victim->ToCreature()->LowerPlayerDamageReq(unDamage, damagedByPlayer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user