feat(Core/Config): Improvements to config caching (#21647)

This commit is contained in:
Takenbacon 2025-06-30 08:14:12 -07:00 committed by GitHub
parent 904ddc72cc
commit fd262c3ab1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 1443 additions and 1555 deletions

View file

@ -17949,8 +17949,8 @@ void Unit::Kill(Unit* killer, Unit* victim, bool durabilityLoss, WeaponAttackTyp
// only if not player and not controlled by player pet. And not at BG
if ((durabilityLoss && !player && !plrVictim->InBattleground()) || (player && sWorld->getBoolConfig(CONFIG_DURABILITY_LOSS_IN_PVP)))
{
LOG_DEBUG("entities.unit", "We are dead, losing {} percent durability", sWorld->getRate(RATE_DURABILITY_LOSS_ON_DEATH));
plrVictim->DurabilityLossAll(sWorld->getRate(RATE_DURABILITY_LOSS_ON_DEATH), false);
LOG_DEBUG("entities.unit", "We are dead, losing {} percent durability", sWorld->getRate(RATE_DURABILITY_LOSS_ON_DEATH) / 100.0f);
plrVictim->DurabilityLossAll(sWorld->getRate(RATE_DURABILITY_LOSS_ON_DEATH) / 100.0f, false);
// durability lost message
plrVictim->SendDurabilityLoss();
}