mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 01:59:09 +00:00
feat(Core/SAI): implement SMART_ACTION_DISABLE_REWARD (#21105)
This commit is contained in:
@@ -17781,7 +17781,7 @@ void Unit::Kill(Unit* killer, Unit* victim, bool durabilityLoss, WeaponAttackTyp
|
||||
bool isRewardAllowed = true;
|
||||
if (creature)
|
||||
{
|
||||
isRewardAllowed = creature->IsDamageEnoughForLootingAndReward();
|
||||
isRewardAllowed = (creature->IsDamageEnoughForLootingAndReward() && !creature->IsLootRewardDisabled());
|
||||
if (!isRewardAllowed)
|
||||
creature->SetLootRecipient(nullptr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user