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:
@@ -1106,7 +1106,10 @@ namespace Game.Entities
|
|||||||
{
|
{
|
||||||
victim.ToPlayer().UpdateCriteria(CriteriaTypes.HighestHitReceived, damage);
|
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())
|
if (!victim.ToCreature().HasLootRecipient())
|
||||||
victim.ToCreature().SetLootRecipient(this);
|
victim.ToCreature().SetLootRecipient(this);
|
||||||
@@ -1115,8 +1118,6 @@ namespace Game.Entities
|
|||||||
victim.ToCreature().LowerPlayerDamageReq(health < damage ? health : damage);
|
victim.ToCreature().LowerPlayerDamageReq(health < damage ? health : damage);
|
||||||
}
|
}
|
||||||
|
|
||||||
damage = (uint)(damage / victim.GetHealthMultiplierForTarget(this));
|
|
||||||
|
|
||||||
if (health <= damage)
|
if (health <= damage)
|
||||||
{
|
{
|
||||||
Log.outDebug(LogFilter.Unit, "DealDamage: victim just died");
|
Log.outDebug(LogFilter.Unit, "DealDamage: victim just died");
|
||||||
|
|||||||
Reference in New Issue
Block a user