Core/Creatures: Fixed crediting loot and quests for creatures using level scaling

Port From (https://github.com/TrinityCore/TrinityCore/commit/9e9fb667ecef8263f6184d194c3aceafd4d89e71)
This commit is contained in:
hondacrx
2021-02-13 20:45:57 -05:00
parent 9355a35750
commit 6ceeb9e31e
+4 -3
View File
@@ -1106,7 +1106,10 @@ namespace Game.Entities
{
victim.ToPlayer().UpdateCriteria(CriteriaTypes.HighestHitReceived, damage);
}
else if (!victim.IsControlledByPlayer() || victim.IsVehicle())
damage /= (uint)victim.GetHealthMultiplierForTarget(this);
if (victim.GetTypeId() != TypeId.Player && !victim.IsControlledByPlayer() || victim.IsVehicle())
{
if (!victim.ToCreature().HasLootRecipient())
victim.ToCreature().SetLootRecipient(this);
@@ -1115,8 +1118,6 @@ namespace Game.Entities
victim.ToCreature().LowerPlayerDamageReq(health < damage ? health : damage);
}
damage = (uint)(damage / victim.GetHealthMultiplierForTarget(this));
if (health <= damage)
{
Log.outDebug(LogFilter.Unit, "DealDamage: victim just died");