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
@@ -392,7 +392,7 @@ namespace Game
{
AELootResult aeResult = new();
if (GetPlayer().GetGroup() == null || GetPlayer().GetGroup().GetLooterGuid() != GetPlayer().GetGUID() || GetPlayer().GetGroup().GetLootMethod() != LootMethod.MasterLoot)
if (GetPlayer().GetGroup() == null || GetPlayer().GetGroup().GetLooterGuid() != GetPlayer().GetGUID())
{
GetPlayer().SendLootError(ObjectGuid.Empty, ObjectGuid.Empty, LootError.DidntKill);
return;
@@ -417,7 +417,7 @@ namespace Game
return;
}
if (loot == null)
if (loot == null || loot.GetLootMethod() != LootMethod.MasterLoot)
return;
byte slotid = (byte)(req.LootListID - 1);