Core/Loot: Store method used at loot generation inside Loot object

Port From (https://github.com/TrinityCore/TrinityCore/commit/9700b2a78680452d80025121a031da340af51348)
This commit is contained in:
hondacrx
2022-09-18 15:54:17 -04:00
parent bfdbcd7cbe
commit 0f77a9b27d
7 changed files with 38 additions and 55 deletions
+2 -2
View File
@@ -967,7 +967,7 @@ namespace Game.Groups
lootList.Owner = creature.GetGUID();
lootList.LootObj = creature.loot.GetGUID();
if (GetLootMethod() == LootMethod.MasterLoot && creature.loot.HasOverThresholdItem())
if (creature.loot.GetLootMethod() == LootMethod.MasterLoot && creature.loot.HasOverThresholdItem())
lootList.Master = GetMasterLooterGuid();
if (groupLooter)
@@ -1364,7 +1364,7 @@ namespace Game.Groups
player.AutoStoreLoot(disenchant.Id, LootStorage.Disenchant, ItemContext.None, true);
else // If the player's inventory is full, send the disenchant result in a mail.
{
Loot loot = new(allowedMap, roll.GetLoot().GetOwnerGUID(), LootType.Disenchanting);
Loot loot = new(allowedMap, roll.GetLoot().GetOwnerGUID(), LootType.Disenchanting, roll.GetLoot().GetLootMethod());
loot.FillLoot(disenchant.Id, LootStorage.Disenchant, player, true);
uint max_slot = loot.GetMaxSlotInLootFor(player);