mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 18:40:28 +00:00
fix(Core): fix chests not despawning when opened in group (#5371)
This commit is contained in:
@@ -1494,6 +1494,15 @@ void Group::CountTheRoll(Rolls::iterator rollI, Map* allowedMap)
|
||||
item->is_blocked = false;
|
||||
}
|
||||
|
||||
{
|
||||
Loot* loot = roll->getLoot();
|
||||
if (loot->isLooted() && loot->sourceGameObject != nullptr && loot->sourceGameObject->GetGOInfo()->type == GAMEOBJECT_TYPE_CHEST)
|
||||
{
|
||||
// Deactivate chest if the last item was rolled in group
|
||||
loot->sourceGameObject->SetLootState(GO_JUST_DEACTIVATED);
|
||||
}
|
||||
}
|
||||
|
||||
RollId.erase(rollI);
|
||||
delete roll;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user