mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 18:15:31 +01:00
Core/Item: Fixed another possible container exploit due to invalid loading of stored loot items in DB (#26795)
(cherry picked from commit 1b9ee95253)
This commit is contained in:
@@ -32,7 +32,7 @@ namespace
|
||||
std::unordered_map<uint64, StoredLootContainer> _lootItemStore;
|
||||
}
|
||||
|
||||
StoredLootItem::StoredLootItem(LootItem const& lootItem) : ItemId(lootItem.itemid), Count(lootItem.count), FollowRules(lootItem.follow_loot_rules),
|
||||
StoredLootItem::StoredLootItem(LootItem const& lootItem) : ItemId(lootItem.itemid), Count(lootItem.count), ItemIndex(lootItem.itemIndex), FollowRules(lootItem.follow_loot_rules),
|
||||
FFA(lootItem.freeforall), Blocked(lootItem.is_blocked), Counted(lootItem.is_counted), UnderThreshold(lootItem.is_underthreshold),
|
||||
NeedsQuest(lootItem.needs_quest), RandomBonusListId(lootItem.randomBonusListId), Context(lootItem.context), BonusListIDs(lootItem.BonusListIDs)
|
||||
{
|
||||
@@ -160,6 +160,7 @@ bool LootItemStorage::LoadStoredLoot(Item* item, Player* player)
|
||||
LootItem li;
|
||||
li.itemid = storedItemPair.first;
|
||||
li.count = storedItemPair.second.Count;
|
||||
li.itemIndex = storedItemPair.second.ItemIndex;
|
||||
li.follow_loot_rules = storedItemPair.second.FollowRules;
|
||||
li.freeforall = storedItemPair.second.FFA;
|
||||
li.is_blocked = storedItemPair.second.Blocked;
|
||||
|
||||
@@ -38,6 +38,7 @@ struct StoredLootItem
|
||||
|
||||
uint32 ItemId;
|
||||
uint32 Count;
|
||||
uint32 ItemIndex;
|
||||
bool FollowRules;
|
||||
bool FFA;
|
||||
bool Blocked;
|
||||
|
||||
Reference in New Issue
Block a user