fix(Core/Loot): Proeprly handle UNIT_DYNFLAG_LOOTABLE flag. (#9761)
Fixes #9741
This commit is contained in:
@@ -17171,7 +17171,7 @@ void Unit::Kill(Unit* killer, Unit* victim, bool durabilityLoss, WeaponAttackTyp
|
|||||||
creature->DeleteThreatList();
|
creature->DeleteThreatList();
|
||||||
|
|
||||||
// must be after setDeathState which resets dynamic flags
|
// must be after setDeathState which resets dynamic flags
|
||||||
if (!creature->loot.empty())
|
if (!creature->loot.isLooted())
|
||||||
{
|
{
|
||||||
creature->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
creature->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -363,7 +363,7 @@ struct Loot
|
|||||||
loot_type = LOOT_NONE;
|
loot_type = LOOT_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] bool empty() const { return items.empty() && quest_items.empty() && gold == 0; }
|
[[nodiscard]] bool empty() const { return items.empty() && gold == 0; }
|
||||||
[[nodiscard]] bool isLooted() const { return gold == 0 && unlootedCount == 0; }
|
[[nodiscard]] bool isLooted() const { return gold == 0 && unlootedCount == 0; }
|
||||||
|
|
||||||
void NotifyItemRemoved(uint8 lootIndex);
|
void NotifyItemRemoved(uint8 lootIndex);
|
||||||
|
|||||||
Reference in New Issue
Block a user