Update aoe_loot.cpp

This commit is contained in:
TerraByte
2025-03-30 17:17:51 -05:00
committed by GitHub
parent 3768a5ad94
commit ff1f345c88

View File

@@ -40,6 +40,10 @@ bool AOELootServer::CanPacketReceive(WorldSession* session, WorldPacket& packet)
for (auto* creature : lootcreature)
{
if (creature->GetGUID() == mainGuid)
{
continue; // Skip AOE loot for the main mob
}
if (!player->GetMap()->Instanceable() && !player->isAllowedToLoot(creature))
continue;
@@ -80,12 +84,11 @@ bool AOELootServer::CanPacketReceive(WorldSession* session, WorldPacket& packet)
session->HandleLootMoneyOpcode(moneyPacket);
}
if (!loot->empty())
if (loot->empty())
{
creature->loot.clear();
creature->AllLootRemovedFromCorpse();
creature->RemoveDynamicFlag(UNIT_DYNFLAG_LOOTABLE);
}
}
return true;
}