Fixes some errors with loot.
This commit is contained in:
@@ -92,7 +92,7 @@ namespace Game.Entities
|
||||
|
||||
internal Dictionary<ObjectGuid, Loot> m_personalLoot = new();
|
||||
public Loot _loot;
|
||||
List<ObjectGuid> m_tapList = new();
|
||||
HashSet<ObjectGuid> m_tapList = new();
|
||||
}
|
||||
|
||||
public enum ObjectCellMoveState
|
||||
|
||||
@@ -1244,8 +1244,8 @@ namespace Game.Entities
|
||||
return false;
|
||||
}
|
||||
|
||||
public List<ObjectGuid> GetTapList() { return m_tapList; }
|
||||
public void SetTapList(List<ObjectGuid> tapList) { m_tapList = tapList; }
|
||||
public HashSet<ObjectGuid> GetTapList() { return m_tapList; }
|
||||
public void SetTapList(HashSet<ObjectGuid> tapList) { m_tapList = tapList; }
|
||||
public bool HasLootRecipient() { return !m_tapList.Empty(); }
|
||||
|
||||
public void SaveToDB()
|
||||
|
||||
@@ -4107,10 +4107,7 @@ namespace Game.Entities
|
||||
|
||||
public Loot GetLootByWorldObjectGUID(ObjectGuid lootWorldObjectGuid)
|
||||
{
|
||||
if (m_AELootView.TryGetValue(lootWorldObjectGuid, out Loot lootView))
|
||||
return lootView;
|
||||
|
||||
return null;
|
||||
return m_AELootView.FirstOrDefault(pair => pair.Value.GetOwnerGUID() == lootWorldObjectGuid).Value;
|
||||
}
|
||||
|
||||
public LootRoll GetLootRoll(ObjectGuid lootObjectGuid, byte lootListId)
|
||||
|
||||
@@ -827,10 +827,6 @@ namespace Game.Loots
|
||||
|
||||
void FillNotNormalLootFor(Player player)
|
||||
{
|
||||
if (_dungeonEncounterId != 0)
|
||||
if (player.IsLockedToDungeonEncounter(_dungeonEncounterId))
|
||||
return;
|
||||
|
||||
ObjectGuid plguid = player.GetGUID();
|
||||
_allowedLooters.Add(plguid);
|
||||
|
||||
@@ -841,6 +837,8 @@ namespace Game.Loots
|
||||
if (!item.AllowedForPlayer(player, this))
|
||||
continue;
|
||||
|
||||
item.AddAllowedLooter(player);
|
||||
|
||||
if (item.freeforall)
|
||||
{
|
||||
ffaItems.Add(new NotNormalLootItem((byte)item.LootListId));
|
||||
|
||||
Reference in New Issue
Block a user