Core/Groups: Fixed crash in loot rolls happening when looted object despawns before roll expires
Port From (https://github.com/TrinityCore/TrinityCore/commit/6f8d6f5c9bc32bbe11de3377501453da1106f98a)
This commit is contained in:
@@ -2605,8 +2605,9 @@ namespace Game.Groups
|
||||
Roll GetRoll(ObjectGuid lootObjectGuid, byte lootListId)
|
||||
{
|
||||
foreach (var roll in RollId)
|
||||
if (roll.GetTarget() != null && roll.GetTarget().GetGUID() == lootObjectGuid && roll.itemSlot == lootListId && roll.IsValid())
|
||||
if (roll.IsValid() && roll.GetTarget().GetGUID() == lootObjectGuid && roll.itemSlot == lootListId)
|
||||
return roll;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user