Core/Loot: Move loot rolls from Group to Loot
Port From (https://github.com/TrinityCore/TrinityCore/commit/3ef5079feeedfdafc9d3c1d9f865e96dbc77ecc8)
This commit is contained in:
@@ -91,8 +91,6 @@ namespace Game.Entities
|
||||
List<VendorItemCount> m_vendorItemCounts = new();
|
||||
|
||||
public Loot loot;
|
||||
public uint m_groupLootTimer; // (msecs)timer used for group loot
|
||||
public ObjectGuid lootingGroupLowGUID; // used to find group which is looting corpse
|
||||
ObjectGuid m_lootRecipient;
|
||||
ObjectGuid m_lootRecipientGroup;
|
||||
}
|
||||
|
||||
@@ -507,20 +507,9 @@ namespace Game.Entities
|
||||
if (IsEngaged())
|
||||
AIUpdateTick(diff);
|
||||
|
||||
if (loot != null && m_groupLootTimer != 0 && !lootingGroupLowGUID.IsEmpty())
|
||||
{
|
||||
if (m_groupLootTimer <= diff)
|
||||
{
|
||||
Group group = Global.GroupMgr.GetGroupByGUID(lootingGroupLowGUID);
|
||||
if (group)
|
||||
group.EndRoll(loot, GetMap());
|
||||
loot?.Update();
|
||||
|
||||
m_groupLootTimer = 0;
|
||||
lootingGroupLowGUID.Clear();
|
||||
}
|
||||
else m_groupLootTimer -= diff;
|
||||
}
|
||||
else if (m_corpseRemoveTime <= GameTime.GetGameTime())
|
||||
if (m_corpseRemoveTime <= GameTime.GetGameTime())
|
||||
{
|
||||
RemoveCorpse(false);
|
||||
Log.outDebug(LogFilter.Unit, "Removing corpse... {0} ", GetEntry());
|
||||
|
||||
Reference in New Issue
Block a user