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