Core/Loot: Send DungeonEncounter id in SMSG_ITEM_PUSH_RESULT

Port From (https://github.com/TrinityCore/TrinityCore/commit/5a516fb6549e460e68b45005a17ec1b6217fefa5)
This commit is contained in:
hondacrx
2022-10-04 19:59:15 -04:00
parent 9d6b144884
commit 87fdd30072
6 changed files with 37 additions and 10 deletions
+2 -2
View File
@@ -86,7 +86,7 @@ namespace Game
{
foreach (var resultValue in aeResult.GetByOrder())
{
player.SendNewItem(resultValue.item, resultValue.count, false, false, true);
player.SendNewItem(resultValue.item, resultValue.count, false, false, true, resultValue.dungeonEncounterId);
player.UpdateCriteria(CriteriaType.LootItem, resultValue.item.GetEntry(), resultValue.count);
player.UpdateCriteria(CriteriaType.GetLootByType, resultValue.item.GetEntry(), resultValue.count, (ulong)resultValue.lootType);
player.UpdateCriteria(CriteriaType.LootAnyItem, resultValue.item.GetEntry(), resultValue.count);
@@ -445,7 +445,7 @@ namespace Game
// now move item from loot to target inventory
Item newitem = target.StoreNewItem(dest, item.itemid, true, item.randomBonusListId, item.GetAllowedLooters(), item.context, item.BonusListIDs);
aeResult.Add(newitem, item.count, loot.loot_type);
aeResult.Add(newitem, item.count, loot.loot_type, loot.GetDungeonEncounterId());
// mark as looted
item.count = 0;