mirror of
https://github.com/brighton-chi/mod-aoe-loot.git
synced 2026-02-07 20:51:10 +00:00
Update aoe_loot.cpp
This commit is contained in:
@@ -40,6 +40,10 @@ bool AOELootServer::CanPacketReceive(WorldSession* session, WorldPacket& packet)
|
|||||||
for (auto* creature : lootcreature)
|
for (auto* creature : lootcreature)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (creature->GetGUID() == mainGuid)
|
||||||
|
{
|
||||||
|
continue; // Skip AOE loot for the main mob
|
||||||
|
}
|
||||||
if (!player->GetMap()->Instanceable() && !player->isAllowedToLoot(creature))
|
if (!player->GetMap()->Instanceable() && !player->isAllowedToLoot(creature))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@@ -80,12 +84,11 @@ bool AOELootServer::CanPacketReceive(WorldSession* session, WorldPacket& packet)
|
|||||||
session->HandleLootMoneyOpcode(moneyPacket);
|
session->HandleLootMoneyOpcode(moneyPacket);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!loot->empty())
|
if (loot->empty())
|
||||||
{
|
{
|
||||||
creature->loot.clear();
|
|
||||||
creature->AllLootRemovedFromCorpse();
|
creature->AllLootRemovedFromCorpse();
|
||||||
creature->RemoveDynamicFlag(UNIT_DYNFLAG_LOOTABLE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user